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! Request now
I want to sum the values in the [Indicator] column. In some instances, there are two values for the same [EndDate]. In those cases, I only want to include the latest [RunTime]. In the example below, both have a 1 in [Indicator] but there could be two 0s or a 0 and a 1.
I am intending to divide this number by a DistinctCount of [EndDate] so that I can get a sort of % complete score across all EndDates (each EndDate only needs to be evaluated once but is sometimes evaluated twice when the end of the month falls in the middle of the week). Note that this table only shows one employee, but there will be several hundred employees in the full table.
Solved! Go to Solution.
maybe you can create a new column to flag the last record
iflast =
VAR _max=CALCULATE(max('Table'[last modify date]),ALLEXCEPT('Table','Table'[last modify by],'Table'[date]))
return if(_max='Table'[last modify date],"Y")
Proud to be a Super User!
maybe you can create a new column to flag the last record
iflast =
VAR _max=CALCULATE(max('Table'[last modify date]),ALLEXCEPT('Table','Table'[last modify by],'Table'[date]))
return if(_max='Table'[last modify date],"Y")
Proud to be a Super User!
Thanks! This is a great ideas and it almost worked, but for some reason there are dates that aren't being flagged when they should. Any ideas?
I'm using the code you suggested but with the appropriate column names:
iflast = VAR _max=CALCULATE(max(OAC_Timesheet_Citizenship[RunTime]),ALLEXCEPT(OAC_Timesheet_Citizenship,OAC_Timesheet_Citizenship[Emp],OAC_Timesheet_Citizenship[EndDate]))
return if(_max=OAC_Timesheet_Citizenship[RunTime],"Y")
maybe there are duplicated data for emp and end date.
try below to check why the max datetime is not different from the runtime datetime. The DAX returns the max runtime date for the same emp and same enddate.
iflast = VAR _max=CALCULATE(max(OAC_Timesheet_Citizenship[RunTime]),ALLEXCEPT(OAC_Timesheet_Citizenship,OAC_Timesheet_Citizenship[Emp],OAC_Timesheet_Citizenship[EndDate]))
return _max
Proud to be a Super User!
Ah yes, you are correct. I was able to easily filter those out, and now it all works. Thank you again!
you are welcome
Proud to be a Super User!
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.