Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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

Re: Labels / Percentage Errors

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

Re: Labels / Percentage Errors

That gives the following which is not right:

Screenshot_1.png

Not applicable

Re: Labels / Percentage Errors

Can you enable "relative" for the expression?

Regards,

Kiran Rokkam.

Not applicable

Re: Labels / Percentage Errors

once enabled still gives incorrect figures :-/

Not applicable

Re: Labels / Percentage Errors

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.

Community Browser