Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 [solved] AS - Formating Calculations

Author  Topic 

Juergen_G
Starting Member

12 Posts

Posted - 2010-05-06 : 11:03:41
Hi,

I use the Format String
#,##0.00;[Red]-#,##0.00
in "normal" Measures - it works.

When i Use the Same in Calculations


CALCULATE;
CREATE MEMBER CURRENTCUBE.[Measures].DB1
AS [Measures].[Umsatz]-[Measures].[Einstand],
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Verkäufe';
CREATE MEMBER CURRENTCUBE.[Measures].Materialeinsatz
AS [Measures].[Einstand]-[Measures].[Kalk Fracht],
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Verkäufe';
CREATE MEMBER CURRENTCUBE.[Measures].MSP
AS [Measures].[Umsatz]-[Measures].[Einstand]+[Measures].[Kalk Fracht],
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Verkäufe';
CREATE MEMBER CURRENTCUBE.[Measures].Bruttowert
AS [Measures].[Lieferwert Brutto]-[Measures].[Lieferwert Aliquoter Skontobetrag],
FORMAT_STRING = #,##0.00;[Red]-#,##0.00,
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Verkäufe' ;


Then i get this error:
'Parser: Syntaxerror during Analsis: Invalid Token, Line 18, Offset17,"'

Without the format String - i can build the cube.

Please give me a work around
Thanks in advance Jürgen

greetings from Austria

Juergen_G
Starting Member

12 Posts

Posted - 2010-05-07 : 06:37:49
Hi,

my boss found the solution. I need an aditional " at the start and the beginning of the format string.

--> this works now:

CREATE MEMBER CURRENTCUBE.[Measures].Bruttowert
AS [Measures].[Lieferwert Brutto]-[Measures].[Lieferwert Aliquoter Skontobetrag],
FORMAT_STRING = "#,##0.00;[Red]-#,##0.00",
VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Verkäufe' ;

Nice weekend
Jürgen

Go to Top of Page
   

- Advertisement -