Forum Discussion

Allen_R's avatar
Allen_R
Frequent Visitor
1 year ago
Solved

Conditional Format Largest Value in Each Row Within Matrix Visual

The following matrix shows the sales_vs_plan for each week so far this year by market_area and highlights the largest value in each row.  I'm trying to duplicate a similar visual in Power BI but have...
  • Greg_Deckler's avatar
    1 year ago

    Allen_R Try this:

    Measure 2 = 
        VAR __Market = MAX('Table6'[market_area])
        VAR __Value = SUM( 'Table6'[sales_vs_plan] )
        VAR __Table = SUMMARIZE( FILTER( ALL( 'Table6' ), [market_area] = __Market ), [week], "__Value", SUM( Table6[sales_vs_plan]) )
        VAR __Max = MAXX( __Table, [__Value] )
        VAR __Result = IF( __Value = __Max, "#00FF00", "" )
    RETURN
        __Result