dbTalk Databases Forums  

Please help - Percentage query

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


Discuss Please help - Percentage query in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Brian via SQLMonster.com
 
Posts: n/a

Default Please help - Percentage query - 05-20-2005 , 04:13 PM






I have a cube with a distinct count measure.
I also need a measure that will give the users this measure as a percent of
the total.

For example the first measure is number of projects at various stages of
completion. The second measure will be number of projects as a %age of the
total number of products.

Please help!

Thanks in advance

--
Message posted via http://www.sqlmonster.com

Reply With Quote
  #2  
Old   
Brian via SQLMonster.com
 
Posts: n/a

Default Re: Please help - Percentage query - 05-20-2005 , 04:22 PM






I just tried the below and it seems to work! Is it correct

calc measure X
sum({[Project Status].members}, [Measures].[Count])/2

I have divided by 2 as it shows the exact double otherwise

calc measure Y

([Measures].[Count]/[Measures].[X]) * 100

thanks!

--
Message posted via http://www.sqlmonster.com

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.