Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Looking to see if I can easily get something into a column that will operate like my current formula here:
{=MAX(IF([Employee Number]=[@[Employee Number]],[Activity Date Value]))}
Overall, looking to find the most current date of activity for a given employee number.
I've tried the following but it keeps returning the max value regardless of any filters in the report getting changed:
Solved! Go to Solution.
Hi, @Anonymous
You can try the following methods.
Sample data:
Measure:
Latest Date =
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER (
ALL ( 'Table' ),
[Employee Number] = SELECTEDVALUE ( 'Table'[Employee Number] )
)
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please include some sample data and the formula you have now.
Suppose you have data as follows
Person A | 4/4/2022
Person A | 5/5/2022
Person B | 1/1/2022
Person B | 2/1/2022
And you create a MEASURE with the following:
[Latest Date] = MAX ( 'my table'[my date] )
A table visual that doe NOT include the Person column will show:
5/5/2022
(because that is the MAX across all Persons
But if you include Person, then you should get this:
Person A | 5/5/2022
Person B | 2/1/2022
This correctly shows the MAX for each Person.
Proud to be a Super User! | |
You just simply need an Aggregate of MAX ( ). Power BI takes care of knowing the dimensionality slice when you display it. So if you set up a table with Employee and a measure that is MAX ( something ), then that will be the MAX for each employee.
Real simple.
Proud to be a Super User! | |
Typically yes, this is how it should be working. Both the Date Value and Employee Number exist on the same source table, but it still pulls the most current date in the entire column regardless of the row header.
I've updated the FILTER in this case to be a special role indicator that Penny fulfills. As you can see for Penny, it's simply pulling in the Latest Date of 7/31/2022 in the entire Latest Date column rather than what should be the 5/16 date for both rows (table vs. matrix makes no difference in this sense):
Hi, @Anonymous
You can try the following methods.
Sample data:
Measure:
Latest Date =
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER (
ALL ( 'Table' ),
[Employee Number] = SELECTEDVALUE ( 'Table'[Employee Number] )
)
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 44 | |
| 40 | |
| 29 | |
| 19 |
| User | Count |
|---|---|
| 201 | |
| 126 | |
| 103 | |
| 72 | |
| 54 |