Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hi Friends

Hi friends !

i'm having a doubt in applying set analysis for calculating the claims paid of year wise.

Here is my expression

Sum({$<year={">vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}CE_AMT_LC_1)

my output should be

year   ClaimsPaid

2014    324.23

2013    452.12

2012    325.23

Is there any mistake in my expression? please anyone help me out.

Regards

Krsh

3 Replies
Not applicable
Author

Hi Krish

  May I know the clear requirement. You want to see the output for past three years claims right?

if u want like above requirement please find the below expression it will helps you

=sum({$<Year={'>=$(VPrevsecondYear)<=$(VMaxYear)'}>}CE_AMT_LC_1)

Variables:

VPrevsecondYear=max(Year(date(Datefield,'DD-MM-YYYY')))-2

VMaxYear=Max(Year(Date(Datefield,'DD-MM-YYYY')))

Hope this will helps you

Gysbert_Wassenaar

Try Sum({$<year={">=$(vCurrentYear)-2<=$(vCurrentYear)"}>}CE_AMT_LC_1)


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi,

try this

 

sum({<newyear={'$(=max(newyear)-2)','$(=max(newyear)-1)', '$(=max(newyear))'}>}Sales)

If you are using a variable then replace max(newyear) with it.

HTH

ravi n.