Reputation: 54
I am trying to show the last month Cost by default on the page in a Card visual. with no filter selected, it should show the last month Cost (in our case, show September Cost).
Measure Formula:
Cost (LM) = CALCULATE([Total Cost], PREVIOUSMONTH(DATESYTD('Calendar'[Date])))
I added DATESYTD as in this hack worked for Last Year's Cost measure.
Upvotes: 0
Views: 23
Reputation: 54
I did some digging and I found out 2 issues:
Upvotes: 0
Reputation: 1
Simply focus on PREVIOUSMONTH directly without DATESYTD since it is typically used for cumulative totals over a year and not only for the last month :
Cost (LM) =
CALCULATE([Total Cost], PREVIOUSMONTH('Calendar'[Date]))
Upvotes: 1