Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to highlight the least and highest value in a matrix columnwise?

In a matrix visual how to achieve highlighting of the low and high vaues, each column wise?

 

 

I have this measure,

MinMax =
VAR Vals =
CALCULATETABLE(
ADDCOLUMNS (
SUMMARIZE ( Sheet1, Sheet1[Portal Error Reason],Sheet1[MonthRanking] ),
"@SalesAmt", [Portal Error]
),
ALLSELECTED ()
)
VAR MinValue = MINX ( Vals, [@SalesAmt] )
VAR MaxValue = MAXX ( Vals, [@SalesAmt] )
VAR CurrentValue = [Portal Error]
VAR Result =
SWITCH (
TRUE,
CurrentValue = MinValue, 1, -- 1 for MIN
CurrentValue = MaxValue, 2 -- 2 for MAX
)
RETURN
Result
This measure is being added as a condition for coloring (conditional format by rule if 1 - yellow, 2 - Rose), this one highlights the overall highest value but what I want is to be able to highlight columnwise for both low and high values
How to modify this?
 
The visual uses a measure, for the counts.
 
Thanks
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

Switch( true() ,
[Portal Error] = calculate(Minx(values(Sheet1[Portal Error Reason]),[Portal Error]), removefilters(Sheet1[Portal Error Reason])) ,1

[Portal Error] = calculate(Maxx(values(Sheet1[Portal Error Reason]),[Portal Error]), removefilters(Sheet1[Portal Error Reason])),2
)

 

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

Switch( true() ,
[Portal Error] = calculate(Minx(values(Sheet1[Portal Error Reason]),[Portal Error]), removefilters(Sheet1[Portal Error Reason])) ,1

[Portal Error] = calculate(Maxx(values(Sheet1[Portal Error Reason]),[Portal Error]), removefilters(Sheet1[Portal Error Reason])),2
)

 

 

Anonymous
Not applicable

Thanks a lot, @amitchandak 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.