Forum Discussion
DAX Last Year based on custom date dimension
- 9 months ago
Hi sabd80,
Thank you for reaching out to the Microsoft fabric community forum. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.
I am also including .pbix file for your better understanding, please have a look into it:
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Fabric Community Forum.
Live connection workaround for custom date table:
Last Year Value =
CALCULATE(
[Your Measure],
FILTER(
ALL('Financial Date'[Date]),
YEAR('Financial Date'[Date]) = YEAR(MAX('Financial Date'[Date])) - 1 &&
MONTH('Financial Date'[Date]) = MONTH(MAX('Financial Date'[Date]))
)
)
the date calendar is a customer calendar, the start and end of the date is different from normal calendar, and it changes every year, some months starte on the 2nd or on the 27th.