I currently have a matrix that looks like the below.
I'm trying to write a measure to conditional format for the measure '01 TOT' that will compare it to the average of ALL the vendors (even when the matrix is filtered) across '01 TOT' by year.
Measure would probably work up to something like the below
So ideally the average amount for 2018 '01 TOT' would be 4.53 and each individual row would compare off that number. Then CAP001 would be red, ENN001 would be green, etc.Side note that '01 TOT' and '02 CR' are measures and not columns. The matrix has been sorted to switch values to rows.
@anna-lee , Try like
Measure = Var _tot = [01 TOT]+0 var _all = calculate([01 TOT], allselected(Table[Vendor]) // or calculate([01 TOT], removefilters(Table[Vendor]) SWITCH(TRUE(),_tot = 0,"white",_tot < _all, "#red",_tot > _all, "#green",)
very similar what I have done here
Scatter Quadrant -Segment in 4 quadrants based on Margin % and Discount, Use Constant Line- https://youtu.be/0k_C_E7YOQY
Hi @amitchandak Your formula's weren't calculating the average. I tried both:
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.