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: 
StuartJohnson
Contributor
Contributor

Working with YearName in expressions

Hi All,

 

I'm trying to populate a pivot table with sales data for this and last financial years. Currently i can do that for this year using the following expression: =sum({<[FYear] = {"=YearName(Today())"}>}[Units]).

however if i try and do the same for last year using the expression: =sum({<[FYear] = {"=YearName(addyears(Today(),-1))"}>}[Units]), i get the same data for both columns.

 

Can someone explain where/why i'm going wrong please.

20 Replies
StuartJohnson
Contributor
Contributor
Author

Thank you so much for your help and your explanation. I still have a lot to learn.