Forum Discussion
Anonymous
4 years agoNot applicable
Return values for the last date available
Hi everyone, I am making a report with the following tables: ProjectList Project ID Project name Project Owner 1 Project X John Doe 2 Project Y Jane Doe And Stat...
- 4 years ago
HI Anonymous
Download this file: https://gofile.io/d/A1SLih
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
smpa01
Community Champion
4 years agoAnonymous you can use a measure like this
Measure =
CALCULATE (
MAX ( StatusUpdates[Update] ),
FILTER (
VALUES ( StatusUpdates ),
StatusUpdates[Date]
= CALCULATE (
MAX ( StatusUpdates[Date] ),
ALLEXCEPT ( ProjectList, ProjectList[Project ID] )
)
)
)
AlexisOlson
Super User
4 years agoThis appears to work but I'd recommend defining a variable for MaxDate for several reasons:
- Performance. You don't have to recalculate for each row of the table you're filtering.
- Robustness. Avoid potential trouble arising from a context transition inside FILTER.
- Readability. Broken up a bit, the code is often easier for humans to understand.