Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

converting if to set analysis

sum(if(len([Actual FOUR Date])>0 and [Actual FOUR Date] >= date(MakeDate(2012,(vselectMonth),01)) and [Actual FOUR Date] <= date(MakeDate(2012,(vselectMonth),(vlastdate)))
and State='ANDHRA PRADESH'
,Order_In_MW))

Please help me out... change the above if condition to set analysis...

3 Replies
manideep78
Partner - Specialist
Partner - Specialist

Try this,

Sum({<[Actual FOUR Date]={">=$(=date(MakeDate(2012,(vselectMonth),01)))<=$(=date(MakeDate(2012,(vselectMonth),(vlastdate))))"},

            State={'ANDHRA PRADESH'}>}Order_In_MW)

Not applicable
Author

Hi

Try this

if(Len([Actual FOUR Date])>0,

Sum({<[Actual FOUR Date]={">=$(=MakeDate(2012,(vselectMonth),01))<=$(=MakeDate(2012,(vselectMonth),(vlastdate)))"},State={'ANDHRA PRADESH'}>}Order_In_MW),'')

Best of luck

CELAMBARASAN
Partner - Champion
Partner - Champion

No need to check the lenght of datefield here.

sum(if(len([Actual FOUR Date])>0 and [Actual FOUR Date] >= date(MakeDate(2012,(vselectMonth),01)) and [Actual FOUR Date] <= date(MakeDate(2012,(vselectMonth),(vlastdate)))

and State='ANDHRA PRADESH'

,Order_In_MW))

Simply use it as

Sum({<[Actual FOUR Date]={">=$(=date(MakeDate(2012,(vselectMonth),01)))<=$(=date(MakeDate(2012,(vselectMonth),(vlastdate))))"},State={'ANDHRA PRADESH'}>} Order_In_MW)

Hope it helps

Celambarasan