dbTalk Databases Forums  

Calculated Measrure based on Count of Dimension Levels

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


Discuss Calculated Measrure based on Count of Dimension Levels in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jason.strate@performark.com
 
Posts: n/a

Default Calculated Measrure based on Count of Dimension Levels - 03-14-2005 , 03:52 PM






I am working on a cube and I am trying to determine how to create a
calculated measure that counts the number of fact rows that exist for a
level of a dimension.

The dimension structure is:

Disposition
* Non-Opportunity
* Opportunity
* * Competitor
* * Disqualified
* * Qualified

I am trying to put the measure in the cube instead of representing it
as an MDX statement in a report due to our use of a third-party tool
for displaying and drilling through the cube.

Any help would be greatly appreciated.

Jason Strate


Reply With Quote
  #2  
Old   
Vladimir Chtepa
 
Posts: n/a

Default Re: Calculated Measrure based on Count of Dimension Levels - 03-14-2005 , 05:59 PM






Hi, Jason

Would you please to present your MDX expression to
describe your needs.
Is a (distinct)count aggregation measure about of your needs?

Thanks,
Vladimir Chtepa

<jason.strate (AT) performark (DOT) com> wrote

Quote:
I am working on a cube and I am trying to determine how to create a
calculated measure that counts the number of fact rows that exist for a
level of a dimension.

The dimension structure is:

Disposition
* Non-Opportunity
* Opportunity
* * Competitor
* * Disqualified
* * Qualified

I am trying to put the measure in the cube instead of representing it
as an MDX statement in a report due to our use of a third-party tool
for displaying and drilling through the cube.

Any help would be greatly appreciated.

Jason Strate




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

Default Re: Calculated Measrure based on Count of Dimension Levels - 03-15-2005 , 09:32 AM



Counting the number of fact rows...if that's what you truly want
couldn't be much easier. Simply add a new measure to your cube that is
based on one of the key fields of your fact table...then change the
aggregation type of that measure from the default of sum to count.
This count will now be accurate across all the the ways you slice and
dice your cube.

If you want a count of your disposition dimension, irrespective of what
ever slices are executed against any other dimension...then you need to
create a calculated member on this new count measure that intersects
the new count measure with the default member of every other dimension
in the cube other than Displosition. Something like this...

(Time.DefaultMember, Geography.DefaultMember, Customer.DefaultMember,
Disposition.CurrentMember, Measures.Count)


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.