Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

anindya_manna
Contributor II

How to create pivot table with last 3 months purchase?

Hi,

I want to create a pivot table exactly as below. I have channel name ,Purchase value, month,year in DB. How I can create last 3 months purchase in column value?

Tags (2)
1 Reply

Re: How to create pivot table with last 3 months purchase?

Perhaps with an expression like

sum({<month={">=$(=max({<year={`$(=max(year))`}>}month)-2)<=$(=max({<year={`$(=max(year))`}>}month))"}>}[Purchase value])

And perhaps not. It depends on what kind of data values your month field contains. Strings like 'Jul' and 'Aug' won't work in the above expression.


talk is cheap, supply exceeds demand
Community Browser