Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank Filter and Selection Filter in Set Expression

I am working with incident data in the following format where each row details one registered incident:

IDPriorityComponent
1SevereTill
2ModerateSoftware
...CriticalHardware

I attach some sample data.

I have a list box/field that allows for the user to select the 'Priority' level. I am trying to create a KPI that does the following: Counts the number of incidences - i.e. Count(ID) - only for the priority level selected (or all if none selected) and only for the top 5 components by Count(ID).

I have attempted the following with no joy:

Count({1<[Priority] = P([Priority])>*1<[Component] = {"=Rank(Count([ID]))<=5"}>} [ID])

Any help would be greatly appreciated.

Kind regards,

12 Replies
Not applicable
Author

Sunny, thank you for your continued effort on this! And you are so close with this answer. It is now almost doing what I want with only one small problem...

The output of the function P(Priority) seems to alter if a selection on the component field affects the list of possible Priorities i.e. one of the priorities turn dark grey.qlikexample2.png

Apart from this it is working perfecly.

sunny_talwar

How about this

=Count({1<Ccomponent = {"=Num(Rank(Count({1<Priority = $::Priority>}ID), 3, 1)) <= 5"}, Priority = $::Priority>} ID)

Not applicable
Author

You have done it! That is heroic effort!

I may be worth a small explanation explaining how this works for anyone visiting later...

Thank you very much!