Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
Is there an easy way to determine the average of two percentage values? In the example below I want to determine the average of pie chart 1 and 2. Ive set the pie chart on option 'relative' so that it shows the percentages of the actual values. (the pie charts below it)
But now I want to determine the average of those percentages. (% + % ) /2 = average%
But this cannot be done because the actual values qlikview calculates with are the real values in the graphs below it. Therefor giving faulty percentages. How can I do this>?
'Relative' does the following calculation:
Count({<operator={'T'}>} object) / Count({<operator={'T'}>} TOTAL object)
Your average will probably be:
=( Count({<operator={'T'}>} object) / Count({<operator={'T'}>} TOTAL object) +
Count({<operator={'O'}>} object) / Count({<operator={'O'}>} TOTAL object) ) / 2
what is the expression for %?
You will have to calculate the average in full for the 3rd pie chart - it is not possible to get the calculation results from the other charts.
BTW - I think a pie chart is always relative - all that selecting relative would change is how the numbers are displayed in the legend and in the chart itself (if that option is enabled).
expresion: Count({<operator={'O'}>} object)
dimension: Number
So it counts the amount of objects to the Number dimension.
For the second pie chart
expresion: Count({<operator={'T'}>} object)
dimension: Number
Now in my third pie chart I want the average of the two percentages of the O and T operator.
Now I did: (which is totally wrong)
expresion count( {<operator={'O','T'}>} object)
dimesnion: Number
The relative checkbox, makes the actual values change to percentages. But I cannot reuse those percentage as Jonathan says. I was wondering if there was an option for that. Seems I have to calculate the number by hand then.
Can you post some sample data with expected output?
'Relative' does the following calculation:
Count({<operator={'T'}>} object) / Count({<operator={'T'}>} TOTAL object)
Your average will probably be:
=( Count({<operator={'T'}>} object) / Count({<operator={'T'}>} TOTAL object) +
Count({<operator={'O'}>} object) / Count({<operator={'O'}>} TOTAL object) ) / 2
Yes this is indeed correct.
Makes sense now thank you.