Forum Discussion
fdkza
7 years agoFrequent Visitor
Determine Minimum and Maximum Value in Row in Matrix
Hi I am relatively new to power bi I have a dataset that looks as follows Country Supplier Value A Acme 10 A Illuminati 12 A Batman 14 B Acme 20 B Illumi...
- 7 years ago
Hi,
You can use a MEASURE to do the conditional formatting
Measure = VAR mymin = CALCULATE ( MIN ( Table1[Value] ), ALL ( Table1[Supplier ] ) ) VAR mymax = CALCULATE ( MAX ( Table1[Value] ), ALL ( Table1[Supplier ] ) ) RETURN SWITCH ( TRUE (), SUM ( Table1[Value] ) = mymin, "#FF7F00", SUM ( Table1[Value] ) = mymax, "#2AAAFF" )Now in the Conditional Formatting dialogue
Select as follows
Zubair_Muhammad
Community Champion
7 years ago
Hi,
You can use a MEASURE to do the conditional formatting
Measure =
VAR mymin =
CALCULATE ( MIN ( Table1[Value] ), ALL ( Table1[Supplier ] ) )
VAR mymax =
CALCULATE ( MAX ( Table1[Value] ), ALL ( Table1[Supplier ] ) )
RETURN
SWITCH (
TRUE (),
SUM ( Table1[Value] ) = mymin, "#FF7F00",
SUM ( Table1[Value] ) = mymax, "#2AAAFF"
)
Now in the Conditional Formatting dialogue
Select as follows
- Zubair_Muhammad7 years ago
Community Champion
- fdkza7 years agoFrequent Visitor
- fdkza7 years agoFrequent Visitor
Just one last question :) If i want to count the number of values where supplier is the cheapest or the most expensive how will i go about it.
- Anonymous4 years agoNot applicable
Hi Zubair_Muhammad,
Thank you, this work perfect incase all my value >0
I am struggling to highlight min value of each row >0
Could you please advise how to do it. Thank you somuch
This is desired output
Area Price 1 Price 2 Price 3 A 0 12 15 B 20 40 0