Discussion Board for collaboration on QlikView Scripting.
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.
Go to Solution.
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.
Sum(Sales) / Sum(TOTAL <$(=GetCurrentField([GroupName]))> Sales)
vFieldName = GetCurrentField([GroupName]) ;
Sum(Sales) / Sum(TOTAL <$(vFieldName)> Sales)
Sum(Sales) / Sum(TOTAL <Dim1,Dim2,Dim3> Sales)
You may be try with variable like below:
Other way is use all the Dimensions in the group in side Total like below:
Thank you !!