Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

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

10 Replies
sujeetsingh
Honored Contributor III

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

Not applicable

Re: If stmt ?

Hi sujeet,

it was showing error in expression

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?

sujeetsingh
Honored Contributor III

Re: If stmt ?

May be some comma or quotes missing.

OK bracket is missing at right

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

Not applicable

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 ?

Hi

Can you post a sample?

sujeetsingh
Honored Contributor III

Re: If stmt ?

Using match is a good way to do so.

Not applicable

Re: If stmt ?

Hi Anand,

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

Community Browser