Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi! I am trying to have a % change month over month kpi indicator for sales, based on the selection of a date.
I am thinking on using set analysis for this, to grab the max of current month minus max of current month -1.
However I would lik to know if any of you have a simple way to calculate MoM %
Any help would be appreciated!
Try this
Sum({<Date = {"$(=Date(Max(Date)))"}>} Sales) / Sum({<Date = {"$(=Date(AddMonths(Max(Date), -1)))"}>} Sales) - 1
Previous month:
Sum({$<[month_year]={"$(=Date(AddMonths(Max(month_year), -1), 'MMM-YYYY'))"}>} sales)
For current month:
Sum({$<[month_year]={"$(=Date(Max(month_year), 'MMM-YYYY'))"}>} sales)
MOM%
(Sum({$<[month_year]={"$(=Date(Max(month_year), 'MMM-YYYY'))"}>} sales)
-
Sum({$<[month_year]={"$(=Date(AddMonths(Max(month_year), -1), 'MMM-YYYY'))"}>} sales))
/
Sum({$<[month_year]={"$(=Date(AddMonths(Max(month_year), -1), 'MMM-YYYY'))"}>} sales)
you have to adjust date formats based on your date .