Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I am creating a measure through which whatever date range is being selected in date filter get the max year for it and calculate the spend for that year for all Qtr's of which data is being present.
Kindly review the below measure which I have created and attachement and please suggest the way forward for it. I need the total spend for Max year disregard the date selected in filter.
Hi, @laraibashfaq
Try something like:
MaxyearAmount =
VAR MaxYear =
CALCULATE (
MAX ( 'Date'[DateValue] ),
ALLEXCEPT ( 'Date', 'Date'[DateValue] )
)
RETURN
CALCULATE (
MAX ( [Spend] ),
FILTER (
ALLEXCEPT ( 'Date', 'Date'[DateValue] ),
'Date'[DateValue] = MaxYear
)
)
Proud to be a Super User!
Nops, this function doesn't work
| User | Count |
|---|---|
| 60 | |
| 46 | |
| 32 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 82 | |
| 68 | |
| 43 | |
| 26 | |
| 23 |