Forum Discussion
Highlight max value for each row in a matrix
- 4 years ago
Anonymous
I create a measure for the conditional Formatting as follows, modify your table and column names as per your model. I also attached the file below my signature.MaxInRow = VAR __MaxUnits = MAXX( ALLSELECTED( Data[Month Number] ), [Total Units] ) RETURN IF( [Total Units] = __MaxUnits, "RED" )
Anonymous
I create a measure for the conditional Formatting as follows, modify your table and column names as per your model. I also attached the file below my signature.
MaxInRow =
VAR __MaxUnits =
MAXX(
ALLSELECTED( Data[Month Number] ),
[Total Units]
)
RETURN
IF(
[Total Units] = __MaxUnits,
"RED"
)
This is very helpful I have used this for one of my matrix's. What if you add one more layer to this problem. For each item that you want to identify the max value of, there is a layer above that?
Example.
I have a switch true measure that allows me to have multiple measures in a matrix. I have a power bi that would put two teams as a matchup, it would then show the dates of the last times they have competed.
I can use your method when Date is not in this equation and you are only looking strictly at two teams. But once you put date above it in a matrix it will not come in correctly. Your formula would read something like this. How would i write it so it looks at not just teams but isolates the specific dates when they competed too?
VAR __MaxUnits =
MAXX(
ALLSELECTED( team ),
[Switch True Measure]
)
RETURN
IF(
[Switch True Measure] = __MaxUnits,
"RED"
)