Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi,
I'm looking for a way to display last month in dax. I've come up with this dax :
Use the following code:
LAST_MONTH =
VAR SelectedMonths = VALUES('CalendarTable'[YearMonth])
RETURN
CALCULATE(MAX('CalendarTable'[YearMonth]), DATEADD('CalendarTable'[Date], -1, MONTH), SelectedMonths)
Please accept this as solution, if you got your answer and give kudos
Hi,
Thanks for the answer given but unfortunately it doesn't work. When I select all months it doesn't seem to be displaying the correct month, and when i select one month it just displays blank.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
29 | |
14 | |
11 | |
10 | |
9 |