Forum Discussion
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
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.
1 Reply
- Ashish_MathurSuper 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.