Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
anindya_manna
Partner - Creator II
Partner - Creator 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?

1 Reply
Gysbert_Wassenaar

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