Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

If statement

In Qlik Sense, I have a table with two fields: Customer, Status. I only want to show those customers with status: open or paused.


My function for Customer dimension is like:

if(match(Status, 'open', 'paused'), Customer).  But it doesn't work. How can I fix this?

Thanks in advance!

1 Solution

Accepted Solutions
sunny_talwar

May be try this

Aggr(Only({<Status = {'open', 'paused'}>} Customer), Customer)

View solution in original post

5 Replies
sunny_talwar

May be try this

Aggr(Only({<Status = {'open', 'paused'}>} Customer), Customer)

PabloTrevisan
Partner - Creator II
Partner - Creator II

Hi,

in this case, you can try to limit in WHERE clause.

LOAD
     Customer, Status

from ....

WHERE Status = 'open' and Status = 'paused';

If is in the application the expression works here.

=if(Match(Status,'open','paused'),Customer)

Note that you need to exclude null to only apears open and paused.

It help's ?

wanyunyang
Creator III
Creator III
Author

Thank you Sunny! It works!

May I have one more question? If one customer has both open and paused status, will this function show them both?

Chanty4u
MVP
MVP

yes it will

wanyunyang
Creator III
Creator III
Author

Thank you!