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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
ArchStanton
Impactful Individual
Impactful Individual

Min Max Tooltip & future months

I want to be able to use conditional formatting (cell colour) to show the Max and Min month in a tooltip.

 

The problem I'm having is that current measure doesn't work because its showing Feb & Mar (my data hasn't been refreshed since January) as MIN - there is no data available for these months.

 

Fig.1

ArchStanton_0-1771243013692.png

I have these 3 items in my Visualisations pane:

Fig.2.

ArchStanton_1-1771243225158.png

# = 
COUNT('Cases'[PrimaryTopic2])

 

Mth = is the FY Month Field from my Calendar

 

MinMax Tooltip = 
VAR AllTopics =
    CALCULATETABLE (
        ADDCOLUMNS ( VALUES ( 'Cases'[PrimaryTopic2] ), "Value", [Primary Topics] ),
        ALLSELECTED ( 'Cases'[PrimaryTopic2] )
    )
VAR NonBlankValues =
    FILTER ( AllTopics, NOT ISBLANK ( [Value] ) )
VAR MinValue =
    MINX ( NonBlankValues, [Value] )
VAR MaxValue =
    MAXX ( NonBlankValues, [Value] )
VAR CurrentValue = [Primary Topics]
RETURN
    SWITCH (
        TRUE (),
        CurrentValue = MinValue, "MIN",
        CurrentValue = MaxValue, "MAX",
        BLANK ()
    )

I've had some help already just to get to this point so I want to know if this is even possible?

Unfortunately, I cannot share the pbix because of data security.

 

The Matrix visual that requires the MaxMin Tooltip is below - when I place my cursor on the Sparkline I see Fig.1. 
Those blue markers are great but its not obvious what months they are hence the tooltip.

ArchStanton_2-1771243774685.png

Any help would be much appreciated.

1 ACCEPTED SOLUTION

Hi @ArchStanton 
Can you please look into it.

View solution in original post

15 REPLIES 15
v-priyankata
Community Support
Community Support

Hi @ArchStanton 

Thank you for reaching out to the Microsoft Fabric Forum Community.

@DanieleUgoCopp Thanks for the inputs.

I have reproduced the scenario. Please review it and try it on your end. If you still encounter any issues, feel free to reach out to the community.

If there are any deviations from your expectation please let us know we are happy to address. 

Thanks.

Hi,

This is what happens when I use your DAX:

ArchStanton_0-1772099275994.png

I don't want to see Feb or Mar although thats not a must and I only want to see one MIN and one MAX

Could you please confirm which DAX you tried - page 1 or page 2?

There is just one DAX measure that you provided so what relevence is the page?
Page 1 made no sense to me so I looked at page 2 as that almost resembles what I am trying to achieve.

Yes, that's why I wanted to confirm with you. I will try again to meet your requirement and let you know.

Ok thanks. You will need to create a Tooltip page (you most likely know that already)!

Hi @ArchStanton 
Can you please look into it.

Hi,

This works perfectly!!
Thanks for persevering with this for me - much appreciated, it looked like mission impossible as this is the 2nd ticket I raised in relation to it. 

Thanks @ArchStanton.

just one last thing:

I don't want the Sparkline on the Total, I believe the solution is ISINSCOPE but I'm not sure how to use it in this scenario?

 

ArchStanton_0-1772796887750.png

 




Hi @ArchStanton 
Could you please share your PBIX file so we can take a closer look at the issue? Also, as this thread has already been closed, kindly create a new thread for this query so we can assist you further.

Thanks.

Thanks, I'll leave it for now as its not an urgent matter.

I just wanted to know if its possible to stop the sparkline & tooltip appearing for the total thats all.

Hi @ArchStanton 

I hope the information provided was helpful. If you still have questions, please do reach out to the community. we are happy to assits you.

Thanks.

DanieleUgoCopp
Responsive Resident
Responsive Resident

Hello,

I think you can fix it reducing the range that is considering the conditional formatting, you can change your dax to this:

MinMax Tooltip =
VAR LastMonthWithData =
    CALCULATE(
        MAX('Calendar'[Month]),
        FILTER(
            ALL('Calendar'),
            NOT ISBLANK([#])
        )
    )

VAR ValidMonths =
    FILTER(
        ALLSELECTED('Calendar'),
        'Calendar'[Month] <= LastMonthWithData
            && NOT ISBLANK([#])
    )

VAR MinValue =
    MINX(ValidMonths, [#])

VAR MaxValue =
    MAXX(ValidMonths, [#])

VAR CurrentValue = [#]

RETURN
    SWITCH(
        TRUE(),
        CurrentValue = MinValue, "MIN",
        CurrentValue = MaxValue, "MAX",
        BLANK()
    )


Thank you,
Daniele

Thanks Daniele, I tried your code and it removed the 2 future months but there is no Max or Min:

 

ArchStanton_0-1771325131062.png

 

MinMax Tooltip2 = 
VAR LastMonthWithData = 
    CALCULATE(
        MAX(Date2[Mth]),
        FILTER(
            ALL(Date2),
            NOT ISBLANK([#])
        )
    )
VAR ValidMonths = 
    FILTER(
        ALLSELECTED(Date2),
        Date2[Mth] <= LastMonthWithData
            && NOT ISBLANK([#])
    )
VAR MinValue =
    MINX(ValidMonths,[#])

VAR MaxValue = 
    MAXX(ValidMonths, [#])

VAR CurrentValue = [#]

RETURN
    SWITCH(
        TRUE(),
        CurrentValue = MinValue, "Min",
        CurrentValue = MaxValue, "Max",
        BLANK()
    )

 

One other thing, when I use DAX Formatter on the Code I get the following error in the MinValue:

ArchStanton_1-1771325428734.png

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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