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

View all the Fabric Data Days sessions on demand. View schedule

Reply
raghavkrishna
New Member

Replace Duplicate values with Blank, and keep only one in other column

Hello All,

 

I am trying to create a new column with the existing one. In this new column I want to keep only one out of all available duplicate values in the same row. Rest all duplicate values needs to be replace by blanks or null.

 

Below is the input for my data and also the expected output

 

Capture.PNG

 

Any help would be appreciated

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@raghavkrishna , First add an index column in Power Query

Power Query- Index Column: https://youtu.be/NS4esnCDqVw

 

Then add this new column in dax

 

New column=  if([Index] = minx(filter(Table, [Column1] = earlier([[Column])) , [index]) , [Column2], blank())

 

refer: Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
rohitpoojari
Helper I
Helper I

Hi Amit, Can this be done in Query Editor? replacing the subsequent duplicated value with null

rohitpoojari
Helper I
Helper I

Thanks

Hi @amitchandak 

Thank you for the above. I tried it and it worked perfectly. However I am trying to achieve something slightly different. 

 

If there is a duplicate; I want to remove it from the list completely; as per the below. Do you have any advice?

 

Also, I need to do this in Power Query in M Language.

 

IdentifierUnique Identifier
678398678398
890462890462
869302869302
673020 
673020 
859396859396
674811 
674811 
829487829487
amitchandak
Super User
Super User

@raghavkrishna , First add an index column in Power Query

Power Query- Index Column: https://youtu.be/NS4esnCDqVw

 

Then add this new column in dax

 

New column=  if([Index] = minx(filter(Table, [Column1] = earlier([[Column])) , [index]) , [Column2], blank())

 

refer: Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors