Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis - percentage calculation

Hi all,

I have a question for you regarding the problem that happens me occasionally while I use set analysis.

Set analysis:

% of late deliveries:

count({$<[delivery status]={"LATE"}>} [DELIVERY NOTE UNIQUE ID])/(Count([DELIVERY NOTE UNIQUE ID]))*100

% of deliveries on time:

count({$<[delivery status]={"ON TIME"}>} [DELIVERY NOTE UNIQUE ID])/(Count([DELIVERY NOTE UNIQUE ID]))*100


Delivery note can have 2 statuses: ON TIME or LATE (there is no third possibility).


This analysis shows correct results in all cases, expect for one. In the case when I select either filter "ON TIME" or "LATE", I get calculated % values that are above 100%, or the sum of these two values is higher than 100% (what is not expected).


Have other people faced situation that % value calculated with set analysis is higher then 100%, and how you resolved it?


Regards

Vera

14 Replies
Not applicable
Author

Hi Manish,


This is good progress, but I still don't get fully correct values. After I added *, when I select "on time" status, I get: 0% for "Late" deliveries (what is correct) and <100% for "on time" deliveries (what is not correct because it should be 100%).

Basically, selection of filter On time/late excludes opposite value from calculation, but it doesn't recalculate value, but it keeps the one before I selected "on time/late" filter.

I think that the problem is denominator because in some way it should also be sensitive to the selection made in the field "delivery status".

Thanks for helping!

Regards

Vera

MK_QSL
MVP
MVP

It would be better if you provide few lines of sample data and let us know what exactly you are looking for; Believe me you issue is not very complex. But due to lack of data or sample application, people are not taking interest in replying.

Once you upload a sample data or sample application, you can have answer within an hour which you are trying to get since yesterday.

MK_QSL
MVP
MVP

My last try. If this will not work.. I need sample data.

=Num(count({$<[delivery status]*={"LATE"}>} [DELIVERY NOTE UNIQUE ID])/(Count({<[delivery status]*={"ON TIME","LATE"}>}[DELIVERY NOTE UNIQUE ID])),'#0.0%')

and

=Num(count({$<[delivery status]*={"ON TIME"}>} [DELIVERY NOTE UNIQUE ID])/(Count({<[delivery status]*={"ON TIME","LATE"}>}[DELIVERY NOTE UNIQUE ID])),'#0.0%')

Not applicable
Author

This is the answer I was looking for! Thanks for advise.

Good tip for samples. I'll prepare the test sample next time when I have a problem.

Not applicable
Author

Hi Eerno,


Thanks for your comments. It seems Manish managed to help me! I'll pay attention next time to prepare example to make communication easier.


Regards

Vera