Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Expression

Hi Friends

I have given nested if using set analysis to retrieve the outstanding amount by comparing years.I dont know where i have done the mistake,i'm getting null result.Please help me out friends.

=if(CE_CLOSE_YN='1' and CE_CLOSE_DT<Today(),0,if(CE_CLOSE_YN>='1' and CE_CLOSE_DT>Today(),(sum({$<Year={"vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}CE_AMT_LC_1))))


Regards

Krishna

14 Replies
Not applicable

expand vCurrentYear

$(vCurrentYear)

Not applicable

also if it is the last 3 years that you want to see you can simply say

$<Year={">=$(vCurrentYear)-3"}

tresesco
MVP
MVP

It depends majorly on your date field format; variable outcome and the place(chart or text box) where you are using this expression. Try to upload your sample qvw.

krishna20
Specialist II
Specialist II
Author

Hi Tresesco

Please find the attachment and in Loss ratio for the filed Claim OS and Earned Premium.I want the data for 2014,2013,2012.Please help me out

Regards

Krishna

krishna20
Specialist II
Specialist II
Author

Hi Tresesco

I'm getting the same result for the Gross Premium and Earned Premium even i applied if else condition.The if else not working properly for the earned premium field.Please check it and guide me further.

Regards

Krishna

krishna20
Specialist II
Specialist II
Author

Hi Ram

Thank you for your Reply.Getting same result after applying the expression  $<Year={">=$(vCurrentYear)-3"}

Regards

krishna

tresesco
MVP
MVP

I am lost in your app., Which Sheet/tab->chart?

krishna20
Specialist II
Specialist II
Author

Sheet name is Loss ratio.straight table

rohit214
Creator III
Creator III

Hi,

Try that

=if(CE_CLOSE_YN='1' and CE_CLOSE_DT<Today(),0,(sum({$<Year={"vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}if(CE_CLOSE_YN>='1' and CE_CLOSE_DT>Today()CE_AMT_LC_1))))

Thanks

Rohit