Home > Archive > MS SQL Data Warehousing > January 2006 > percentage based on the current filter









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author percentage based on the current filter
gabriele

2006-01-24, 11:23 am

Hi to all,
I built a calculated member showing the percentage of a certain
measure over more dimensions.
For example,
I have 3 dimensions, d1,d2 and d3 and a measure m1. My calculated
member (called P), is the percentage of m1 on the total.

So, when I don't apply any filter on dimensions d2 and d3 i have the
following result:
-----------------------------------------------------------------------------------------------------------------
All dim2
All dim3
-----------------------------------------------------------------------------------------------------------------
M P (%)
All dim1 20 100%
1st member of d1 2 10%
2nd member of d1 6 30%
3rd member of d1 4 20%
4th member of d1 8 40%
-----------------------------------------------------------------------------------------------------------------
and it works fine.

But, assuming d2 is a time dimension, when I filter d2 = 2005 instead
of "All times", the previous table shows all the values considering
only the year 2005:

-----------------------------------------------------------------------------------------------------------------
dim2 = 2005
All dim3
-----------------------------------------------------------------------------------------------------------------
M P (%)
All dim1 5 25%
1st member of d1 0 0%
2nd member of d1 1 5%
3rd member of d1 1 5%
4th member of d1 3 15%
-----------------------------------------------------------------------------------------------------------------

Now my question is:
how can I have a percentage Q that considers filtered and shown data
always if they were the 100% of the measure? I would like to have, in
the second example, the following result:

-----------------------------------------------------------------------------------------------------------------
dim2 = 2005
All dim3
-----------------------------------------------------------------------------------------------------------------
M P (%)
All dim1 5 100%
1st member of d1 0 0%
2nd member of d1 1 20%
3rd member of d1 1 20%
4th member of d1 3 60%
-----------------------------------------------------------------------------------------------------------------

Any suggestion will be valued!!!!!
Gabriele

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com