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: 
ugurarslan
Creator
Creator

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

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

sum(if(

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


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

sum(if(

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


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jonathandienst
Partner - Champion III
Partner - Champion III

Try this:

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
ugurarslan
Creator
Creator
Author

It worked thanks a lot!!

ugurarslan
Creator
Creator
Author

Thanks a lot