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

show values based on condition


Hello.

I have a table with customers, and there is a measure with count(orders).

How can I show only the customers with count(orders)=0?

I have tried
=if(count(orders)=0 ,[customer],Null())

but this does not work.

Can anybody help me?

1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

Sorry about that.  Looks like I had an extra ")" in my previous post.  Try this:

aggr(only({$<[customer]={"=count(orders)=0"}>} [customer]), [customer])

View solution in original post

4 Replies
GaryGiles
Specialist
Specialist

For you customers dimension, try this expression:

aggr(only({$<[customer]={"=count(orders)=0"}>}) [customer]), [customer])

tursic
Contributor II
Contributor II
Author

Thank you for the answer, but unfortunately it does not work. I get no results at all.

GaryGiles
Specialist
Specialist

Sorry about that.  Looks like I had an extra ")" in my previous post.  Try this:

aggr(only({$<[customer]={"=count(orders)=0"}>} [customer]), [customer])

tursic
Contributor II
Contributor II
Author

Thank you, this works.