Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ProfPhidd
Partner - Contributor
Partner - Contributor

Displaying Last Year as a column in a table.

I want to show my Buyers(sales people) as rows and then show Sales.lastYear as columns.

 

Here is my expression but its not returning Last Year's Sales.  Is there a CurrentYr(), PreviousYr() or other Relative Date function in Qlik Sense like we have in IBM Cognos?

 

=sum({$<PriorYr={$(Year(TRANSACTION_DATE),-1)}>} SALES)

 

Labels (2)
1 Reply
Or
MVP
MVP

A set analysis expression should be phrased as SomeField = {SomeValue}, so you would be looking at something like

=Sum({<TRANSACTION_DATE= {"=Year(Today())-1"} >} SALES)

I'm not aware of a current year or previous year direction functions, but they seem rather unnecessary considering Year(Today()) is available. If you're so inclined, you can set up a variable or field in your app using Year(Today()) and reference that field or variable.