Calculate MoM% and QoQ calculation within a Date range

Hello,

I am looking to do a YoY%, MoM% and QoQ% difference for the following data within a date range. I currently used this calculated fields below which worked ok if the date range picked is for 1 month for example 1st -31st July:

Current Period: ifelse({snapshot_day}>=${StartDate} and {snapshot_day}<=${EndDate},1,0)

Same Period Last Year: ifelse({snapshot_day}>=addDateTime(-1,‘YYYY’,${StartDate}) AND {snapshot_day}<=addDateTime(-1,‘YYYY’,${EndDate}),1,0)

YoY %: sum({Current Period}) / sum(Same Period Last Year}) -1

I need the MoM% and QoQ% to populate if lets say 6 months are picked in the date range as indicated below:

Please check out this article as it should answer your questions.

1 Like

Hi @wangerkc - Did @Max’s suggestion help answer your question? If so, please help the community out by marking it as “Solution!”

Regards,
Karthik

Hi Karthik, I am still trying to work on this so not yet completed, hence why i have not yet marked as solution

Hello,

Just a quick update i finally managed to get the recommended solution to work as indicated below, so a big thanks to you Max.