Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I wanna display the latest rating given to an employee. In my data, I have columns 'rating' and 'reviewEndDate' in the 'doc' table, and a 'terminationDate' column in the 'employment' table. I want to return the latest rating record, but only if the termination date is greater than the review end date.
the table data look like this:
as you can see, an employee can have multiple rating record but I'm only intrested in the latest rating and reviewEndate that employee got rating which in this case are rating 1. there are cases or records that that reviewEndate higher than the terminationDate but those should be excluded since terminationDate should be higher than reviewEndDate.
I managed by creating a measure for that as you can see below and it works fine in a table visual but I can't put that measure in Legend or Axis in a bar chart so instead i wanna create a calculated column inside the table but when I do it with same measure then I get only one value record in all rows.
what should i do or how to fix it?
Rating =
VAR MaxDate = MAX('doc'[reviewEndDate])
RETURN
IF(NOT ISBLANK(MaxDate),
CALCULATE(
LASTNONBLANK('doc'[rating], 1),
FILTER('doc', 'doc'[reviewEndDate] = MaxDate)
)
)
Hi, @selected_
try below
Rating =
VAR MaxDate = 'doc'[reviewEndDate]
RETURN
IF(NOT (ISBLANK(MaxDate)),
CALCULATE(
LASTNONBLANK('doc'[rating], 1),
FILTER('doc', 'doc'[reviewEndDate] = MaxDate)
)
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.