dbTalk Databases Forums  

Counting

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


Discuss Counting in the microsoft.public.sqlserver.olap forum.



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

Default Counting - 06-07-2004 , 10:51 AM






Hello. I’m new to Analysis Services and OLAP. I have a simple issue that seems rather complex to me in how to solve

I have a table that contains a few columns of data, here’s an example of my problem column

Column
-------
2
2
2
2
2
2

What I am trying to figure out is how to use the COUNT function to count how many times “23” occurs

Any help would be greatly appreciated!

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

Default RE: Counting - 06-07-2004 , 11:51 AM






MDX Count() counts how many items in a set. If you insist to use Count(), you have to build a dimension which groups all 23 item under parent 23 grouping, etc

Then define custom rollup formula on 23 grouping as Count

The simple approach will be to build a table in relational database(pre-solving the count

Number Howman
23 1
24 1


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

Default RE: Counting - 06-07-2004 , 05:21 PM



Thank you for your help. I understand everything up until this

"define custom rollup formula on 23 grouping as Count

Can you give me an example? Thanks again.

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

Default RE: Counting - 06-08-2004 , 09:26 AM



On number grouping level (including 23 grouping), define custom roll-up formula as
Count([dim].currentmember.children)

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.