I have an excel formula that looks like this =if(OR([@person]&[@month]]=A1&C1,[@person]&[@month]]=A3&C3), "Duplicate",0)
[@person] is in columnA and [@month] is in columnC
How the excel formula works is it will look at the combination of the person and month in the current row and check if the combined values one row above or below is the same. If same, return "Duplicate" if not return 0.
I'm not sure how to approach this task to convert this idea into power query. I dont know how to write a column formula that can simply refer to the person and month formula one row above and below like in excel.
Thanks in advance
I tried applying an index column to help with creating the formula, but Im not really sure how to apply it. Then i tried using chatgpt to create the formula, but it didnt work . Would like to try and learn it the proper way.
I assume your two columns are named Person and Month. Simplest method is,
Add column ... index column
Add column ... custom column with formula
Add column ... custom column with formula
click select those two new columns, right click and merge them
this would probably be faster