Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zela9123
Contributor
Contributor

Values and Percentage Share in Stacked bar Chart

Hi All,

 

I have created a stack bar chart. Please see below sample data:

Screenshot 2020-07-30 at 13.53.33.png

 

 

 

 

 

As a Dimension - I am using Month, as a Measure: X, Y, Z. Because X, Y, Z have cumulative values, I am using below expression:

=FirstSortedValue([X],-Date) 

=FirstSortedValue([Y],-Date) 

=FirstSortedValue([Z],-Date) 

This is working fine. But I would like to present % share of each stacked bar as well as values. Is there such option in Qlik Sense? 

I checked the forum and I came across to an option like dual function, but it is not working for me.

 

Best Regards,

Zela

 

Labels (1)
3 Replies
Onyi_Nwabia-Robbins
Contributor III
Contributor III

Any chance you have an example of the result you are looking for? Even just an image. 

zela9123
Contributor
Contributor
Author

Hi,

 

Sure. Something like this:

 

189559_Expected Bar Chart Value.png

 

Best regards,

Zela

Onyi_Nwabia-Robbins
Contributor III
Contributor III

Have a look at this post. 
https://community.qlik.com/t5/New-to-Qlik-Sense/Show-two-values-in-bar-chart-in-Qlik-Sense/td-p/1320...

It’s not elegant but it might help. 
otherwise you might need to use an extension

you could also try this, add this in the measure

Dual(Num(Sum(Value), '#,###.') & Chr(10) & Num(Sum(Value)/Sum(TOTAL <Year> Value), '##.##%'), Sum(Value))

holds the number as a value and the % as text.