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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
mb0307
Responsive Resident
Responsive Resident

Find duplicate

Hi all,

 

Table:

Find Duplicate.jpg

 

I would like to create a Calculated Column, RESULT, if:

CODE in MIN(CATEGORY) is duplicated in any other CATEGORY (which should be greater than MIN CATEGORY) then fill "Duplicate" otherwise "Original".  

 

Please note how last CODE 9999 is not in CATEGORY 1 so shown as "Original".

 

Thanks

 

1 ACCEPTED SOLUTION
fhill
Resident Rockstar
Resident Rockstar

I broke this up into 2 steps to show how the logic works...

 

First Column is your MIN Category BY Code:

Column_MinCatbyCode = CALCULATE( MIN ('Dup-Orig'[Category]), FILTER(ALLEXCEPT('Dup-Orig', 'Dup-Orig'[Code]), TRUE()))
 
Now we just compare the two columns:
Column = IF('Dup-Orig'[Column_MinCatbyCode] = 'Dup-Orig'[Category], "Original", "Duplicate")
 
image.png
 



Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

1 REPLY 1
fhill
Resident Rockstar
Resident Rockstar

I broke this up into 2 steps to show how the logic works...

 

First Column is your MIN Category BY Code:

Column_MinCatbyCode = CALCULATE( MIN ('Dup-Orig'[Category]), FILTER(ALLEXCEPT('Dup-Orig', 'Dup-Orig'[Code]), TRUE()))
 
Now we just compare the two columns:
Column = IF('Dup-Orig'[Column_MinCatbyCode] = 'Dup-Orig'[Category], "Original", "Duplicate")
 
image.png
 



Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.