Forum Discussion
Same Day Last Month
- Anonymous2 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.
Thanks for reply.
It is showing 1st Sep 2023 to 9th Sep 2023 data but i want to show only 9th Sep 2023 data
- 123abc2 years ago
Community Champion
plz use below DAX:
SameDayLastMonth =
CALCULATE(
SUM('YourTable'[YourMeasure]),
FILTER('YourDateTable', 'YourDateTable'[DateColumn] = DATE(2023, 9, 9))
)In this modified formula:
- FILTER('YourDateTable', 'YourDateTable'[DateColumn] = DATE(2023, 9, 9)) filters the 'YourDateTable' to only include the rows where the date matches September 9, 2023.
This way, the SameDayLastMonth measure will specifically show data for the 9th of September 2023, as you requested.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.