Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help with pie chart and grouped values

Hi!

I'm new to Qlikview and I'm having some problems with a pie chart.

I have a database with two columns, these columns are as follows:

Record IDPercentage of time passed
198
258
3101
40
5101
6100

The time passed has a maximum value of 101, which means the time of delivery has been passed. I want to plot these values as two pieces in a pie chart, where one contains the number of records with the values for percentage of time passed between 0 and 100, and one piece contains records with the value 101.

This data is from a Ticket system, and the purpose of this pie chart is to show how many records have passed their SLA.

What dimensions and expression would I use in my pie chart to accomplish this?

Thank you in advance

/Niklas

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Another approach.
calculated dimension:

aggr(if(Percentage>100, 'passed', 'not passed'),ID)

one expression:

count(distinct ID)

View solution in original post

5 Replies
Anonymous
Not applicable
Author

You can use the following expressions on your pie chart:

Greater than 101: Count({$<Percentage={">=101"}>}ID)

Between 0 and 100: Count({$<Percentage={"<=100"}>}ID)

You don't need to difine any dimensions.

Regards,

Gabriel

jyothish8807
Master II
Master II

Hi Niklas,

Create two expression:

count({<percentgeoftimepassed-={'101'}>}Recordid)

count({<percentgeoftimepassed={'101'}>}Recordid)

Do you have any other field which you can take as dimension?

Other wise generate a field in script.

Hope it works

Regards

KC

Best Regards,
KC
Anonymous
Not applicable
Author

Another approach.
calculated dimension:

aggr(if(Percentage>100, 'passed', 'not passed'),ID)

one expression:

count(distinct ID)

Not applicable
Author

Thank you very much for your very quick help everyone.

All of your suggestions worked, but I went with Michales solutions as it allowed me to make selections in the pie chart which transferred to the other charts. I guess that's because it used a defined dimension?

Nonetheless, all your solutions helped me understand expressions and dimensions better. Thank you very much.

/Niklas

Anonymous
Not applicable
Author

Yes Niklas, you guess is right.  By clicking on a slice you select the IDs which are defined in this slice.