dbTalk Databases Forums  

grand total Issue when i am using Case in AS 2005

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


Discuss grand total Issue when i am using Case in AS 2005 in the microsoft.public.sqlserver.olap forum.



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

Default grand total Issue when i am using Case in AS 2005 - 07-20-2006 , 10:21 AM







When iam writing calculated measure , i am getting this following
problem, please can u just help me in this. thanks in advance

lets say my product dimension has only 3 members (a,b,c)

Case
when [Product].CurrentMember.Name="A" then [Measures].[Units] * 10
when [Product].CurrentMember.Name="B" then [Measures].[Units] * 5
when [Product].CurrentMember.Name="C" then [Measures] .[Units]* 30
End

But the above code is not showing grand total at bottom

If iam writing like this


Case
when [Product].CurrentMember.Name="A" then [Measures].[Units] * 10
when [Product].CurrentMember.Name="B" then [Measures].[Units] * 5
when [Product].CurrentMember.Name="C" then [Measures].[Units] * 30
Else
SUM(Descendants(Product.CurrentMember,,Leaves),
[Measures].[CaculatedMeasureName])
End
this is showing me correct grand total , but its always shoing grand
total of all members, rather than selected members.

like if i select product A, B then it should give the grant total of
those 2 productrs only but its giving all total,
can you please just tell me where i am wrong


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.