Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Labels / Percentage Errors

Hey all,

So basically I've created a the following pie chart with the code within the expressions section (each being a seperate expression)

Good       =count({<Q2LastYearScore = {1}, Year = {2011}>} responseid)/ count({<Year = {2011}>} Q2LastYearScore)

Same      =count({<Q2LastYearScore = {2}, Year = {2011}>} responseid)/ count({<Year = {2011}>} Q2LastYearScore)

Worse     =count({<Q2LastYearScore = {3}, Year = {2011}>} responseid)/ count({<Year = {2011}>} Q2LastYearScore)

and the result i get is :

Screenshot_1.png

It shows all the percentages for each section, why is this and how can i change it so it only shows the correct percentage for each section?

5 Replies
Not applicable
Author

Create a calcuated dimension:

if(Q2LastYearScore=1,'Good',if(Q2LastYearScore=2,'Same','Worse'))

and have the expression as

count({<Year = {2011}>} responseid)/ count({<Year = {2011}>} Q2LastYearScore)

You need to have only one expression.

Regards,

Kiran Rokkam.

Not applicable
Author

That gives the following which is not right:

Screenshot_1.png

Not applicable
Author

Can you enable "relative" for the expression?

Regards,

Kiran Rokkam.

Not applicable
Author

once enabled still gives incorrect figures 😕

Not applicable
Author

jaivik:

Pie chart shows the contribution of each elements wrt the total. I noticed that expression has a denominator and hence the chart doesnt add up to 1. Can you remove the denominator and disable relative expression. If it doenst work please share a sample for debug.

Kiran Rokkam.