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: 
GMonty
Contributor
Contributor

Button to filter field values less than another field

Hello

I'm creating a dashboard and I want to include a button than when pressed filters to all the weeks where the 'cost' field is less than a corresponding 'target' field.

My table looks something like this:

Week | Cost | Target

1 | £20 | £25

2 | £50 | £70

3 | £100 | £55

4 | £95 | £2

So the button would filter to weeks 3 and 4

Any Ideas?

Thanks

Labels (2)
1 Solution

Accepted Solutions
Nis_Alsheikh
Contributor II
Contributor II

Hello,

You can create a helper field with an IF condition to identify the weeks where Cost < Target. For example:

IF(Cost < Target, 'Yes', 'No') as IS_COST_LESS

Then you can use this field in your app to create a filter button that selects only the “Yes” values. You can add it either in the load script or directly in the design, depending on your setup.

Hope this helped.

View solution in original post

2 Replies
Nis_Alsheikh
Contributor II
Contributor II

Hello,

You can create a helper field with an IF condition to identify the weeks where Cost < Target. For example:

IF(Cost < Target, 'Yes', 'No') as IS_COST_LESS

Then you can use this field in your app to create a filter button that selects only the “Yes” values. You can add it either in the load script or directly in the design, depending on your setup.

Hope this helped.

GMonty
Contributor
Contributor
Author

Amazing, thank you, this seems so obvious now!