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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yangliu-msft
Community Support
Community Support

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.