Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a problem that was in a part solved.
I'm facing an issue with the Stack bar chart where I want to show the % for each stack that is relative to the entire bar
I used this which works quite well with DIM1
Sum(Sales) / Sum(TOTAL <DIM1> Sales)
But I have a cycle group and when I use this :
Sum(Sales) / Sum(TOTAL <GetCurrentField([GroupName])> Sales) it doesn’t work.
However the function GetCurrentField([GroupName]) is correct and return the current field used.
Please help me.
Thank you
Am’
I did some experiment & I believe TOTAL qualifier did not allow the expressions or may be bug. So just pass the variable or add the expression in $() or add list of fields in the group.
Approach 1:
Sum(Sales) / Sum(TOTAL <$(=GetCurrentField([GroupName]))> Sales)
Approach 2:
vFieldName = GetCurrentField([GroupName]) ;
Sum(Sales) / Sum(TOTAL <$(vFieldName)> Sales)
Approach 3:
Sum(Sales) / Sum(TOTAL <Dim1,Dim2,Dim3> Sales)
You may be try with variable like below:
vFieldName = GetCurrentField([GroupName]) ;
Sum(Sales) / Sum(TOTAL <$(vFieldName)> Sales)
Other way is use all the Dimensions in the group in side Total like below:
Sum(Sales) / Sum(TOTAL <Dim1,Dim2,Dim3> Sales)
I did some experiment & I believe TOTAL qualifier did not allow the expressions or may be bug. So just pass the variable or add the expression in $() or add list of fields in the group.
Approach 1:
Sum(Sales) / Sum(TOTAL <$(=GetCurrentField([GroupName]))> Sales)
Approach 2:
vFieldName = GetCurrentField([GroupName]) ;
Sum(Sales) / Sum(TOTAL <$(vFieldName)> Sales)
Approach 3:
Sum(Sales) / Sum(TOTAL <Dim1,Dim2,Dim3> Sales)
Thank you !!