Forum Discussion
EARLIER function does not recognize my column names
- 4 years ago
Hi pwe5000 ,
EARLIER will return the current value in a calculated column, not a measure. In a measure, MAX/MIN/SUM can return the current value.
According to your description, I create a sample. I create a calculated column by your formula, it calculates the number of SalesOrders that are the same as the current SalesOrder.
If you want to filter out all duplicates, here's my solution.
1.Add a index column in Power Query.
2.Create a calculated column.
Rank = RANKX ( FILTER ( 'Hobart Sales on Ebay', 'Hobart Sales on Ebay'[SalesOrder] = EARLIER ( 'Hobart Sales on Ebay'[SalesOrder] ) ), 'Hobart Sales on Ebay'[Index], , ASC, DENSE )Get this table.
3.By selecting Rank is 1, it will filter out all duplicates.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi parry2k,
Good point! It's also possible that there's a more effective way to do this: I want this measure to identify duplicates in the SalesOrder column. I don't want to remove the duplicates completely, but I do want to be able to use this new column to filter out all duplicates in the SalesOrder column (i.e. not keeping one copy of each duplicate).