Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Is it possible to make RankX column ordered by Name in Category
like in the picture
My try is not working...
Name_Rank =
RANKX(
FILTER('Table','Table'[name]=EARLIER('Table'[name])),
CALCULATE(
max(
'Table'[name]
),
ALLEXCEPT(Table,Table[category],Table[name])
),,DESC,Dense
)
What I need to insert in Calculate ??
Solved! Go to Solution.
@Anonymous
You can try the following measure:
If you want to add more filters make sure you declare the variable on top and then insert it in the ALLSELECTED area.
The following returns the same results
Sorting Rank =
VAR _category = MAX ('Table'[Category] )
--VAR _secondvariable = MAX ( Sheet1[p_type] )
Return
RANKX (
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Category] = _category
-- && Sheet1[p_type] = current_type
),
CALCULATE ( MAX ( 'Table'[name] ) ),
,
ASC,
DENSE
)
Hello @Anonymous ,
Please try the following formula:
Rank =
RANKX (
FILTER ('Table', 'Table'[Category] = EARLIER('Table'[Category]) ), -- Grouping Column
'Table'[Name], -- Sorting Column
, ASC
)
Hi,
This good solution, but I have other columns in the table (this table only an example)
So I think needs to be any "all" function in the "calculate" function, but in calculate is possible using only aggregation...
@Anonymous
You can try the following measure:
If you want to add more filters make sure you declare the variable on top and then insert it in the ALLSELECTED area.
The following returns the same results
Sorting Rank =
VAR _category = MAX ('Table'[Category] )
--VAR _secondvariable = MAX ( Sheet1[p_type] )
Return
RANKX (
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Category] = _category
-- && Sheet1[p_type] = current_type
),
CALCULATE ( MAX ( 'Table'[name] ) ),
,
ASC,
DENSE
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 8 | |
| 8 |