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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
power123bi
New Member

Conditional formatting each coulmn in matrix

How do i format each column differently in conditional formatting in matrix

 

 ABC
Place 110545
Place 2202350
Place 3304510
Place 4106769
Place 553045
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @power123bi ,

I test it with your sample, it could work.

vbinbinyumsft_0-1678960539614.png

Please apply the measure in the conditional format for "Average of Number"

vbinbinyumsft_1-1678960567385.png

vbinbinyumsft_2-1678960596316.png

Best regards,
Community Support Team_Binbin Yu
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

7 REPLIES 7
Anonymous
Not applicable

Hi @power123bi ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1678692756108.png

2. create a mesure with below dax formula

Measure =
VAR cur_place =
    SELECTEDVALUE ( 'Table'[Place] )
VAR cur_product =
    SELECTEDVALUE ( 'Table'[Product] )
VAR _val =
    CALCULATE (
        MAX ( 'Table'[Sales] ),
        'Table'[Place] = cur_place,
        'Table'[Product] = cur_product
    )
RETURN
    SWITCH (
        TRUE (),
        cur_product = "A", IF ( _val >= 20, "Red", "Black" ),
        cur_product = "B", IF ( _val >= 40, "Red", "Black" ),
        cur_product = "C", IF ( _val >= 50, "Red", "Black" )
    )

3. add a matrix with fields and set conditional format with measure

vbinbinyumsft_1-1678692828452.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

Thanks.I tried the same but not able to format.Attached the sample file I used.

https://1drv.ms/u/s!AlZwf7rl-rpHj3QAR8FxFh11PRDr?e=TGAE0Y 

Anonymous
Not applicable

Hi @power123bi ,

I test it with your sample, it could work.

vbinbinyumsft_0-1678960539614.png

Please apply the measure in the conditional format for "Average of Number"

vbinbinyumsft_1-1678960567385.png

vbinbinyumsft_2-1678960596316.png

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

KeyurPatel14
Responsive Resident
Responsive Resident

Hi @power123bi ,

Hope you are doing well.

I have implemented the same scenario and got the expected result that you want.
So follow the below mentioned steps:
1.Add table visual and add all the columns in the columns field.

2.Select the visual,in the visualization pane go to columns field and right click the A Column there you will find Conditional Formatting Option as shown in below image.

KeyurPatel14_0-1678692539854.png

3.Click on it and select Font Color.
4.Select Rules in format style and also select numbers in the rules setting as shown in below image.

KeyurPatel14_1-1678692656293.png

5.Repeat this for all the columns according to your conditions/rules.

Thats it you will get the expected result.
Please refer below image for the result which I get.

KeyurPatel14_2-1678692752729.png

Hope this will help you and still if you have any queries then please let me know.

Also if this helps then please give it a kudos and accept it as a solution.

 

Thank you,

KeyurPatel

Hi,

Thanks. But the Category is in same column. Have attached sample file.

https://1drv.ms/u/s!AlZwf7rl-rpHj3QAR8FxFh11PRDr?e=TGAE0Y

KeyurPatel14
Responsive Resident
Responsive Resident

Can you please provide some details on what basis you want to apply conditional formatting? Like some criteria or rules.

 

Based on rules, ex. in first coulmn above 20 should be in Red, 2nd column above 30 in Red.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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