Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All
How to identify the duplicate values and mark as sequential number (1,2,3...) using Rankx or Row Number Partition by functions.
Thanks
Check replies in links below that use Power Query and DAX.
Not sure using Rankx or Row Number but below DAX works well if there is
unique field/id:
dup =
Var pid = Products[UNID]
return CALCULATE (
COUNTROWS ( Products ),
ALLEXCEPT ( Products, Products[EFFECTIVEDATE] ),
pid >= Products[UNID]
)
ALLEXCEPT ( Products, Products[EFFECTIVEDATE] ) is the field you want to find the duplicate by and
you can include multiple fileds here and Products[UNID] is unique filed/row identifier of the products table.
Thanks
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 |
User | Count |
---|---|
8 | |
7 | |
4 | |
4 | |
4 |