Forum Discussion
Allen_R
1 year agoFrequent Visitor
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...
- 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
Ritaf1983
1 year agoSuper User
Hi Allen_R
You can use a dax formula like
max_ value =
var max_area = CALCULATE(MAXX(SUMMARIZE('Table','Table'[week],'Table'[market_area],"sum",[sales_Vs_plan_]),[sum]),ALLSELECTED('Table'[week]))
var max_total = CALCULATE(MAXX(SUMMARIZE('Table','Table'[week],"sum",[sales_Vs_plan_]),[sum]),ALLSELECTED('Table'[week]))
RETURN
if (HASONEFILTER('Table'[market_area]),
if([sales_Vs_plan_]=max_area,"Light Green"),
if([sales_Vs_plan_]=max_total,"Light Green"))
+
Note that you are using the modifications of values and totals at the conditional formatting:
Note that you are using the modifications of values and totals at the conditional formatting:
The result:
Pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.