Forum Discussion
Conditional Formatting within Tooltip
- 6 months ago
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!
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 💡
I tried your code and got the following error: