Forum Discussion

power123bi's avatar
power123bi
New Member
3 years ago
Solved

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
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi power123bi ,

    I test it with your sample, it could work.

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

    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.

7 Replies

  • KeyurPatel14's avatar
    KeyurPatel14
    Icon for Responsive Resident rankResponsive Resident

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

     

    • power123bi's avatar
      power123bi
      New Member

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

  • KeyurPatel14's avatar
    KeyurPatel14
    Icon for Responsive Resident rankResponsive 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.

    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.

    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.

    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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi power123bi ,

    Please try below steps:

    1. below is my test table

    Table:

    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

    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.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi power123bi ,

        I test it with your sample, it could work.

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

        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.