Forum Discussion

PrashantA's avatar
PrashantA
Helper I
5 years ago
Solved

How apply conditional formatting using multiple columns in PBI Desktop - Help required

Team,   I have below scenario where have data of various customers (Branches, Store, Market type and Month wise business) of approx 400 excel files.   Help required: how to apply conditional form...
  • v-robertq-msft's avatar
    5 years ago

    Hi, PrashantA 

    According to your description and sample data, I can roughly understand your requirement, I think you can use the “Conditional formatting” function in the Power BI matrix to achieve this, you can try my steps:

    1. Go to the Power Query and do some operations as below pictures:

    Unpivot columns:

     

    Then rename the column:

     

    1. Click on the “Apply and close” and create a matrix and place it like this:

     

    1. Create a measure:
    Color =
    
    IF(MAX('Table'[Market])="Urban","Green","Yellow")
    1. Go to the “Format” pane and set it like this:

     

    And you can get what you want, like this:

    When the Market type is "Urban", it displays green color and displays yellow color if it’s “Rural”.

    You can download my test pbix file below

     

    If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

    How to Get Your Question Answered Quickly 

    Thank you very much!

     

    Best Regards,

    Community Support Team _Robert Qin

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