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

Showing different content when filters are selected

Hi,

I am using a gauge in one of my dashboards with 3 colors red, green and yellow, and i am trying to get a condition where if i don't select any filters then the gauge operates according to one condition but if i select a filter then it operates according to that. 

I am currently hard-coding the color gradient values because I cant find any other option, but because of that when i select any filters the gauge shows really low values.

Is there a way to write a condition to check whether a filter is selected or not? I'd like to keep the values without any filters because they are going to remain fixed no matter how much data i add, but i also want the condition to change when i select a filter.

3 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

You can use the GetSelectedCount function to determine whether there are values selected in your filtered field

 

GetSelectedCount([Your Field Name]) > 0

 

would indicate that there is at least one value selected

rish
Contributor III
Contributor III
Author

hi marcus,

 

thanks for the solution. is there a simple way i can do this for multiple fields? i am thinking of using GetSelectedCount with nested if loops but that would be a very big and complicated command

rish
Contributor III
Contributor III
Author

is there any simple way or command that could help me detect which filter is being picked and then set values according to that?