Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Same Day Last Month

Hi, Today is 9th Oct 2023 but in measure i want to show data of 9th Sep 2023 and i want it using time intelligence functions please help.
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    Based on your statement, I make a new expression You can check the result as follows:

     

    Measure:

     

    Last month same day = 
    var _pre= EOMONTH(MAX('Table'[DATE]),-1)
    return DATE(YEAR(_pre),MONTH(_pre),DAY(MAX('Table'[DATE])))

     

     

    Perhaps this will work, and if you have any questions, please provide me a simple sample to make sure we can better solve the problem for you!

     

    An attachment for your reference. Hope it helps.

     

    Best regards,

    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.