Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, I have a data on customers payments by months:
Account_number | 01/01/2018 | 01/02/2018 | 01/03/2018 | 01/04/2018 |
1 | 1000 | 2000 | 3000 | 1000 |
2 | 3000 | 3000 | 3000 | 3000 |
3 | 1000 | 1000 | 1000 | 2000 |
I want to compare between the column of last month to the average of the other months. something like this:
Account_number | 01/01/2018 | 01/02/2018 | 01/03/2018 | 01/04/2018 | Average(1-3/18) | last month/Avarge(previous 3 months) |
1 | 1000 | 2000 | 3000 | 1000 | 2000 | 50% |
2 | 3000 | 3000 | 3000 | 3000 | 3000 | 100% |
3 | 1000 | 1000 | 1000 | 2000 | 1000 | 200% |
How I do this? thanks!
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.