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
n4ch3
New Member

Conditional Formatting Table Dynamic

Hello,

 

So, i have this table which is a Scores table in this way:

 

Capture1.PNG

 

The order change with Season 'Temporada' and Time 'Jornada', so i need allways has this conditional format no matter what teams are in this places:

 

(This is ordered by Σ Total Points 'Puntos')

- The first 4 places rows must be in a color1

- The next 3 places rows must be in a color2

- The next 10 places rows must be in a color3

- The latest 3 places rows must be in a color4

 

Im trying to replicate this.

 

Capture2.PNG

 

 

 

 

 

 

 

Thanks for your time, i really apretiatte this since is really important.

 

Regards.

7 REPLIES 7
amitchandak
Super User
Super User

Please refer if this can help

 

https://community.powerbi.com/t5/Desktop/Background-color-for-a-row-table-matrix/td-p/714419

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog -

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...


https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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

Hello, thanks for your answer.

Well, almost, this only works for the first row, but i need something based on the order position like:

 

COLOUR GLOBAL PROJECT ROW = 

IF (HASONEVALUE(Projects[Project]) ,IF( FIRSTNONBLANK('Projects'[Project] , 0) ,"lightgreen" ,"white" ) ,BLANK() )

IF (HASONEVALUE(Projects[Project]) ,IF( SECONDNONBLANK('Projects'[Project] , 0) ,"lightblue" ,"white" ) ,BLANK() )

IF (HASONEVALUE(Projects[Project]) ,IF( THIRDNONBLANK('Projects'[Project] , 0) ,"lightyellow" ,"white" ) ,BLANK() )

And so on..

 

Can you create it based on Rank or some numeric column?

I tried on years like this

Color Year = if(FIRSTNONBLANK('Date'[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK('Date'[Year],2014)>2018,"red","yellow"))

 

I tried it on font color. Also, it needs to be applied on all columns to get row colored

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

Again Amit, thanks.

 

The main problem is this is ordered by the total Score, which is a measure of the points by Season and the sum of the Time (Less than or equal to), so we can include several weeks in this total and diferent totals score by the selection.

 

What I know is that are going to be allways 20 rows.

@n4ch3 You need to add rank measure for you score and then use that to get the color and use that color measure in conditional formatting for all the columns in the matrix. for rank, read this post

 

Color =
SWITCH ( TRUE(),
[Rank] <= 4, "Blue",
[Rank] <= 7, "Yellow",
[Rank] <= 17, "Red",
"Green"
)

 

You can change above condition as per your business logic.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hellop Parry, thanks for your answer.

 

That almost give what i'm looking for, please take a look:

 

Capture3.PNG

 

 

 

 

 

 

But this rank give me some repeat numbers, its possible to include another column to make this unic, for example the Goals at favor 'Goles a Favor'?

 

This is what i'm using:

 

Category Rank =
    RANKX(
        ALL(Equipos[Equipos]) ,
        CALCULATE(
            SUM('La Liga'[Puntos])
            )
    )

@n4ch3 in that blog post which I mentioned earlier there is a section talks about on how to break ties. Go thru that and that will help.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.