Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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,
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |