Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Help with Pie chart Expressions

Hi,

I have 5 Guage charts with the following expressions:

Guage 1: sum  ( {<[Stock Movement Reason Code] ={3,5,16,18}, Dept={'N'}>} StockValue)/Sum({$<[Stock Reason]=,Dept={'N'}>}SalesValue)

Guage 2: sum  ( {<[Stock Movement Reason Code] ={3,5,16,18}, Dept={Y}>} StockValue)/Sum({$<[Stock Reason]=,Dept={Y}>}SalesValue)

Guage 3: sum  ( {<[Stock Movement Reason Code] ={3,5,16,18}, Dept={M}>} StockValue)/Sum({$<[Stock Reason]=,Dept={M}>}SalesValue)

Guage 4: sum  ( {<[Stock Movement Reason Code] ={3,5,16,18}, Dept={L}>} StockValue)/Sum({$<[Stock Reason]=,Dept={L}>}SalesValue)

Guage 5: sum  ( {<[Stock Movement Reason Code] ={3,5,16,18}, Dept-={L,M,Y,N,U}>} StockValue)/Sum({$<[Stock Reason]=,Dept-={L,M,Y,N,U},[Ret Comm Group]-={'359'}>}SalesValue)

these expressions give me the Waste % of Sales value per Dept. Guages 1-4 are for depts N,Y,M and L ,and guage 5 is for everything else but also excludes dept u and comm grp 359.

I have been asked to replace the 5 guages with 1 pie chart giving the same info. The problem i have got is i do not know how to get it to display all of this info on the same chart.

Can anyone help please?

4 Replies
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi everyone. Does anyone have any ideas on this?

IAMDV
Master II
Master II

Chris - Please can you post the QV document with sample data? It will be easy to work with the data.

Thanks - DV

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi DV, thanks for your reply, although i have been thinking about it and i don't think what i have been asked to do is possible in a pie chart, as the chart would need to add up to 100% but i don't know how i would get that from % of sales.

I have attached some sample data if you want to look at to see if i am correct or not.

Thanks

IAMDV
Master II
Master II

Hi Chris,

I have looked at the QV file. Yes, if we are showing in Pie Chart then we need to group all the metrics to add up 100%. So the best I would suggest is to assign weighting for all the 5 metrics. I mean assign 20% weighting for each metric and calculate it against 100%. Once you have these values then you can plot the Pie Chart.

I hope this helps!

Cheers - DV