Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Conditional Formatting - Highlight Lowest Value(s)

Need some help in figuring out how to apply conditional formatting that highlights the lowest value(s) (Rating Score) in each column by location (BMCA, BMCAR, BMCH etc.) for a given Year/Month. See e...
  • v-jingzhang's avatar
    5 years ago

    Hi Anonymous 

     

    In your case, you need to create a measure to help set the conditional formatting. I create a sample with some data and use below measure. The measure is to compare the lowest value with each value and return 1 when a value equals to the lowest value. Then format the values by Rules when color measure returns 1.

    Color Measure = 
    VAR _table =
        SUMMARIZE (
            FILTER (
                ALL ( 'Table' ),
                YEAR ( 'Table'[Date] ) = MAX ( DimDate[Year] )
                    && MONTH ( 'Table'[Date] ) = MAX ( DimDate[Month] )
            ),
            'Table'[Location],
            "avg", [Avg.Value]
        )
    VAR _minAvg = MINX ( _table, [avg] )
    RETURN
        IF ( [Avg.Value] = _minAvg, 1, 0 )

     

    Attach the pbix for your reference.

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.