Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a donut chart and the labels are male and female. Now the data values are coming inside the donut chart and the labels are outside the donut chart. Is there any way i can put data values under the label. So i am looking for Female(22.11K) and Male(37.47K)
Thanks
It's a good point. Let me try it on the Cloud version.
Okay, so I put this in Qlik Cloud using the standard Pie Chart.
Dummy Data:
Gender:
load * Inline [
Gender, Column
Female, 22000
Female, 1100
Male, 37000
Male, 400
Male, 200
];
Dimension: Slice
=dual(Gender & ' ' & num(AGGR(Count(distinct[Column] ),Gender)/1000,'#,###K')
& ' (' & num(AGGR(Count(distinct[Column] ),Gender)/AGGR(COUNT(total DISTINCT [Column]), Gender),'#0.0%') & ')',
num(AGGR(Count(distinct[Column] ),Gender)/1000,'#,###K') )
Measure: Angle
Count(distinct Column)
Appearance > Presentation > Donut Chart
Value Labels Off
Custom > None
These are the only steps I took in creating the below chart.
You could try simplifying down to just the Dimension and the amount and break it down.
=dual(Gender & ' ' & num(AGGR(Count(distinct[Column] ),Gender)/1000,'#,###K')
,num(AGGR(Count(distinct[Column] ),Gender)/1000,'#,###K') )
I did notice when I copied and pasted the above into the dimension that if it wasn't on the top line it would add an extra "=" sign which caused the same error you saw above.
Let me know how you go.
Thanks
Anthony
Hey,
This is great, thank you! I do want to point something out though, if anyone has found this and is experiencing the same issue as me:
Because you're converting your dimension into a Dual, if two of the values are the same, it will only display the first one. It looks like here you're in the thousands, and with only two dimensions, so it's unlikely you'll get an exact match.
But for the purpose I was using it, there were two segments with exactly the same value, and so one just did not show up.
Since I'm not actually using the numeric value of the dual, I just added an arbitrary differing value to each (in my case the length of the text of the dimension, as they all happen to be different) so that they would always differ.