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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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