Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

komi4889
New Contributor

How to add calculated column?

Hi all, I have a data on customers payments by months:

  

Account_number01/01/201801/02/201801/03/201801/04/2018
11000200030001000
23000300030003000
31000100010002000

I want to compare between the column of last month to the average of the other months. something like this:

  

Account_number01/01/201801/02/201801/03/201801/04/2018Average(1-3/18)last month/Avarge(previous 3 months)
11000200030001000200050%
230003000300030003000100%
310001000100020001000200%

How I do this? thanks!

1 Reply
ChennaiahNallani
Contributor III

Re: How to add calculated column?

Current Month:

Sum({<Year=, Quarter=, Month=, Week=, Date={‘>=$(=MonthStart(Max(Date)))<=$(=Max(Date))’}>} Sales)


Previous Month:

Sum({<Year=, Quarter=, Month=, Week=, Date={‘>=$(=MonthStart(Max(Date), -1))<=$(=MonthEnd(Max(Date), -1))’}>} Sales)

Hope this helps you.