Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Strange behavior in QlikSense trying to create 100% stacked bar

I have a really simple set analysis expression below that is dividing current value vs total value to give a % out of 100.

sum([Value])/sum(TOTAL {<[GroupName]=>} [Value])

For some reason when I plot this on a bar chart with 2 dimensions: Period Quarters (PeriodQTRName) + Group (GroupName) it breaks the 100% total by each of the 4 quarters. So if you total all the % (28.0 + 27.1 + 26.9 + 18.1) = 100%. I

Example1.png

And If I just filter for 1 quarter it is working correctly:

Example2.png

I want it to be 100% for each of the quarters. Any ideas why this is happening and how to fix this?

Thanks

3 Replies
sunny_talwar

Try this

Sum([Value])/Sum(TOTAL <PeriodQTRName> {<[GroupName]=>} [Value])

Anonymous
Not applicable
Author

This does appear to be a step closer implementing: Sum([Value])/Sum(TOTAL <PeriodQTRName> {<[GroupName]=>} [Value])


and adding a range 0 to 1 produces the right effect I need however the groupings aren't appearing now. I am summing top 10 and putting everything else into the other bucket (grey).

Ex3.png

Any ideas?

Thanks

sunny_talwar

Would you be able to share a sample?