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: 
Anonymous
Not applicable

Select based on expression

Is it possible dispaly in a chart only those records where the output of an expression in that chart meets a criteria?  Say the expression output is 1 or 0, and I only want to view those records where it is 1.  I know I should probably put a flag in the script and use that as a dimension, but I cannot do that at this time.

1 Reply
Miguel_Angel_Baeyens

Hi,

You will need to use the original expression in a conditional then. Say Count(FileNo) is your original expression that returns 1 or 0, and that the expression that you want to use is Sum(ByteSize) if that expression equals to 1:

If(Count(FileNo) = 1, Sum(ByteSize))

The If() will slow your chart considerably though, so think on that flag field or something to improve performance if you have some thousands of rows.

Hope that helps.

Miguel