Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
greend21
Creator III
Creator III

Have totals and % on bars

I'm using the barsPlus extension to get the values on the bar chart, but I was wondering if there was a way I could get the values to show percentages too. I'm assuming this would be in my expression and maybe with the dual fuction? The help page doesnt really give much detail on Dual() though. Any help is appreciated. Thank you!

2 Replies
petter
Partner - Champion III
Partner - Champion III

Yes you should be able to use the Dual() function for that purpose.

For example:

Dual(1/2*100 & ' %', 34) will display as 50 % while the number part will be 34 just to show that the text part can be entirely different from the numeric part of a dual value.

So in relation to to your expression it might have to look like this:

Dual( Sum(Amount) & '  ' & Num(Sum(Amount)/Sum(TOTAL Amount),'0%') , Sum(Amount) )

The only thing to be aware of is that the text part and the numeric part has to match up so that for every unique number there will be a unique text or it might not work as intended.

greend21
Creator III
Creator III
Author

I'm trying this but it is just showing my original counts, nothing about the percentages.

Dual(Count(ReceivableID)&' '&Num(Count(ReceivableID)/Count(TOTAL DISTINCT ReceivableID), '0%'), Count(DISTINCT ReceivableID))