Forum Discussion

sridhar71's avatar
sridhar71
Helper I
3 years ago
Solved

Conditional formatting for each matrix row

I have a Matrix table that shows Inventory turnover for each Vendor. I want to know If I have different conditions for each Vendor. For Ex if the value or Vendor1 >= 300 then use orange but for Ven...
  • mariussve1's avatar
    mariussve1
    3 years ago

    I have uploaded a test .pbix file that are working.

    Does not look like I have possibilites to upload the file. If needed, I can email it to you. Please let me know.


    My measure looks like this: (Could you try to change yours as well, and use AND () instead of &.

    Color measure =
    SWITCH (
        TRUE(),
        AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor1", SUM ( 'Table'[Value] ) = 100 ), "#e30b5d",
        AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor2", SUM ( 'Table'[Value] ) = 200 ), "#8e4585",
        AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor3", SUM ( 'Table'[Value] ) = 150 ), "#077106",
        AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor4", SUM ( 'Table'[Value] ) = 300 ), "#09387f",
        AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor5", SUM ( 'Table'[Value] ) = 200 ), "#5851db"
    )
     
    I have added a snipping tool of the result, and it works as expected.

     

    Br

    Marius