Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I'm working on the following table , but my requirement is I need only top row of each category (From Stage marked in red color)..
the problem right now is I dont have Index column...
How can I get the top row of each category..Please help
.
Solved! Go to Solution.
Hi @kkalyanrr ,
According to the data you have provided, the data you want to show as red, there are two rules to refer to, 1. To Stage = Base 2. Sorted according to From stage, then sorted according to Actual Diff between two stages, the first sorted data is red.
Refer the following dax to create a new column:
cc = if(RANKX(FILTER('Table','Table'[From stage]=EARLIER('Table'[From stage])),'Table'[Actual Diff between two stages],,ASC)=1,"Red",BLANK())
Then :
Fianl output:
You could download my pbix file if you need!
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi @kkalyanrr ,
According to the data you have provided, the data you want to show as red, there are two rules to refer to, 1. To Stage = Base 2. Sorted according to From stage, then sorted according to Actual Diff between two stages, the first sorted data is red.
Refer the following dax to create a new column:
cc = if(RANKX(FILTER('Table','Table'[From stage]=EARLIER('Table'[From stage])),'Table'[Actual Diff between two stages],,ASC)=1,"Red",BLANK())
Then :
Fianl output:
You could download my pbix file if you need!
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
@kkalyanrr , This seem like you are always filtering base, You can filter To Stage = Base
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |