Forum Discussion
PowerBITestingG
4 years agoResolver I
Rank duplicates
Hi all So using this DAX duplicate = CALCULATE(COUNTA(column1),ALLEXCEPT(table,column1)) I can get the duplicated values. What I am trying to do is to label one of the duplicates as 1...
- 4 years ago
I solved by creating a new calculated column that uses RAND() for breaking ties
rankduplicates =
RANKX (
FILTER (
table,
table[column1]
= EARLIER ( table[column1] )
),
table[notie] -- Just RAND()
)
tamerj1
4 years agoCommunity Champion
Hi PowerBITestingG
What other columns you have? Do you have date or inex column(s)? Can you add index column? In other words how do you define the first record? By time or or index?
PowerBITestingG
4 years agoResolver I
I solved by creating a new calculated column that uses RAND() for breaking ties
rankduplicates =
RANKX (
FILTER (
table,
table[column1]
= EARLIER ( table[column1] )
),
table[notie] -- Just RAND()
)
RANKX (
FILTER (
table,
table[column1]
= EARLIER ( table[column1] )
),
table[notie] -- Just RAND()
)