Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I am trying to return a column with the most recent date by ID for a given set of data. Below is a sample set of data. In my table I have three columns Name, Name ID, and Date. The fourth column would be a calculated column, and return the most recent date by the unique NameID column. Is there a way that I can do this? Thank you!
Name | NameID | Date | CALCULATED - Most Recent by Name ID |
Mark | 1 | 3/15/2019 | 4/7/2020 |
John | 2 | 6/3/2020 | 6/3/2020 |
Tom | 3 | 8/7/2020 | 11/1/2020 |
Tom | 3 | 8/7/2020 | 11/1/2020 |
Tom | 3 | 8/7/2020 | 11/1/2020 |
Sarah | 4 | 2/1/2018 | 2/1/2018 |
Kim | 5 | 7/6/2017 | 7/6/2017 |
Mark | 1 | 4/7/2020 | 4/7/2020 |
Tom | 3 | 11/1/2020 | 11/1/2020 |
Steve | 6 | 3/2/2019 | 3/2/2019 |
Solved! Go to Solution.
@jtooke - Does this meet your requirement?
HASONEVALUE hides the 'Total' row for the measure.
Measure =
IF(
HASONEVALUE('Table'[NameID]),
CALCULATE(
MAX('Table'[Date]),
ALLEXCEPT('Table','Table'[NameID])
),
BLANK()
)
Proud to be a Super User!
@jtooke - Does this meet your requirement?
HASONEVALUE hides the 'Total' row for the measure.
Measure =
IF(
HASONEVALUE('Table'[NameID]),
CALCULATE(
MAX('Table'[Date]),
ALLEXCEPT('Table','Table'[NameID])
),
BLANK()
)
Proud to be a Super User!
Thank you for the response @ChrisMendoza . When I try this measure all that returns is blanks?
Try below first then and see if you like the output.
CALCULATE(
MAX('Table'[Date]),
ALLEXCEPT('Table','Table'[NameID])
)
Proud to be a Super User!
Hm, that doesn't quite work either. With that formula the column just shows the same date as in the initial column.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |