Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Kaushik2020
Creator III
Creator III

Filter pane based KPI

Hi all,

I have 3 KPI: High Low and median.
2 filter panes : Category and Year.
I have 3 values in category filter pane: Switches, Router and Access points

When user select Router from category filter pane - the KPI should show High, Low and median for the selection (Router in this case)


But, when the user select any Year from the year filter pane, the KPI should not refresh.
Data in KPI should show Highest price for the category.

Eg:-
Router--> 2021. High =35.22 and LOW=3.02

Labels (2)
3 Solutions

Accepted Solutions
KatjaK
Employee
Employee

Hi @Kaushik2020 , 

please try this idea: 

If you have your KPI 'High' defined as follows: MAX(myMeasureFieldName)

Example 1
Introducing a {1} within the MAX function will make this calculation ignore any selection made: MAX({1} myMeasureField)

However, this calculation will also ignore the selection of your category. 

So the formula of the KPI is adapted in a way, that it ignores any selection except the selection of a category: MAX({1<Category=$::Category>} myMeasureFieldName)

Example 2:

If you would like to ignore only the selection of the Year, and keep all other selections (Category, further selections, that you have on your board), then the formula looks like this: MAX({<Year=>} myMeasureFieldName)

I hope, this solves your problem! 

View solution in original post

Kaushik2020
Creator III
Creator III
Author

thanks a lot. solution in example 1 worked for my requirement. 🙂

View solution in original post

KatjaK
Employee
Employee

If you wish to ignore all selection except Category and Year, then add the same expression in the set analysis block for both fields: 

MAX({1<Category=$::Category, Year=$::Year>} myMeasureFieldName)

View solution in original post

6 Replies
KatjaK
Employee
Employee

Hi @Kaushik2020 , 

please try this idea: 

If you have your KPI 'High' defined as follows: MAX(myMeasureFieldName)

Example 1
Introducing a {1} within the MAX function will make this calculation ignore any selection made: MAX({1} myMeasureField)

However, this calculation will also ignore the selection of your category. 

So the formula of the KPI is adapted in a way, that it ignores any selection except the selection of a category: MAX({1<Category=$::Category>} myMeasureFieldName)

Example 2:

If you would like to ignore only the selection of the Year, and keep all other selections (Category, further selections, that you have on your board), then the formula looks like this: MAX({<Year=>} myMeasureFieldName)

I hope, this solves your problem! 

Kaushik2020
Creator III
Creator III
Author

thanks a lot. solution in example 1 worked for my requirement. 🙂

Kaushik2020
Creator III
Creator III
Author

Also if i wish to add Category and Year, then how we can write in the same example ? 

KatjaK
Employee
Employee

If you wish to ignore all selection except Category and Year, then add the same expression in the set analysis block for both fields: 

MAX({1<Category=$::Category, Year=$::Year>} myMeasureFieldName)

Kaushik2020
Creator III
Creator III
Author

Can I add 3 filter petameters eg: MAX({1<Category=$::Category, Year=$::Year,(3rd filter parameter)>} myMeasureFieldName)  ?

KatjaK
Employee
Employee

Yes, you can add as many parameters as you wish.