10 Replies Latest reply: Jun 4, 2014 3:11 AM by Anand Chouhan

# If stmt ?

Hi,

fabs(Sum({<[Transaction Type]={'C'},Year={2014},Month={'May'},Week={'18','19','20'}>}[Movement Quantity]))

Convert this set analysis into if Condition

Regards,

Helen

• ###### Re: If stmt ?

fabs(Sum(if([Transaction Type]='C' and Year=2014 and Month='May' and Week='18','19','20',[Movement Quantity]))

Hope it helps

• ###### Re: If stmt ?

Hi sujeet,

it was showing error in expression

• ###### Re: If stmt ?

May be some comma or quotes missing.

OK bracket is missing at right

• ###### Re: If stmt ?

Hi

Try like this

fabs(Sum(if([Transaction Type]='C' and Year=2014 and Month='May' and Match(Week,'18','19','20'),[Movement Quantity])))

But why you need to convert into if statement?

• ###### Re: If stmt ?

I am having the data for all weeks, But I want to display the data only for the weeks of May(18,19,20).

It means WTD analysis..

using above Expression i am getting the data for all weeks , i want to display only 18,19,20

• ###### Re: If stmt ?

Try with this expression also

Fabs(Sum(if([Transaction Type]='C' and Year=2014 and Month='May' and Match(Week,18,19,20),[Movement Quantity]))

• ###### Re: If stmt ?

Hi Anand,

I am getting all the weeks of Data, and also that column data i am getting Zero.

• ###### Re: If stmt ?

Can you share some sample data.

• ###### Re: If stmt ?

Using match is a good way to do so.