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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
mike_spada
Contributor III
Contributor III

AVG and SUM in same chart...

Hi experts,

I have an issue with this scenario: I have these data:

   

Division2014AVG 2014
2 IT       849,00        38,59
3 GRAPHICS                    567,75      113,55
4 ADMINISTRATION    1.221,00      203,50
5 PRODUCTION    6.385,50      187,81
6 SELLINGS       686,00      228,67
7 PURCHASES       331,00      165,50
8 QUALITY    1.707,75      131,37
9 WAREHOUSE       757,75      252,58
11 TOOLS       425,75      212,88
Totals  12.931,50   1.534,44

I want to obtain a chart like the one in the picture attached, in which as dimension I have the Divisions, in left the sum of column 2014 (bar chart) and a line chart which average (column AVG 2014).

I'm trying but don't succeed in build it... anyone can help please?

Thanks,

Mike

Labels (1)
10 Replies
mike_spada
Contributor III
Contributor III
Author

I succeed in make my chart. Thanks to Peter that tell me how to have a chart as required.

For the formula, I use something like this:

Total:

= sum({ 1<    itemCode = {'0353'}, year={$(=Max(year))},month = ,company={$(=Max(company))}>}  amount)

Number of Employees (not shown in chart but calculated with a formula in others part of my app):

sum({ $<itemCode2ndType = {'3603'},year={$(=Max(year))},month={$(=Max(month))}>}  totalEmployees)

Average:

sum({ 1<    itemCode = {'0353'},year={$(=Max(year))},month = ,company={$(=Max(company))}>}  amount)

/

sum({ $<    itemCode2ndType = {'3603'},year={$(=Max(year))},month={$(=Max(month))}>}  totalEmployees)

I don't know if there is a better way to obtain this result... if anyone can see what I don't see 🙂 I am open minded 🙂

Thanks a lot

Mike