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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I need derived table for distinct email id with the latest first name and last name based on latest registration date time colum (DateTime column). Please find the below example for your reference.
Kindly anyone pls help me.
@amitchandak @Icey @Jihwan_Kim
Solved! Go to Solution.
@Murali777 , DAX code
filter(addcolumns(Table, "_Max", maxx(filter(Table, Table[Email] = earlier([Email])), [registration Date])), [_Max] = [registration Date])
or
new Table =
Var _1 = addcolumns(Table, "_Max", maxx(filter(Table, Table[Email] = earlier([Email])), [registration Date]))
return
calculatetable(_1, filter(_1, [_Max] = [registration Date]) )
@Murali777 , refer if this blog can help
https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/
Hi Amit,
I need code for calculated table not in the query editor. Kindly help me for DAX code for calculated Table.
@Murali777 , DAX code
filter(addcolumns(Table, "_Max", maxx(filter(Table, Table[Email] = earlier([Email])), [registration Date])), [_Max] = [registration Date])
or
new Table =
Var _1 = addcolumns(Table, "_Max", maxx(filter(Table, Table[Email] = earlier([Email])), [registration Date]))
return
calculatetable(_1, filter(_1, [_Max] = [registration Date]) )
Hi Amit,
Thanks for your code and your code is almost working. but my challenge is, i'm having bunch of columns and it returns all the column.
I want only the 3 columns (Email, First Name, Last Name) in the calculated table.