Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I need to rank records in my tabe after filtering out certain records based on a Text column. Here is how data would look like and I need to rank and filter by "Category" column.
Below is my formula , but this is ranking all the records regardless. The Rand column is a column that I added since there was no unique value column for indexing
Rank = RANKX(FILTER('Tablename',OR('Tablename'[category]=" Cycle 1",
'Tablename'[category]=" Cycle 2") && EARLIEST('Tablename'[RAND])),'Tablename'[category],,DESC,Dense)
Hi @naveenvs,
Here are the steps you can follow:
1. Create a measure.
RowNum =
CALCULATE (
COUNT ( 'Table'[Category] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Category] <= MAX ( 'Table'[Category] )
)
)
2. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
72 | |
70 | |
55 | |
37 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |