3 Replies Latest reply: Apr 24, 2018 1:25 PM by Sunny Talwar

# 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

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

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

Thanks

• ###### Re: Strange behavior in QlikSense trying to create 100% stacked bar

Try this

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

• ###### Re: Strange behavior in QlikSense trying to create 100% stacked bar

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).

Any ideas?

Thanks

• ###### Re: Strange behavior in QlikSense trying to create 100% stacked bar

Would you be able to share a sample?