Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Compare Rows on Value Difference and Highlight Products belonging to Same group

Hi Friends,

 

I have products grouped as per category recipes as below :

Group NameProduct
AA_1
AB_1
AC_1
XX_1
XY_1
XZ_1

And in PowerBI Matrix , I have values presented as below : 

Country NameCategoryJun-22May-22Diff > 0
Country1A_1          120          110            10
Country1X_1            30            60          (30)
Country1B_1          100          100             -  
Country1UVA WPP          600          550            50
Country2Y_1            80            80             -  
Country2C_1            25            22              3
Country2Z_1             -               -               -  
Country2B_1             -               -               -  

 

I want ,  1) if any product belonging to a specific group say A, is > 0 or < 0, then all the product rows beloinging to that group should be highlighted with same color..

For eq : 1) In the Matrix table above , Product A_1 (belonging to Group A) has difference > 0, then all the products belonging to Group A , will be highlighted with the same color.

2) Also, is it possible to have a color filtering to see all the same color rows below each other.

Thank you so much in advance... 

 

10 Replies

  • Yes, this should be possible. It's called a "Filtering up"  pattern.

     

    Please provide sanitized sample data that fully covers your issue. I cannot help you if you do not provide usable sample data.
    If you paste the data into a table in your post or use one of the file services it will be easier to assist you. 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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Pardon me for being messy on providing information. Its my first time on the forum and will streamline for future question.

      Below is the screenshot of the expectations of output

      Here, NEON BLUE and NEON INDIGO belong to same group "NEON" , and since the Diff value in NEON BLUE is <> 0, it highlights another product from same GROUP whose values are <> 0. 

      and that follows for other group products too with different highlighted colors.

      Please let me know if you need more information. Thank you in advance

  • Thank you for the clarifications.

     

    Note that your sample group data is not covering your product data.

     

     

    Please let me know how that should be handled. Please also explain the color highlighting rules again. You didn't specify which color you want?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Ibendlin for your reply. Seems I was not clear in my explanation. sorry for the confusion. Let me try again.

      Below is my Group data where the products are grouped in "1" , "2", "3" and "4"

      No.Product
      1ERIOSLOW BLACK M
      1ERIOSLOW BLUE 3R
      1ERIOSLOW NAVY M
      1ERIOSLOW RED 2B
      1ERIOSLOW RED B
      1ERIOSLOW YELLOW 5G
      1ERIOSLOW YELLOW R
      1ERIOSLOW FIX-01
      2NEWLAN BLUE CD-P
      2NEWLAN BLUE P OPTIFLOW
      2NEWLAN RED CD-P
      2NEWLAN RED P OPTIFLOW
      2NEWLAN YELLOW CD-P
      2NEWLAN YELLOW P OPTIFLOW
      2ALBEGAL PLUS
      3LINDASOL BLACK CE
      3LINDASOL BLUE 3G C
      3LINDASOL BLUE 3R
      3LINDASOL BLUE CE
      3LINDASOL DEEP BLACK CE-R
      3LINDASOL DEEP BLACK CE-2B
      3LINDASOL GOLDEN YELLOW CE-01
      3LINDASOL NAVY CE
      3LINDASOL RED 6G
      3LINDASOL RED CE
      3LINDASOL YELLOW 4G
      3LINDASOL YELLOW CE
      3ALBEGAL B
      3ALBEGAL E3-B
      4TERABOTTOM BLACK HL-BL
      4TERABOTTOM BLACK HL-NF-01
      4TERABOTTOM BLACK HL-SF
      4TERABOTTOM BLACK LF-01
      4TERABOTTOM BLUE HL-B-01 150%
      4TERABOTTOM ORANGE HL
      4TERABOTTOM RED HL
      4TERABOTTOM YELLOW HL-G-01 150%

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Below is my RAW data. This data is for State : Maharashtra

        MonthWD10-JuneWD10-MayProduct Name
        2022069785ERIOSLOW BLACK M
        2022061115ERIOSLOW BLACK M
        2022064079ERIOSLOW BLACK M
        2022067673ERIOSLOW BLACK M
        2022065037ERIOSLOW BLACK M
        202206034ERIOSLOW BLACK M
        2022064029ERIOSLOW BLACK M
        2022065711ERIOSLOW BLACK M
        2022067383ERIOSLOW BLACK M
        202206713ERIOSLOW BLACK M
        2022066269ERIOSLOW BLACK M
        202206126ERIOSLOW BLACK M
        2022063647ERIOSLOW BLACK M
        2022065915ERIOSLOW YELLOW R
        202206045ERIOSLOW BLACK M
        2022066521ERIOSLOW YELLOW R
        2022065094ERIOSLOW BLACK M
        2022062158ERIOSLOW BLACK M
        202206326ERIOSLOW BLACK M
        2022063494ERIOSLOW BLACK M
        2022067867ERIOSLOW BLACK M
        2022061458ERIOSLOW BLACK M
        2022067215ERIOSLOW BLACK M
        2022067650ERIOSLOW YELLOW R
        2022061735ERIOSLOW BLACK M
        2022061517ERIOSLOW YELLOW R
        2022069382ERIOSLOW BLACK M
        2022066811ERIOSLOW BLACK M
        2022065951ERIOSLOW BLACK M
        2022069127ERIOSLOW BLACK M
        2022066218ERIOSLOW BLACK M
        2022064612ERIOSLOW BLACK M
        2022066694ERIOSLOW BLACK M
        2022068111ERIOSLOW BLACK M
        2022065084ERIOSLOW BLACK M
        2022066937ERIOSLOW BLACK M
        2022067318ERIOSLOW BLACK M
        2022078424ERIOSLOW BLACK M
        202207792ERIOSLOW BLACK M
        2022077572ERIOSLOW BLACK M
        2022077053ERIOSLOW BLACK M
        2022078364ERIOSLOW BLACK M
        202207254ERIOSLOW BLACK M
        2022079443ERIOSLOW BLACK M
        2022061369ERIOSLOW YELLOW R
        2022074255ERIOSLOW BLACK M
        2022075376ERIOSLOW BLACK M
        2022078249ERIOSLOW BLACK M
        202207153ERIOSLOW BLACK M
        2022066286ERIOSLOW RED 2B
        2022078389ERIOSLOW BLACK M
        2022073769ERIOSLOW BLACK M
        2022077926ERIOSLOW BLACK M
        2022075928ERIOSLOW BLACK M
        2022064130ERIOSLOW RED 2B
        2022072737ERIOSLOW BLACK M
        2022063459ERIOSLOW RED 2B
        2022071429ERIOSLOW BLACK M
        202207865ERIOSLOW BLACK M
        2022076918ERIOSLOW BLACK M
        2022072356ERIOSLOW BLACK M
        202207555ERIOSLOW BLACK M
        2022079169ERIOSLOW BLACK M
        202207658ERIOSLOW BLACK M
        2022076358ERIOSLOW BLACK M
        202207090ERIOSLOW BLACK M
        2022076057ERIOSLOW BLACK M
        202207043ERIOSLOW BLACK M
        2022078131ERIOSLOW BLACK M
        2022076994ERIOSLOW BLACK M
        2022077029ERIOSLOW BLACK M
        2022078159ERIOSLOW BLACK M
        2022078292ERIOSLOW BLACK M
        2022076624ERIOSLOW BLACK M
        2022076029ERIOSLOW BLACK M
        2022078442ERIOSLOW BLACK M
        2022073497ERIOSLOW BLACK M
        2022079055ERIOSLOW BLACK M
        2022074266ERIOSLOW BLACK M
        2022073819ERIOSLOW BLACK M
        2022079122ERIOSLOW BLACK M
        2022079914ERIOSLOW BLACK M
        2022078368ERIOSLOW BLACK M
        202206148ERIOSLOW BLUE 3G
        2022076666ERIOSLOW BLACK M
        2022077048ERIOSLOW BLACK M
        202207602ERIOSLOW BLACK M
        2022072918ERIOSLOW BLACK M
        2022073568ERIOSLOW BLACK M
        2022076780ERIOSLOW BLACK M
        2022064087ERIOSLOW BLACK M
        202206147ERIOSLOW BLACK M
        2022065322ERIOSLOW BLACK M
        2022079015ERIOSLOW BLACK M
        2022067012ERIOSLOW BLUE 3G
        2022063666ERIOSLOW BLUE 3G
        2022062826ERIOSLOW BLUE 3G
        2022069138ERIOSLOW BLUE 3G
        2022066394ERIOSLOW BLUE 3G
        2022066019ERIOSLOW BLUE 3G
        2022065722ERIOSLOW BLUE 3G
        2022067658ERIOSLOW BLUE 3G
        2022067599ERIOSLOW BLUE 3G
        2022064942ERIOSLOW BLUE 3G
        2022066883ERIOSLOW BLUE 3G
        2022061814ERIOSLOW BLUE 3G
        2022066788ERIOSLOW BLUE 3G
        202206422ERIOSLOW BLUE 3G
        2022062470ERIOSLOW BLUE 3G
        2022065627ERIOSLOW BLUE 3G
        2022065419ERIOSLOW BLUE 3G
        2022064976ERIOSLOW BLUE 3G
        2022068710ERIOSLOW BLUE 3G
        2022071460ERIOSLOW BLUE 3G
        2022076168ERIOSLOW BLUE 3G
        202207506ERIOSLOW BLUE 3G
        2022065566ERIOSLOW YELLOW 5G
        2022072148ERIOSLOW BLUE 3G
        2022074759ERIOSLOW BLUE 3G
        202207116ERIOSLOW BLUE 3G
        2022077132ERIOSLOW BLUE 3G
        2022076558ERIOSLOW BLUE 3G
        2022071143ERIOSLOW BLUE 3G
        2022077068ERIOSLOW BLUE 3G
        2022076858ERIOSLOW BLUE 3G
        2022075915ERIOSLOW BLUE 3G
        2022074985ERIOSLOW BLUE 3G
        2022078430ERIOSLOW BLUE 3G
        2022076343ERIOSLOW BLUE 3G
        2022079830ERIOSLOW BLUE 3G
        2022078098ERIOSLOW BLUE 3G
        2022077623ERIOSLOW BLUE 3G
        2022078687ERIOSLOW BLUE 3G
        2022075998ERIOSLOW BLUE 3G
        2022076763ERIOSLOW BLUE 3G
        2022076260ERIOSLOW BLUE 3G
        2022072973ERIOSLOW BLUE 3G
        2022073211ERIOSLOW BLUE 3G
        2022073562ERIOSLOW BLUE 3G
        202206086ERIOSLOW BLUE 3R
        2022066825ERIOSLOW BLUE 3R
        2022066945ERIOSLOW BLUE 3R
        2022068833ERIOSLOW BLUE 3R
        2022069120ERIOSLOW BLACK M
        2022065166ERIOSLOW BLUE 3R
        2022069166ERIOSLOW BLUE 3R
        2022069950ERIOSLOW BLACK M
        2022062535ERIOSLOW BLACK M
        2022068118ERIOSLOW BLUE 3R
        2022063552ERIOSLOW BLACK M
        202206697ERIOSLOW BLUE 3R
        2022064551ERIOSLOW NAVY M
        202206995ERIOSLOW BLUE 3R
        2022063528ERIOSLOW BLUE 3R
        2022066990ERIOSLOW BLUE 3R
        2022061521ERIOSLOW BLUE 3R
        2022066340ERIOSLOW BLUE 3R
        202206850ERIOSLOW BLUE 3R
        2022061547ERIOSLOW BLUE 3R
        2022065262ERIOSLOW BLUE 3R
        2022061353ERIOSLOW BLUE 3R
        2022062947ERIOSLOW BLUE 3R
        2022067250ERIOSLOW BLUE 3R
        202206891ERIOSLOW BLUE 3R
        2022061481ERIOSLOW BLUE 3R
        2022065973ERIOSLOW BLUE 3R
        2022069567ERIOSLOW NAVY M
        2022069799ERIOSLOW BLUE 3R
        2022062769ERIOSLOW BLUE 3R
        2022061325ERIOSLOW BLUE 3R
        2022066566ERIOSLOW BLUE 3R
        2022065093ERIOSLOW BLUE 3R
        2022065645ERIOSLOW BLUE 3R
        2022066645ERIOSLOW BLUE 3R
        2022061128ERIOSLOW BLUE 3R
        2022079482ERIOSLOW BLUE 3R
        2022076946ERIOSLOW BLUE 3R
        2022077966ERIOSLOW BLUE 3R
        2022077997ERIOSLOW BLUE 3R
        202207116ERIOSLOW BLUE 3R
        2022073037ERIOSLOW BLUE 3R
        2022071240ERIOSLOW BLUE 3R
        2022072819ERIOSLOW BLUE 3R
        202207530ERIOSLOW BLUE 3R
        202207511ERIOSLOW BLUE 3R
        2022079657ERIOSLOW BLUE 3R
        2022072075ERIOSLOW BLUE 3R
        2022071000ERIOSLOW BLUE 3R
        202207394ERIOSLOW BLUE 3R
        2022078570ERIOSLOW BLUE 3R
        2022074842ERIOSLOW BLUE 3R
        2022078660ERIOSLOW BLUE 3R
        2022077531ERIOSLOW BLUE 3R
        2022079350ERIOSLOW BLUE 3R
        2022079037ERIOSLOW BLUE 3R
        2022078834ERIOSLOW BLUE 3R
        2022077438ERIOSLOW BLUE 3R
        2022074984ERIOSLOW BLUE 3R
        2022076554ERIOSLOW BLUE 3R
        2022074899ERIOSLOW BLUE 3R
        2022077087ERIOSLOW BLUE 3R
        2022077020ERIOSLOW BLUE 3R
        2022075521ERIOSLOW BLUE 3R
        202207164ERIOSLOW BLUE 3R
        2022079964ERIOSLOW BLUE 3R
        20220733ERIOSLOW BLUE 3R
        2022075340ERIOSLOW BLUE 3R
        2022073119ERIOSLOW BLUE 3R
        202207813ERIOSLOW BLUE 3R
        202207822ERIOSLOW BLUE 3R
        2022071008ERIOSLOW BLUE 3R
        2022073076ERIOSLOW BLUE 3R
        2022071823ERIOSLOW BLUE 3R
        2022067898ERIOSLOW BLUE RHK 600
        2022071898ERIOSLOW BLUE RHK 600
        2022062624ERIOSLOW BRILLIANT RED 3G
        2022066462ERIOSLOW BRILLIANT RED 3G
        2022064392ERIOSLOW BRILLIANT RED 3G
        2022066033ERIOSLOW BRILLIANT RED 3G
        2022064661ERIOSLOW BRILLIANT RED 3G
        2022069098ERIOSLOW BRILLIANT RED 3G
        2022064818ERIOSLOW BRILLIANT RED 3G
        2022062027ERIOSLOW BRILLIANT RED 3G
        2022063487ERIOSLOW BRILLIANT RED 3G
        2022064131ERIOSLOW BRILLIANT RED 3G
        2022071010ERIOSLOW BRILLIANT RED 3G
        2022077099ERIOSLOW BRILLIANT RED 3G
        2022079668ERIOSLOW BRILLIANT RED 3G
        202207173ERIOSLOW BRILLIANT RED 3G
        2022075586ERIOSLOW BRILLIANT RED 3G
        202207573ERIOSLOW BRILLIANT RED 3G
        2022073437ERIOSLOW BRILLIANT RED 3G
        2022075057ERIOSLOW BRILLIANT RED 3G
        2022071190ERIOSLOW BRILLIANT RED 3G
        2022073100ERIOSLOW BRILLIANT RED 3G
        2022076276ERIOSLOW BRILLIANT RED 3G
        2022071294ERIOSLOW BRILLIANT RED 3G
        2022071986ERIOSLOW BRILLIANT RED 3G
        2022072042ERIOSLOW BRILLIANT RED 3G
        2022068646ERIOSLOW DEEP BLACK RHK-2000
  • Anonymous's avatar
    Anonymous
    Not applicable
    Group NameProduct
    ECLASSECLASS RED
    ECLASSECLASS GREEN
    ECLASSECLASS YELLOW
    ECLASSECLASS WHITE
    NEONNEON BLUE
    NEONNEON VIOLET
    NEONNEON PURPLE
    NEONNEON INDIGO
    LASTVOLLASTVOL PINK
    LASTVOLLASTVOL BLACK
    LASTVOLLASTVOL LIME
    LASTVOLLASTVOL BROWN

     

     

     202206202206202206202207202207202207202208202208202208 
    Product Name WD10 June VS May WD10-June WD10-May WD10 June VS May WD10-June WD10-May WD10 June VS May WD10-June WD10-May 
    NEON BLUE                          1,376           5,639           4,263                             806           5,318           4,512                             789           5,481           4,692***NEON BLUE is > 0, then NEON INDIGO should also be highlighted with same colour (YELLOW), as they both belong to SAME Group of NEON
    NEON BLUE                      (31,543)         41,183         72,726                      (37,455)         28,624         66,079                      (37,777)         33,949         71,727
    ALBA STRING                           (881)              708           1,589                        (1,273)              596           1,869                        (1,485)              661           2,146
    LASTVOL PINK                                -             1,167           1,167                                -             1,319           1,319                                -             1,656           1,656
    LASTVOL BLACK                             (27)              648              675                             (46)              514              560                             (46)              536              582
    NEON INDIGO                             149           1,404           1,255                             (67)           1,343           1,410                             (97)           1,404           1,501
    NEON INDIGO                             789           5,196           4,407                           (186)           5,071           5,257                           (470)           5,637           6,107
    ALBA SUMMER                                -                    -                   -                                  -                    -                   -                                  -                    -                   -  
    LASTVOL LIME                                -             1,020           1,020                           (357)              883           1,240                           (370)              820           1,190
    LASTVOL BROWN                           (314)         16,485         16,799                               19         24,649         24,631                           (890)         14,851         15,742
    NEON PURPLE                             (27)           3,526           3,553                             260           3,757           3,497                             314           3,281           2,967
    Grand Total                      (30,477)         76,976      107,454                      (38,299)         72,074      110,374                      (40,032)         68,276      108,309 
              Same for LASTVOL
    • lbendlin's avatar
      lbendlin
      Super User

      Your second table is not in a format that can be used.  Power Query doesn't know what to do with multiple headers.  Can the first two rows be combined?

       

      This is what a usable format would look like:

      let
          Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jZTBbsIwDIZfpeLsSbHjOMkRBkIdpSAY44A4oG3HbdI0Dnv7FaSJxmYTkXr5+tX5naTZ7QbLz4+X4/NX1R7eXgcwIEfkpNqO0d09HN81mh++f0m0UjRSslK6SHvYDdrJoq1GzWbSva8uI4D4XCIGEq8tj0lbAUlbnFBbkunv+RkBUzFXJIgkfUIJhLhPRMDFIrT3kLkgEbs68TzzsBkNq/Xjqm6nZbiT5lRbCCFlo4UsWktiNRHVPgGynEM0w/Xj06KplnU706VQ4g3IY74BSTBJT6gfYdQM72c2OyfLYrBLgWyZOMu8WJZ6Z6Fux/V0ocOyY40oBNM4e/MhuhtqBYf/JwiAeq+5KxS15SJqRMFY4hUSQNc/lZv5fLLqFHf16e9aU88nuhtHpmeDupGSWS3iK5qthrkMMVottm1fQun++aBIzMWxpO4SYEN8sX7IkEJJAkTuHZflZrVs1Ap4CCQGBa9R1DvjgbNBpC8vgtz9hvv9Dw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column3 = _t, Column4 = _t, Column6 = _t, Column7 = _t, Column9 = _t, Column10 = _t]),
          #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
          #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Product Name"}, "Attribute", "Value"),
          #"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Value", Int64.Type}})
      in
          #"Changed Type"
      • Anonymous's avatar
        Anonymous
        Not applicable

        Yes Ibendlin, Thank you for your reply. Yes , Thank you for the suggestion. I wanted to upload the file as attachement in excel but seems there is no option for that.

        Please can you help me on how to get the product in one specific group highlighted when diff > 0. Is there a DAX function for the same. Thank you