Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kkalyanrr
Helper V
Helper V

Top row of Each category when No Index column exist

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

 


.ABC.PNG 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

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 :

vluwangmsft_0-1644904787561.pngvluwangmsft_1-1644904813847.png

 

Fianl output:

vluwangmsft_2-1644904833036.png

 

You could download my pbix file if you need!

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

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 :

vluwangmsft_0-1644904787561.pngvluwangmsft_1-1644904813847.png

 

Fianl output:

vluwangmsft_2-1644904833036.png

 

You could download my pbix file if you need!

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

amitchandak
Super User
Super User

@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.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.