Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join us March 10th, 7 Ways Modern Analytics Can Help You Take Smarter Action. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator II
Creator II

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)

View solution in original post

PabloTrevisan
Partner
Partner

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 II
Creator II

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
Champion III
Champion III

yes it will

wanyunyang
Creator II
Creator II

Thank you!