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

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

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