Skip to main content

Calculate the last day of the last fully completed month. Call the calculation [Last Day of Last Full Month]:

 

// Last Day of Last Full Month

DATETRUNC("month", [Max Date] + 1) - 1

Calculate the start of the last fully complete month. Call the calculation [First Day of Last Full Month]:

 

// First Day of Last Full Month

DATETRUNC("month", [Last Day of Last Full Month])

Now create another calculation called [Most Recent Month]:

 

// Most Recent Month

[Order Date] >= [First Day of Last Full Month]

AND

[Order Date] <= [Last Day of Last Full Month]

2 answers
  1. Nov 8, 2022, 12:10 PM

    // Max Date

     {MAX([Order Date])}

    The last day is based on the last day in the data set which is actually May 17, 2020

    Your formulas did work, I guess better to use yours more for automation in the real world?

0/9000