Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Power BI DAX

Greetings, wonderful power bi community

 

Cant seem to work out how to solve this problem. 

Duplicate or updated entries should be discarded and only the latest one should be kept or flagged.
Example below: 

RayMe_3-1670517746374.png

 

 

Attached sample table 

RayMe_2-1670517733878.png

 

 

Thanks for your help 🙂 

4 REPLIES 4
v-yinliw-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can try this method:

New a column:

Result =
VAR _latest =
    CALCULATE ( MAX ( 'Table'[createdon] ), ALLEXCEPT ( 'Table', 'Table'[Name] ) )
VAR _count =
    CALCULATE ( COUNT ( 'Table'[Name] ), ALLEXCEPT ( 'Table', 'Table'[Name] ) )
RETURN
    IF ( 'Table'[createdon] = _latest && _count > 1, "Latest", BLANK () )

The result is:

vyinliwmsft_0-1670551853346.png

Hope these help you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hi Yinliw
It does work when you have date set as date but i need it to include date and time as some records have entries on the same date but at different time. 
Is this something that can be done? 

Many thanks

Hi @Anonymous ,

 

I change some data to take a test(I change the Kia):

vyinliwmsft_0-1670577808300.png

If I understand you correctly, it still works fine.

 

Hope these help you.

 

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

I think it doesnt work for me as i have  more that just a singl day.

 

My dataset contains 65k rows for every day of the year, date is effective date or activity date. 
Created on a date when activity that will take place is created by someone and always have Date of when it will go ahead. 

 

https://1drv.ms/u/s!ArHGcaxRBasHgZhNA2KFN538CYVhqA


I have shared pbix file to show the data that i have. 

 

Many thanks 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.