Alex Kitson
Alex Kitson

Reputation: 93

Trying to return the maximum value of a filtered date column in Power BI

I have a table within Power BI that has a date field, and a value field. I am filtering on this date field, using a slicer, to sum all of the value data before the specified date. I would like to get this date value to use in a LOOKUPVALUE() elsewhere (to get a conversion rate).

Is there a way to accomplish this?

I have tried the DAX functions that return the values of a particular table/column with filters preserved but this never seems to work, and just returns the entire dataset, e.g. VALUES(), FILTERS(), ALLEXCEPT().

Any help would be greatly appreciated!

Upvotes: 1

Views: 13810

Answers (1)

Alex Kitson
Alex Kitson

Reputation: 93

I found a solution using measures.

The DAX for future reference:

Filter Date = CALCULATE(MAX('Table'[Date]),ALLSELECTED('Table'))

Upvotes: 6

Related Questions