Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm very new on QlikSense but already loving it !
I think I have missed something in the way of building expressions, or maybe what I want to do is not possible, but I can't find a way to do calculate my percentage. Here is an example :
Task | Status | Count |
task1 | ok | 123 |
task1 | failed | 5 |
task2 | ok | 45 |
task2 | failed | 20 |
task3 | ok | 68 |
task3 | failed | 2 |
task4 | ok | 147 |
task4 | failed | 33 |
As you can see, each task can have 2 statuses which can be "failed" or "ok".
I want to get the success rate of each task by calculating the ratio of successful vs failed tasks.
Thanks in advance for any help !
Is this what you want?
successful vs failed or successful vs overall?
Successful vs failed:
Sum({<Status = {'ok'}>}Count)/Sum({<Status = {'failed'}>}Count)
Successful vs overall:
Sum({<Status = {'ok'}>}Count)/Sum(Count)
Sunny already provided an answer
Hi,
Thanks for your fast answer !
I tryed your expression, adding a measure to my simple table, but only the total ration is calculated. All the other rows have 0 value, and I need this ratio for each task.
Is this what you want?
Yes perfect ! Sorry I did not understand that I needed to make an other table.
Now I understand far better how it works !
Thank you for your amazing help !
No problem at all
is there a way to get ratio as non %?
Not sure if I understand your question?
for ex:
if i want the ratio from start to finish .
start: finish
3 6
5 10
20 100
i know how to use expression to get % but i want to show as 3:6 which simplifies to 1:3, and 5:10 will be 1:5 and 20:100 will be 5:25
thanks