4 Replies Latest reply: May 22, 2018 5:10 AM by Ugur Arslan

# 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]))

Thanks

Ugur

• ###### 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

• ###### Re: Multiple Dimensions in if sum condition

It worked thanks a lot!!

• ###### Re: Multiple Dimensions in if sum condition

Try this:

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

• ###### Re: Multiple Dimensions in if sum condition

Thanks a lot