Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
f1234567
Contributor III
Contributor III

How to calculate Shares for a dimension AND Time Period

Hello experts,

I have a question of how to calculate Shares % of a Pivot table.

I have follwoing Pivot:

TableCurrent.JPG

The formula here is:  Sum({<Distr = >} [Daten])

But how would I have to change the formula in order to achieve following table:

TableRequired.JPG

As soon as I use set analysis with "Total" QV calculates  the whole period as total and not the total for each month.

Many thanks for any hint!

Best

Frank

Labels (1)
2 Solutions

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

You put fields to limit the extent of the TOTAL in angle braces after total - so suggest something like Sum({<Distr = >} [Daten])/Sum({<Distr = >}TOTAL <Period> [Daten]).

Cheers,

Chris.

View solution in original post

f1234567
Contributor III
Contributor III
Author

Hi Chris,
Many thanks! That's it.

Sum({<Distr = >} [Daten])/Sum({<Distr = >}TOTAL <YYYY_MM, Quarter, Year> [Daten])

(I have to state <YYYY_MM, Quarter, Year> because I use a 'cyclic group' named "Period", where I switch from "YYYY_MM" to "Quarter" to "Year").

Thanks for your help!!
Best
Frank

View solution in original post

2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

You put fields to limit the extent of the TOTAL in angle braces after total - so suggest something like Sum({<Distr = >} [Daten])/Sum({<Distr = >}TOTAL <Period> [Daten]).

Cheers,

Chris.

f1234567
Contributor III
Contributor III
Author

Hi Chris,
Many thanks! That's it.

Sum({<Distr = >} [Daten])/Sum({<Distr = >}TOTAL <YYYY_MM, Quarter, Year> [Daten])

(I have to state <YYYY_MM, Quarter, Year> because I use a 'cyclic group' named "Period", where I switch from "YYYY_MM" to "Quarter" to "Year").

Thanks for your help!!
Best
Frank