Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ugurarslan
New Contributor

Multiple Dimensions in if sum condition

Dear,

If have a dimension called product, which includes the following companies:

1. Peer

2. Apple

3. Banana

I need to calculate the if condition based on multiple condition in an if statement.

if I write the following I get a result:

sum(if([Product]='Peer' and [AR Event Date]<=EOM_Date,[AR Amt USD]))

but If I want to use the same expression on multiple products I get zero result:

sum(if(

[Product]='Peer', 'Aplle' and [AR Event Date]<=EOM_Date,[AR Amt USD]))


Can you please help me?

Thanks

Ugur

Tags (1)
1 Solution

Accepted Solutions

Re: Multiple Dimensions in if sum condition

Try this,

sum(if(

wildmatch([Product],'Peer', 'Aplle') and [AR Event Date]<=EOM_Date,[AR Amt USD]))


Regards,

Kaushik Solanki

4 Replies

Re: Multiple Dimensions in if sum condition

Try this,

sum(if(

wildmatch([Product],'Peer', 'Aplle') and [AR Event Date]<=EOM_Date,[AR Amt USD]))


Regards,

Kaushik Solanki

MVP
MVP

Re: Multiple Dimensions in if sum condition

Try this:

Sum({<[Product]={'Peer', 'Apple'}>} If([AR Event Date] <= EOM_Date, [AR Amt USD]))

ugurarslan
New Contributor

Re: Multiple Dimensions in if sum condition

It worked thanks a lot!!

ugurarslan
New Contributor

Re: Multiple Dimensions in if sum condition

Thanks a lot