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
Razorbx13
Post Patron
Post Patron

Highlighting Rows

 

Is there a way in a table to highlight the first row of a record when the data changes.  Example below.  Simple table but whenever the Warrant number changes want that row to be highlighted.  TIA

 

Razorbx13_0-1656706601903.png

 

1 ACCEPTED SOLUTION
ddpl
Solution Sage
Solution Sage

@Razorbx13 ,

 

Step 1 : First you need to add Index column in power query. Make sure start date should be sorted in Ascending order.

 

Step 2 : Now add column as per below dax

  Rank = RANKX(
                          FILTER(
                           yourtable,
                           EARLIER(yourtable[Warrant]) = yourtable[Warrant]
                          ),

   yourtable[Index], , ASC)

 

Step 3 : Create Measure for highlighting cell

    Red = 
           VAR a1 = SELECTEDVALUE(yourtable[Rank])

           Return

            SWITCH(TRUE(), a1 = 1, "Red")

 

Step 4 : Now applying above Red Measure under cell element as per below snap

 

ddpl_0-1656752530489.png  

 

ddpl_1-1656752595104.png

 

Accept as Solution if its worked. if not please connect.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @Razorbx13 ,

 

Has your problem been solved? If it is solved, you can mark the correct answer. If it is not solved, you can provide more detailed information and we can help you better. 

 

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.

ddpl
Solution Sage
Solution Sage

@Razorbx13 ,

 

Step 1 : First you need to add Index column in power query. Make sure start date should be sorted in Ascending order.

 

Step 2 : Now add column as per below dax

  Rank = RANKX(
                          FILTER(
                           yourtable,
                           EARLIER(yourtable[Warrant]) = yourtable[Warrant]
                          ),

   yourtable[Index], , ASC)

 

Step 3 : Create Measure for highlighting cell

    Red = 
           VAR a1 = SELECTEDVALUE(yourtable[Rank])

           Return

            SWITCH(TRUE(), a1 = 1, "Red")

 

Step 4 : Now applying above Red Measure under cell element as per below snap

 

ddpl_0-1656752530489.png  

 

ddpl_1-1656752595104.png

 

Accept as Solution if its worked. if not please connect.

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.