Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ID | Percentage of time passed |
---|---|
1 | 98 |
2 | 58 |
3 | 101 |
4 | 0 |
5 | 101 |
6 | 100 |
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
Another approach.
calculated dimension:
aggr(if(Percentage>100, 'passed', 'not passed'),ID)
one expression:
count(distinct ID)
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
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
Another approach.
calculated dimension:
aggr(if(Percentage>100, 'passed', 'not passed'),ID)
one expression:
count(distinct ID)
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
Yes Niklas, you guess is right. By clicking on a slice you select the IDs which are defined in this slice.