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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
ArchStanton
Impactful Individual
Impactful Individual

Conditional Formatting within Tooltip

Hi

I have a measure that shows the Max and Min value in a Matrix - it works no problem.

 

However, I cannot get this to work as a tooltip - is it even possible?

 

MinMaxMeasure =
VAR ValuesDisplayed =
    CALCULATETABLE (
        ADDCOLUMNS (
            SUMMARIZE ( 'Cases', 'Cases'[PrimaryTopic2] ),
            "Count", [Primary Topics]
        ),
        ALLSELECTED ()
    )
VAR MinVal =
    MINX ( ValuesDisplayed, [Count] )
VAR MaxVal =
    MAXX ( ValuesDisplayed, [Count] )
VAR CurrentValue = [Primary Topics]
VAR Result =
    SWITCH ( TRUE (), CurrentValue = MinVal, 1, CurrentValue = MaxVal, 2 )
RETURN
    Result

 

Thanks

1 ACCEPTED SOLUTION

Hi,

Thanks for the help with this, its much appreciated.

 

Unfortunately, this isn't the behaviour I'm looking for as a solution, I need the Max & Min month name to be showing in the tooltip, preferably in its own column, your solution doesn't make it immediately obvious what months out of a possible 12 are the Max and Min.

I will close this ticket and re-open a new one.

It maybe the fact that what I'm asking for is not even possible so it will be good to re-issue a new version of this ticket to see if that even possible.

Once again, thanks for all your help!

View solution in original post

25 REPLIES 25

Hi, I am using the latest version of PowerBI (2.149.1429.0) so I'm not sure why I'm getting these error messages? I'm based in the UK so maybe there's a delay here?

Anyway, I'm not far from finding a solution to this thanks to the help of another superuser (see thread below). The problem I'm having is that I have NULLs in my data so when counting the Min value it's picking up NULLs up instead of the MinCount.

DataVitalizer
Super User
Super User

Hi @ArchStanton 

You need to force the measure to always consider the full set you want, ignoring the current tooltip row context:

MinMaxMeasureTooltip =
VAR ValuesDisplayed =
CALCULATETABLE (
ADDCOLUMNS (
SUMMARIZE ( 'Cases', 'Cases'[PrimaryTopic2] ),
"Count", [Primary Topics]
),
ALLSELECTED('Cases'[PrimaryTopic2]) // make sure all rows are included
)
VAR MinVal = MINX(ValuesDisplayed, [Count])
VAR MaxVal = MAXX(ValuesDisplayed, [Count])
VAR CurrentValue = SELECTEDVALUE('Cases'[PrimaryTopic2])
VAR Result =
SWITCH(
TRUE(),
CurrentValue = MinVal, "Min",
CurrentValue = MaxVal, "Max",
BLANK()
)
RETURN
Result

 

Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡

🟩 Let's connect on LinkedIn

I tried your code and got the following error:

ArchStanton_0-1768581480684.png

 

krishnakanth240
Power Participant
Power Participant

Hi @ArchStanton 

 

Can you please share the screenshot what exactly you are viewing when you add the above measure into table visual for the tooltip. Can you explain how the output should be.  Thank you!

So the tooltip should show red (Max) and Blue (Min) for the monthly values 
Jan = MIN

Aug Max

 

As you can see, it works fine in the Matrix but its in the tooltip that I want to be able to see the Max & Min

ArchStanton_1-1768581925209.png

 

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.