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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
hkbs
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!🙇🏻🙏🏻

2FE3B721-B15B-4765-B02A-DE7FAAE8304A.jpeg

11 REPLIES 11
v-yalanwu-msft
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.

v-yalanwu-msft
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.

vyalanwumsft_0-1658804939053.pngvyalanwumsft_1-1658804949331.png

and such as other discount.

The final show:

vyalanwumsft_2-1658805000718.png


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.

CFB3A5B4-29D6-4A8A-8CB2-1C342BFE975F.jpeg

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?

lbendlin
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.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

hkbs
Frequent Visitor

Dear lbendlin

Many thanks for your time on replying my questions.

i have uploaded the martrix dummy files here

https://we.tl/t-3IICMgypmi?src=dnl

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

 

 

hkbs
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

 

etc.

hkbs
Frequent Visitor

My raw csv file comes in like this: 

 

ItemIDShop1Shop2

Discount

12100001200078
129000800078
108010980
990010090

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.

hkbs
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

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.