Announcements
cancel
Showing results for
Did you mean:
Contributor III

## Show the cost percentages of the legend on a pie chart

Hi everybody,

I would like to make a pie chart where to report the sums of costs in the legend and the percentages on the chart.

How can I do? I attach the files

thank you

Labels (3)

• ### Sum Total

7 Replies
Partner - Master III

try something like below

dual( your_sum_expression & '  - ' & your_percent_expression,your_sum_expression)

Contributor III
Author

Hello,with your expression I don't get what I want.

The bar chart has no dimension but only five expressions of which the "Costo Dipendenti" is calculated from one table and the remaining costs from another table according to the categories. I would like to make the following chart:

thank you

Contributor III
Author

even so it's fine:

check the formula used for example for the cost "Costo dipendenti":

dual(
SUM(AGGR(MAX({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti]),[% Id Emolumenti]))
/
(SUM({<[Master Calendar Date Calc]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>}[# Imponibile Squadra]) + SUM({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti]))

& '  - ' &

( SUM(AGGR(MAX({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti]),[% Id Emolumenti]))

/

(SUM({<[Master Calendar Date Calc]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>}[# Imponibile Squadra]) + SUM({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti]))) * 100,

SUM(AGGR(MAX({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti]),[% Id Emolumenti]))

/

(SUM({<[Master Calendar Date Calc]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>}[# Imponibile Squadra]) + SUM({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti]))

)

thank you

Contributor III
Author

First mistake I made in the first expression I just have to put the cost and enter the Num function with formatting.
I already got such a thing using this expression:

Dual(
Num(SUM(AGGR(MAX({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti]),[% Id Emolumenti])),'€ #.##0,00;-€ #.##0,00')

& ' (' & Num(SUM(AGGR(MAX({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti]),[% Id Emolumenti]))
/
(SUM({<[Master Calendar Date Calc]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>}[# Imponibile Squadra]) + SUM({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti])),'#.##0,00%')

&')',Num(SUM(AGGR(MAX({<[Mese Emolumenti]={">=\$(=\$(vInizioPC))<=\$(=\$(vFinePC))"}, Anno=,Mese=,Giorno=>} [# Importo Emolumenti]),[% Id Emolumenti])),'€ #.##0,00;-€ #.##0,00')
)

how can it be solved?

thank you

see the attached

Contributor III
Author

Hello kush1,

my files are attached in the initial post, however I think that what I request is not feasible. My pie chart has no dimensions but only five expressions. The problem is that I can't get both the euro currency in the legend and the% in the chart.

regards

Former Employee

Max, I believe you are correct after looking over the Help, if you want to have a look for yourself, here is the link:

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Pie_Chart.htm

I checked one of the sample apps that has a pie chart in it, and it is setup like what you ended up with in that the legend had values, but that was it, nothing in the pie slices as you wanted, and I cannot see anywhere that you could add this even with a Dimension.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Community Browser