Forum Discussion
Replace repeating/duplicate values with null/blank()
How do I replace all but one repeating/duplicate values in overtime column with null? There are no unique columns to cross reference to.
Thanks.
Oh, well if you had an index it would look something along the lines of:
New Column =
VAR __Value = 'Table'[Overtime]
VAR __CurrentIndex = 'Table'[Index]
RETURN
IF(MAXX(FILTER('Table',[Index] = __CurrentIndex - 1),[Overtime])=__Value,BLANK(),__Value)
4 Replies
- Greg_DecklerCommunity Champion
Create an Index column in Power Query editor. Now you have something to reference.
- AnonymousNot applicable
I am new to power BI. What would the DAX formula for replacing duplicate values look like?
- Greg_DecklerCommunity Champion
Oh, well if you had an index it would look something along the lines of:
New Column =
VAR __Value = 'Table'[Overtime]
VAR __CurrentIndex = 'Table'[Index]
RETURN
IF(MAXX(FILTER('Table',[Index] = __CurrentIndex - 1),[Overtime])=__Value,BLANK(),__Value)
- rohitpoojariHelper I
Can this be done in Query Editor? replacing the subsequent duplicated value with null