Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

tiklam_dynasys
Contributor

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
Contributor III

Re: Year Comparison in Pivot table

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)

Community Browser