I want to create a card with last month's sales using Power BI Desktop.
For that, I need a measure that is capable of expressing today "one month ago"
For example, this month's sales is:
This month sales =
VAR ThisMonth =
MONTH ( TODAY () )
RETURN
CALCULATE (
'orders'[SalesAmount];
'calendar'[month_number] = ThisMonth;
'calendar'[year] = 2017
)
All time intelligence functions seem to be good to handle columns of date but not scalar values like this case is.
Also, because I'm using a card, there's no "filter context", therefore, I need a volatile function like TODAY
.
Thanks!