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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Frequent Visitor

conditional formatting with icon or colour that compare two columns in percentage changes?

Dear all :

good day here, thanks for letting me to post the question here and thanks for your time on reading this.


I have a matrix dummy here that I would like to ask how can I add


ie :

item 12 , shop 1 vs shop 2 , under discount rate 78.

Ie if it is greater in comparison in 10% mark as red

if it is greater in comparison in 25% mark as yellow

if it is greater in comparison in 100% mark as Green


What I want to found out is a way to compare amount all discount rate. Many thanks!🙇🏻🙏🏻


Community Support
Community Support

Hi, @hkbs ;

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support
Community Support

Hi, @hkbs ;

You could create measure as follow:

78dis = DIVIDE(SUM('Table'[78-SHOP1SOLD]),SUM('Table'[78SHOP2SOLD]))

then set the condition format.


and such as other discount.

The final show:


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


Hi thanks or the suggestion I tried the methods mentioned , ie how ever if say item 1 85-shop1sold if the value is 100000 , I was expecting the 100000 in highlighted as a result the 85shop2 should not be highlighted, can this be done?

Super User
Super User

Please provide sanitized sample data that fully covers your issue. I cannot help you without usable sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

Frequent Visitor

Dear lbendlin

Many thanks for your time on replying my questions.

i have uploaded the martrix dummy files here

my expected outcome is something like this(I think I need two measure? One is SHOP1 compare to shop 2, the other is shop 2 compare with shop 1 , and use it accordingly?)82167149-4E0B-44EA-80B1-6726A9507B88.jpeg

Thank you for providing the source data.  Power BI doesn't know how to handle merged cells (your discount values).  Please move the discount into the fact area.  Ideally the data should be structured like this:


ItemID | Shop | DiscountRate | Value



Frequent Visitor

Hi thanks for the reply

does that mean u suggest I transform the raw data cab into two table in follow arrangement .

ItemID | Shop 1| DiscountRate | Value

ItemID | Shop 2| DiscountRate | Value

and then there is a chance I have a way to compare them in a matrix visual?

again many thanks for pointing a way

Don't do separate tables. This should be all in one table.


ItemID Shop Discount Value
12 Shop1 78 444352
12 Shop2 78 346760
12 Shop1 80 20
12 Shop2 80 20



Frequent Visitor

My raw csv file comes in like this: 





so far and so on.


what is the best solution or direction I should look into? Thanks 

As I mentioned above as a minimum you want to unpivot the shop columns.

Frequent Visitor

Noted, once I transformed the data in the way you mentioned.

how should I form a Matrix visual in the way with the condition format comparison? Thanks for your guidance 

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.