Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to create the bar chart with X axis values in percentage but the chart value should be shown as Number for Example PA5 should be shown as A=24,B=27,C=1,D=1.Please see the spreadsheet attached for this
Hi,
First you should flatten the table, converting A,B,C,D from columns to values of a single dimension. You can use Crosstable load to do this. Sample script below (I just assume field names "Group" for A,B,C,D and "Metric" for the numeric values).
Data:
Crosstable (Group, Metric, 1) LOAD * INLINE [
PA,A,B,C,D
PA5,24,27,1,1
PA2,31,5,17,0
PA9,38,1,0,14
PA6,3,1,16,32
PA1,2,0,7,44
];
Then you can create a stacked bar chart with 2 dimensions PA and Group, and the following measure:
=Sum(Metric)/Sum(TOTAL <PA> Metric)
Final chart should look like this
Hope it helps!
BR,
Vu Nguyen
Sorry I didn't see your requirement that X axis value should be in % while value labels of the bar charts should be actual number. This is not possible in Qlik Sense as far as I'm aware of - value labels are always in the same scale with axis values.
You may consider having 2 alternative measures: =Sum(Metric) and =Sum(Metric)/Sum(TOTAL <PA> Metric) for end-user to decide which value they want to see. Otherwise you'll need to use an extension.
The closest to it you can get with the default qlik sense bar chart is this:
You can show the values next to the dimension.
Help me to show the chart values in each dimensions.
Hi, the configuration to show value labels is here
That's what I used as a dimension:
=PA &' A: ' &aggr(Sum(['A]),[PA])
&' B: ' &aggr(Sum(['B]),[PA])
&' C: ' &aggr(Sum(['C]),[PA])
&' D :' &aggr(Sum(['D]),[PA])