Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wanyunyang
Contributor

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

Re: If statement

May be try this

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

5 Replies

Re: If statement

May be try this

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

PabloTrevisan
Contributor II

Re: If statement

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
Contributor

Re: If statement

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
Esteemed Contributor III

Re: If statement

yes it will

wanyunyang
Contributor

Re: If statement

Thank you!

Community Browser