Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Year Comparison in Pivot table

Hi all,

I would like to create a pivot table with comparing the sales amount by years in month.

How to set in set analysis??

BEst REgards,

Louis

1 Reply
ChennaiahNallani
Creator III
Creator III

try like below

Expression for Current Year:- =SUM({$<DateField = {'>=$(=YearStart(Today()))<=$(=MonthEnd(Today()))'}>}sales)

Expression for Previous Year:- =SUM({$<DateField = {'>=$(=AddMonths(YearStart(Today()),-12))<=$(=AddMonths(MonthEnd (Today()),-12))'}>}sales)