Forum Discussion
Calculated Table Using SUMMARIZE to return distinct values by max date
- 2 years ago
- Anonymous2 years ago
Hi DonRitchie
ThxAlot Good share!
For your question, here I give you the other method:
Here is the data you provided
“Employees”
First, create a measure to calculate the “max_date”
max_date = CALCULATE(MAX('Employees'[Date]), FILTER(ALL('Employees'), 'Employees'[Employee ] = MAX('Employees'[Employee ])))Then, create a new table
result_employees = SELECTCOLUMNS(FILTER(ALL('Employees'), 'Employees'[Date] = [max_date]), "employee", 'Employees'[Employee ], "employtype", 'Employees'[EmployeeType ], "date", 'Employees'[Date])Here is the result
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi DonRitchie
ThxAlot Good share!
For your question, here I give you the other method:
Here is the data you provided
“Employees”
First, create a measure to calculate the “max_date”
max_date =
CALCULATE(MAX('Employees'[Date]),
FILTER(ALL('Employees'), 'Employees'[Employee ] = MAX('Employees'[Employee ])))
Then, create a new table
result_employees =
SELECTCOLUMNS(FILTER(ALL('Employees'),
'Employees'[Date] = [max_date]),
"employee", 'Employees'[Employee ], "employtype", 'Employees'[EmployeeType ], "date", 'Employees'[Date])
Here is the result
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- DonRitchie2 years agoFrequent Visitor
This works as well, in the situation where I would want a comparison table. Thank you!