Forum Discussion

fdkza's avatar
fdkza
Frequent Visitor
7 years ago
Solved

Determine Minimum and Maximum Value in Row in Matrix

Hi    I am relatively new to power bi   I have a dataset that looks as follows    Country Supplier  Value  A Acme 10 A Illuminati 12 A Batman 14 B Acme  20 B Illumi...
  • Zubair_Muhammad's avatar
    7 years ago

    fdkza

     

    Hi,

     

    You can use a MEASURE to do the conditional formatting

     

    Measure =
    VAR mymin =
        CALCULATE ( MIN ( Table1[Value] ), ALL ( Table1[Supplier ] ) )
    VAR mymax =
        CALCULATE ( MAX ( Table1[Value] ), ALL ( Table1[Supplier ] ) )
    RETURN
        SWITCH (
            TRUE (),
            SUM ( Table1[Value] ) = mymin, "#FF7F00",
            SUM ( Table1[Value] ) = mymax, "#2AAAFF"
        )
    

     

    Now in the Conditional Formatting dialogue

    Select as follows