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
tutuk28
Helper IV
Helper IV

Conditional formatting according to the value of the Row in a Matrix

Hi everyone! 

I have the following matrix:

 

Example 1.PNG

 

With the following fields:

Rows: Order, Name

Columns: Scenary

Values: Total

 

Is there a possibility that when the "Order" row is 2, 5 or 7 it will show me the "complete row" in bold?

 

Example.PNG

 

Thanks!

Regards!

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @tutuk28 ,

 

Based on my test, what you want is not supported in Power BI currently.

Here are some similar ideas you can vote up:

additional font formatting (bold, italic, underline, etc);

Matrix: conditional formatting per row in matrix.

 

In addition, one workaround is below. Please check:

 

1. Enter data to create a table with one column containing all the column/measure title you need and then put this column into Columns field.

co.PNG

 

2. Use SWITCH to create a measure.

Measure =
SWITCH (
    SELECTEDVALUE ( 'Table (2)'[Column1] ),
    "Name", MAX ( 'Table'[Name] ),
    "AC", SUM ( 'Table'[AC] ),
    "LY", SUM ( 'Table'[LY] )
)

 

3. Create a conditional measure.

Conditional = IF ( MAX ( 'Table'[Order] ) IN { 2, 5, 7 }, "Red", "Blue" )

 

4. Set conditional formatting.

cond.PNG

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

Hello. I think this can be for you. In the rows I have stores and in columns months, I wanted you to evaluate the values of each row and generate a conditional formatting. To do this, I made a Rankx that will organize the data (1 the largest, for the example is until June, so 6 the smallest)

this is the measure:

Jorge_Gomez_1-1630176250059.png

and then you enter and perform the conditional formatting, you choose which according to the field and you put the measure you created of Rankx

Jorge_Gomez_2-1630176474702.png

finally you have as the table.

Jorge_Gomez_0-1630176173298.png

Icey
Community Support
Community Support

Hi @tutuk28 ,

 

Based on my test, what you want is not supported in Power BI currently.

Here are some similar ideas you can vote up:

additional font formatting (bold, italic, underline, etc);

Matrix: conditional formatting per row in matrix.

 

In addition, one workaround is below. Please check:

 

1. Enter data to create a table with one column containing all the column/measure title you need and then put this column into Columns field.

co.PNG

 

2. Use SWITCH to create a measure.

Measure =
SWITCH (
    SELECTEDVALUE ( 'Table (2)'[Column1] ),
    "Name", MAX ( 'Table'[Name] ),
    "AC", SUM ( 'Table'[AC] ),
    "LY", SUM ( 'Table'[LY] )
)

 

3. Create a conditional measure.

Conditional = IF ( MAX ( 'Table'[Order] ) IN { 2, 5, 7 }, "Red", "Blue" )

 

4. Set conditional formatting.

cond.PNG

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

Mariusz
Community Champion
Community Champion

Hi @tutuk28 

 

Sure, please follow the link below to the video with an example.

https://www.sqlbi.com/articles/applying-color-banding-by-document-number-in-power-bi/

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Hi @Mariusz 

 

The problem is that I need to use an matrix.
And for the array I cannot apply conditional formatting to my Rows values (Order, Name) only to my Values (Total).

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.