Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

chrisbrown1
New Contributor II

Display Value and Percentage in Pie Chart

Qlik Sense provides the option of displaying a value or percentage in a pie chart. How do I display both?

Presentation:

Value labels: Custom->Values

Value labels: Auto->Percentage

Thanks for your help.

Tags (1)
9 Replies
OmarBenSalem
Esteemed Contributor

Re: Display Value and Percentage in Pie Chart

sure:

in u pie chart;

as dimension:

=YourDim&' : '& aggr(num(sum(YourMeasure)/sum(total{<YourDim>} YourMeasure),'#,##0.00%'),YourDim)

as a measure:

sum(YourMeasure)



Under aspect > presentation, show the values:

Capture.PNG

result (per aalogy): Capture.PNG

chrisbrown1
New Contributor II

Re: Display Value and Percentage in Pie Chart

Omar - Thank you for your assistance. Would you mind sending the qvf file for the above?

OmarBenSalem
Esteemed Contributor

Re: Display Value and Percentage in Pie Chart

I can't; it's a qvf containing all of my answers in the community..

ps:Why is ur response helpful and not mine?

chrisbrown1
New Contributor II

Re: Display Value and Percentage in Pie Chart

My mistake Omar. I meant to mark yours as helpful. Thanks again.

OmarBenSalem
Esteemed Contributor

Re: Display Value and Percentage in Pie Chart

Just kidding

chrisbrown1
New Contributor II

Re: Display Value and Percentage in Pie Chart

Omar,

My original Dim = [G-R&D-S]

My original Measure = Sum({<[Funding Agency ID]={5700}>}[Action Obligation])/1000000000

I changed the Dim to:

=[G-R&D-S] & ':' & AGGR(NUM(Sum([Action Obligation])/Sum(TOTAL{[G-R&D-S]}[Action Obligation]),'#,##0.00%'), [G-R&D-S])

But it gives:

Any ideas? It is grammatically correct but does not produce what I was looking for. Thanks

Digvijay_Singh
Honored Contributor III

Re: Display Value and Percentage in Pie Chart

I think it may be like this -

=[G-R&D-S] & ':' & AGGR(NUM(Sum([Action Obligation])/Sum(TOTAL<[G-R&D-S]> Action Obligation]),'#,##0.00%'), [G-R&D-S])

prananellutla
Contributor

Re: Display Value and Percentage in Pie Chart

Hey Omar This is awesome. can we do something similar for bar chart on qlik sense. Instead of %s to show on x-axis , can we show them as number(%) on bar itself. I tried using dual fucntion, its no use. and there are discussions where you can show values next to legend on charts in qlik view. I assume its not something we can do it in sense.

any similar tips /tricks to work with bar chart ?

Piechart legend with both value and Arguments

Show two values in the Pie chart Legend

pedromsouza
Contributor

Re: Display Value and Percentage in Pie Chart

Very helpful. Thanks!

Community Browser