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: 
JulieMcD240
Contributor II
Contributor II

MIN expression to exclude 0 value

I am trying to get the min value of age for a group that excludes 0 (0 represents unknown age). I have the following expression that is not working.  Any help would be greatly appreciated.

MIN({<[STATUS1]={'A'},[STATUS2]={'B'}, AGE={'<>0'}>} AGE)

DataSet:

STATUS1 STATUS2 AGE
A B 25
A B 18
A B 0
A B 0
B A 22
B A 0
Labels (1)
3 Solutions

Accepted Solutions
Kushal_Chawda

@JulieMcD240  you are using <>0 which is search condition in set analysis . You need double quotes to apply this filter

MIN({<[STATUS1]={'A'},[STATUS2]={'B'}, AGE={"<>0"}>} AGE)

View solution in original post

BrunPierre
Partner - Master II
Partner - Master II

Like this  perhaps.

MIN({<[STATUS1]={'A'},[STATUS2]={'B'}, AGE-={0}>} AGE)

View solution in original post

JulieMcD240
Contributor II
Contributor II
Author

Thank you.  Yes, this worked!

View solution in original post

7 Replies
BrunPierre
Partner - Master II
Partner - Master II

Have you already tried to uncheck 'include zero values' under the dimension or under Add-Ons-> Data handling?

JulieMcD240
Contributor II
Contributor II
Author

Yes, but no luck.  I checked Supress Zero Values under Data Handling but the MIN still comes out 0.  Thank you.

Kushal_Chawda

@JulieMcD240  you are using <>0 which is search condition in set analysis . You need double quotes to apply this filter

MIN({<[STATUS1]={'A'},[STATUS2]={'B'}, AGE={"<>0"}>} AGE)

BrunPierre
Partner - Master II
Partner - Master II

Like this  perhaps.

MIN({<[STATUS1]={'A'},[STATUS2]={'B'}, AGE-={0}>} AGE)

Prem0212
Creator
Creator

This expression will work for you.

Min({<Age=-{0}>}Age)

 

Please like and accept the solution if u find an answer

 

JulieMcD240
Contributor II
Contributor II
Author

Thank you.  Yes, this worked!

Kushal_Chawda

@JulieMcD240  Mark appropriate answers as correct solution