Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext 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
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
I have these 3 items in my Visualisations pane:
Fig.2.
# =
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.
Any help would be much appreciated.
Solved! Go to Solution.
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:
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,
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.
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?
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.
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:
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:
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 33 | |
| 31 | |
| 29 |