SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Count Columns


Count Columns

Author
Message
pedro.j.manuel
pedro.j.manuel
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 74
Hi hi have a follow result on my mdx query

groupA | groupB | groupC | TOTAL

100 200 400 3



ihi already made the groups, but i don't know how can i count my columns TOTAL
as you can see on result . but only present if there is values


with
member GroupA as Sum({[d P].[ID P].CurrentMember}*[d Condition Type].[Code].&[A01],[Measures].[f Validated Condition Count])
member GroupB as Sum({[d P].[ID P].CurrentMember}*[d Condition Type].[Code].&[B01],[Measures].[f Validated Condition Count])
member GroupC as Sum({[d P].[ID P].CurrentMember}*[d Condition Type].[Code].&[C01],[Measures].[f Validated Condition Count])
member Total as COUNT([d P].[ID P],[d Condition Type].[Code].&[A01])
// COUNT(,
// {[d Condition Type].[Code].&[A01],,
// [d Condition Type].[Code].&[B01],
// [d Condition Type].[Code].&[C01]
)
SELECT {GroupA,GroupB,GroupC,Total} on 0
FROM [Cube2]

Can you help me... it will be greatful

thks
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search