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: 
heij1421
Partner - Creator
Partner - Creator

How to filter on calculated fields

Hi,

Is there an easy way to filter on calculated fields?

Example:

Country,                    Sales,  margin
Netherlands,           1000,    10%
UK,                              1200,    15%

Now I want answer questions like 'Show me all lines with a margin higher than 12%' or 'Show me all lines with Sales between 900 and 1500'.

The Sales and margin are calculated fields, like SUM(Sales).
With Excel for example I can set a filter on a column header and then filter the lines based on the numbers in that column.

3 Replies
jaygarcia
Contributor III
Contributor III

Hello Heij421,

You could use Expression Search, check this link: https://help.qlik.com/en-US/sense/April2019/Subsystems/Hub/Content/Sense_Hub/Selections/SelectionsTo...

Hope this helps,

Jay

heij1421
Partner - Creator
Partner - Creator
Author

Hi Jay,

 

Thanks for the link, but this is not exactly what I'm looking for. The search on '=SUM(Sales)>700' on the country dimensions only works when you have one dimension I think. Suppose you have a second dimension State in this example:

Country,                    State,    Sales,  margin
Netherlands,           A,           800,      10%
Netherlands,           B,           200,      10%
UK,                              C,           1200,    15%

How can you filter all lines with Sales > 700 (so it displays line 1 and 3)?

jaygarcia
Contributor III
Contributor III

Hi
I see. One way could be to create a filter pane with an expression like this: 
=aggr(sum(Sales),Channel,State)
and then you can search >700 in the filter pane.
regards,
Jay