The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.