Forum Discussion
Anonymous
6 years agoNot applicable
Latest date for group with dynamic date filter
Hello all Hopefully this is the correct forum, but please correct me if I'm wrong. I'm trying to filter the contents of a visual to show only the 'latest' record within a group, relative to a...
- 6 years ago
Hi Anonymous ,
You can try something like this:
Latest = VAR maxdate = MAX(Assessment[Date]) VAR project = SELECTEDVALUE(Assessment[Projectid]) RETURN CALCULATE(SELECTEDVALUE(Assessment[Stageid]),Assessment[Projectid]=project, FILTER(Projects,Assessment[Date]=maxdate))This will return the latest stage for a given date filter over each project_id. I added a new dummy project Beta to illustrate this below:
Tak94
6 years agoFrequent Visitor
Hi Anonymous ,
You can try something like this:
Latest =
VAR maxdate = MAX(Assessment[Date])
VAR project = SELECTEDVALUE(Assessment[Projectid])
RETURN CALCULATE(SELECTEDVALUE(Assessment[Stageid]),Assessment[Projectid]=project,
FILTER(Projects,Assessment[Date]=maxdate))
This will return the latest stage for a given date filter over each project_id. I added a new dummy project Beta to illustrate this below: