dbTalk Databases Forums  

FORMAT_STRING issue with calculated measures

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss FORMAT_STRING issue with calculated measures in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Pat
 
Posts: n/a

Default FORMAT_STRING issue with calculated measures - 08-17-2006 , 10:49 AM






SSAS 2005 SP1
The server's regional settings are US-English

Designing the cube in Visual Studio on the server itself, I specify
FORMAT_STRING = "#,#" for my calculated measures (in the Calculations tab),
expecting to get 12.234
However, in the Browser tab, the values for those measures show up as 12,234
instead. As if I had some European regional settings.

The funny thing is that the non-calculated measures do display the proper US
format. In the Cube Structure tab, under Properties, I set the FormatString
property to #,# as well. Non-calculated measures are displayed as 12.234.

What gives ? How come the same format string results in different formatting
for calculated and non-calculated measures ?


Reply With Quote
  #2  
Old   
Pat
 
Posts: n/a

Default RE: FORMAT_STRING issue with calculated measures - 08-18-2006 , 10:16 AM






I have also checked the language settings on the SSAS 2005 server and they
show:

<ServerProperty>
<Name>CollationName</Name>
<Value>Latin1_General_CI_AS</Value>
</ServerProperty>
<ServerProperty>
<Name>Language</Name>
<Value>1033</Value>
</ServerProperty>
<ServerProperty>
<Name>EnableFast1033Locale</Name>
<Value>false</Value>
</ServerProperty>

What else can I check ?


Reply With Quote
  #3  
Old   
Rea
 
Posts: n/a

Default RE: FORMAT_STRING issue with calculated measures - 08-20-2006 , 03:09 AM



Hey Pat
Your results seem reasonable to me.
If you set FORMAT_STRING = "#,#" for a calculated measure
you will see it that way, regardless of your reginal language settings
(the first overrides the last).
On the other hand, regular measures format is indeed set by reginal language
settings.
To force reginal language settings on a calculated measure's format
set its FORMAT_STRING value to be the same as the one you have in
the Numbers section in reginal language settings.

Rea

"Pat" wrote:

Quote:
SSAS 2005 SP1
The server's regional settings are US-English

Designing the cube in Visual Studio on the server itself, I specify
FORMAT_STRING = "#,#" for my calculated measures (in the Calculations tab),
expecting to get 12.234
However, in the Browser tab, the values for those measures show up as 12,234
instead. As if I had some European regional settings.

The funny thing is that the non-calculated measures do display the proper US
format. In the Cube Structure tab, under Properties, I set the FormatString
property to #,# as well. Non-calculated measures are displayed as 12.234.

What gives ? How come the same format string results in different formatting
for calculated and non-calculated measures ?


Reply With Quote
  #4  
Old   
Pat
 
Posts: n/a

Default RE: FORMAT_STRING issue with calculated measures - 08-20-2006 , 05:47 AM



Hi Rea,

The comma in the "#,#" format string stands for thousand divider. In the
US-english locale (the locale of the server), the thousand divider (aka digit
grouping symbol) is a comma, and the decimal symbol is a dot.
In European locales, it's the other way around.

On this particular server, using the same format string for all measures in
the cube, I get calculated measures formatted as 123,456.78 and
non-calculated measures formatted as 123.456,78

SSAS 2005 x64 SP1 with the post-SP1 hotfix, Win 2003 x64 standard,
US-english, located in Germany, regional settings US-english


"Rea" wrote:

Quote:
Hey Pat
Your results seem reasonable to me.
If you set FORMAT_STRING = "#,#" for a calculated measure
you will see it that way, regardless of your reginal language settings
(the first overrides the last).
On the other hand, regular measures format is indeed set by reginal language
settings.
To force reginal language settings on a calculated measure's format
set its FORMAT_STRING value to be the same as the one you have in
the Numbers section in reginal language settings.

Rea

"Pat" wrote:

SSAS 2005 SP1
The server's regional settings are US-English

Designing the cube in Visual Studio on the server itself, I specify
FORMAT_STRING = "#,#" for my calculated measures (in the Calculations tab),
expecting to get 12.234
However, in the Browser tab, the values for those measures show up as 12,234
instead. As if I had some European regional settings.

The funny thing is that the non-calculated measures do display the proper US
format. In the Cube Structure tab, under Properties, I set the FormatString
property to #,# as well. Non-calculated measures are displayed as 12.234.

What gives ? How come the same format string results in different formatting
for calculated and non-calculated measures ?


Reply With Quote
  #5  
Old   
Michael Roedeske
 
Posts: n/a

Default RE: FORMAT_STRING issue with calculated measures - 08-24-2006 , 04:37 AM



Dear Pat,

we have the same problem, regional settings are used with non calculated
measures. Calculated measure behave "on their own".

Looking forward to find a solution.


Reply With Quote
  #6  
Old   
Pat
 
Posts: n/a

Default RE: FORMAT_STRING issue with calculated measures - 08-24-2006 , 04:46 AM



In the meantime I have found out that calc measures use the locale of the
user that the SSAS service is logged on as.
To fix the problem, create an account with the locale you need, and have the
SSAS service run under this account.
Of course that will only work if all of your users require the same locale
settings.

I hope this helps.



"Michael Roedeske" wrote:

Quote:
Dear Pat,

we have the same problem, regional settings are used with non calculated
measures. Calculated measure behave "on their own".

Looking forward to find a solution.


Reply With Quote
  #7  
Old   
Michael Roedeske
 
Posts: n/a

Default RE: FORMAT_STRING issue with calculated measures - 08-24-2006 , 04:53 AM



Dear Pat,

Quote:
In the meantime I have found out that calc measures use the locale of the
user that the SSAS service is logged on as.
To fix the problem, create an account with the locale you need, and have the
SSAS service run under this account.
Of course that will only work if all of your users require the same locale
settings.

I hope this helps.
Great, thats an workaround for the most of the users. But we still have
users in some countries where theri regional settings should be respected. I
will file a case in Microsoft connect.

Thanks for the hint.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.