dbTalk Databases Forums  

Currency / Decimal? (no prev. responses so I'll try again)

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


Discuss Currency / Decimal? (no prev. responses so I'll try again) in the microsoft.public.sqlserver.olap forum.



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

Default Currency / Decimal? (no prev. responses so I'll try again) - 08-22-2003 , 06:46 AM






I have a cube with the following measures:
*Name *Data Type
StoreSales Currency
UnitSales Decimal

It includes the following Calculated Members
*Name
SalesPerUnit

*Value
[Measures].[Store Sales]/[Measures].[Unit Sales]

When I look at my data, the Sum of StoreSales is
110.42 and UnitSales is 54.62. The SalesPerUnit should be
2.0208, however, the value in my pivot table is 2.0448.
It looks like the calculated member is taking the
StoreSales 110.42 and dividing it by 54 (whole number)
instead of 54.62.

If both values are currency, the calculations works fine.
It is incorrect only when dividing a currency by a decimal.

Is this a know issue in Analysis Services?


Reply With Quote
  #2  
Old   
Lutz Morrien
 
Posts: n/a

Default set format - 08-22-2003 , 07:00 AM






Hi,
I had the same issue in mdx.
Here you can set a format as in:

WITH
MEMBER [MEASURES].[XYZ] AS
'<memberdef>',FORMAT_STRING ='#,###.00;-#,###.00'

That helped, since it gave me the real value I needed.
You should be able to set the format string in AS-manager
as well.

HTH, Lutz

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.