Forum Discussion

hkbs's avatar
hkbs
Frequent Visitor
4 years ago

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!šŸ™‡šŸ»šŸ™šŸ»

ā€ƒ

11 Replies

  • 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's avatar
      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?)

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        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

         

         

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity 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.

    • hkbs's avatar
      hkbs
      Frequent Visitor

      ā€ƒ

      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?

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity 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.