Question

Last 6 completed months this year versus the same time period in the previous year as a Custom Measures

  • 6 October 2020
  • 0 replies
  • 87 views

Hi All,

I am trying to create a custom measure to get the last 6 completed months (04/2020-09/2020) for the current year and another custom measure to get the 6 months for the same period (04/2019-09/2019) for the previous year to compare against each other in terms of orders count. Below is is my Measure Filter for the for the first custom measure (Last 6 Months),


(extract_months(${orders.create_date}) <= extract_months(now())-1)
AND
${orders.create_date} > add_months(-6,add_months(-1,now()))

I am getting the correct number of orders (I get same number of orders when I filter the create_date to in the past 6 complete months by opening the same explore in another tab) but I am not able to exclude the month of March from the result. Below are my results,



How can I exclude March from the results and also recreate the same result (excluding March obviously) for the same period for the previous year (2019) as a another Custom Measure (Previous Year)?


Any help is appreciated.


Thanks!


0 replies

Be the first to reply!

Reply