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.
I am not sure how to mention this. I have a simple table as below. I am trying to get the rank basis on 'Name' Column which has duplicate record. Can any one help whether this can be achieved in power bi? Thanks in Advance.
Name | Desired Output (Rank) |
A | 1 |
A | 2 |
A | 3 |
A | 4 |
B | 1 |
B | 2 |
B | 3 |
C | 1 |
C | 2 |
C | 3 |
C | 4 |
C | 5 |
C | 6 |
Solved! Go to Solution.
Hi @Anonymous
Once you've added your index column, you can use the DAX expression below to create your rank column:
Rank =
VAR RowName = Table1[Name]
VAR Result =
RANKX(
FILTER(
ALL( Table1 ),
Table1[Name] = RowName
),
Table1[Index],
,ASC
)
RETURN Result
Best regards,
Martyn
Create one index column and then create one more column as below.
I have a similar problem with ranking. What I need is to have all channel_grouping_1 have the same rank. Offline Only 1 across all lines, Direct 2 across all lines etc. Can anyone help?
Many thanks
Hi @Anonymous
the easiest way is to add a Custom Index Column in Power Query Editor mode
then try to create a calculated DAX column like
RANK =
var _RowsBefore = COUNTROWS(FILTER('Table', 'Table'[Name]<EARLIER('Table'[Name])))
RETURN
rankx(FILTER('Table', 'Table'[Name]=EARLIER('Table'[Name])), 'Table'[Index],,ASC) + _RowsBefore
Hi @Anonymous
Once you've added your index column, you can use the DAX expression below to create your rank column:
Rank =
VAR RowName = Table1[Name]
VAR Result =
RANKX(
FILTER(
ALL( Table1 ),
Table1[Name] = RowName
),
Table1[Index],
,ASC
)
RETURN Result
Best regards,
Martyn
Create one index column and then create one more column as below.
Hi @Anonymous
Perfect, This is also a solution to my concern. Thanks a lot for your help.
Regards,
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |