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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Set Analysis

Hi,

I'm having data from 1995 to 2007 only. I need to show the 2007 data as current year and Previous Year as 2006.

I created a variable in Load Script as

SET VCurrentYear=Year(Today());

I used this variable in set analysis.I'm not getting the data .I don't know where i went wrong.

Num(Sum({<[Payroll year]={$(=vCurrentYear)-8}>}RESULT_VALUE),'#,###.00')

I checked $(VCurrentYear)-8 in the Text Object it's showing the year as 2007. But in set analysis its not working.

Can anyone please suggest me.

Regards

krishna

13 Replies
krishna20
Specialist II
Specialist II
Author

Hi Sunny,

It's VCurrentYear

sasiparupudi1
Master III
Master III

=Num(Sum({<[Payroll year]={"=$(vCurrentYear)-8"}>}RESULT_VALUE),'#,###.00')

sunny_talwar

If this worked for you in a text box object -> $(VCurrentYear) - 8 (Gave you 2007), then this should work:

Sum({<[Payroll year]={"$(=$(VCurrentYear)-8)"}>}RESULT_VALUE)

krishna20
Specialist II
Specialist II
Author

It's Perfect Sunny !!!

Thank you sunny and Thank you all.