Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
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 mean if I've 4 stacks in one bar, then I want to show 25% in each stack.
Thanks in advance for your help!!!
I believe, Use the Total Qualifier in the expression
Sum(Sales) / Sum(TOTAL <DIM1> Sales)
If not working please post sample qvw.
Hey Thanks,
Actually after posting the question, I figured out the answer by looking at this post Re: showing values in % but after this bar has changed to 100% stacked bar chart. Is it something can we avoid, I mean we can use the stack bar chart as per the real values but when showing the values in the stacks, then it should show the %.
Thanks!!!
Does the attach help ?
Can you attach the qvw?
Hi, you can use Dual function to split the value that defines the high of the bar, and the value shown:
Dual(Sum(Sales), Num(Sum(Sales) / Sum(TOTAL <DIM1> Sales), '#.##0,00%')
Probably you need to set 'Predefined Expression' in Numbers tab
Hi Ruben !
How if i have many dimensions ? By what can i replace DIM1 in your exemple in ordrer to make it bynamic ?
Thank you for your response
Am'
You can replace DIM1 by your chart expressions, ie:
<DIM1, DIM2...>
To make it dynamic you can create a variable that returns the dimensions string and use this variable, ie:
variable vDimensions = =If(GetSelected... or =Concat(DimensionSelector, ', ')
// something that returns you the string with dimensions, depens on your model and how works your dynamic chart.
Then use the variable:
Dual(Sum(Sales), Num(Sum(Sales) / Sum(TOTAL <$(vDimensions)> Sales), '#.##0,00%')
Thank you !!