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

Applying a dimension filter doesn't affect KPI with same dimension in set analysis

Hello experts,

I can't seem to solve this: I created a KPI with a set analysis inside the measure. Then in a filter pane, I filtered by that same dimension but the KPI doesn't change. 

For example, the dimension is Alert, and it can be RED, YELLOW or GREEN; and the KPI measure: count(<{Alert={'RED'}>}Tickets); Then if I use a filter pane with the Alert dimension and chose GREEN, the KPI remains the same value. It only changes when I apply a different type of dimension, such as date, office, product, etc.

This has to be related on how Qlik evaluates the set analysis. Any thoughts?

 

Thanks

Labels (4)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try an expression like this:

count({<Alert *= {'Green'}>}Tickets) //* indicates union with your current selection in the field

View solution in original post

11 Replies
Vegar
MVP
MVP

This is how Qlik evaluates SET analysis. 

In your example  count(<{Alert={'RED'}>}Tickets)   you are basically saying "count all Tickets using my current selection, but force the selection on the field Alert to be RED."

 

I'm courious, what would you expecting as result from your expression using Alert={'Red'} when selecting GREEN? 

MEBG93
Creator
Creator
Author

Hello Vegar,

So basically I have three KPI showing each of the options (RED, YELLOW and GREEN). If I select GREEN on the filter pane, I just want to show the GREEN tickets. So the RED and YELLOW KPI should show 0.

Thanks

Kushal_Chawda

This you can achieve it using Qlik's default functionality. 

With expression Count(Ticket), if you select particular Alert, it will automatically display the value for that particular alert. But if nothing is selected and you want default to Red and then based on selection you want to change then you can do something like below

=if(getselectedcount(Alert)=0,Count({<Alert={'Red'}>}Ticket),Count(Ticket))

Vegar
MVP
MVP

Try an expression like this:

count({<Alert *= {'Green'}>}Tickets) //* indicates union with your current selection in the field

MEBG93
Creator
Creator
Author

Brilliant! it's exactly what I need

Kushal_Chawda

@Vegar  Don't know but somehow this *= does not work in Qlik sense

Vegar
MVP
MVP

Yes it does work in Qlik Sense.

No selectionNo selection

Select REDSelect RED

See attached qvf file 

Kushal_Chawda

@Vegar  sorry actually I misunderstood. I thought requirement is to show KPI using single object. But here it required 3 KPI objects. Anyway thanks.

Vegar
MVP
MVP

I assume my solution fits his/her needs as @MEBG93  marked my answer as a accepted solution.