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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
heldus
Frequent Visitor

Comparing values in the same table and create new column

Hi everyone,

 

i would like to compare every row in a table to figure out if there is another row in the table with the same content for specific parameters which all have to match to the other row. In this case it should be machine number, material number, company and the value for type should be different from the row it takes to compare. 

If this is true it should write a 1 in a new column and if not it should write a 0.

It ist also not possible in my case to remove just the duplicates.

 

I hope this is possible because i have not really an idea how i should realize this.

Thank you for your help.

 

Best regards

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Try this calculated column formula

=IF(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Machine Number]=EARLIER(Data[Machine Number])&&Data[Material Number]=EARLIER(Data[Material Number])&&Data[Company]=EARLIER(Data[Company])&&Data[Type]=EARLIER(Data[Type])))>0,1,0)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Try this calculated column formula

=IF(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Machine Number]=EARLIER(Data[Machine Number])&&Data[Material Number]=EARLIER(Data[Material Number])&&Data[Company]=EARLIER(Data[Company])&&Data[Type]=EARLIER(Data[Type])))>0,1,0)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.