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.
I have a tooltip page which displays the time of an event when it is hovered over on a line chart - this works well. The field being used in the card on the tooltip is a Time Only type and has a summation method of "earliest".
Line Chart:
Tooltip page with the top card selected:
The problem is if there is no data for the day (axis value on line chart) then the tooltip displays "(Blank)". I would like to change this to the string "Not Detected".
I have tried creating a measure:
Solved! Go to Solution.
Perhaps try one of these:
event1Time tooltip =
var result = MIN(event1table[eventTime]) & ""
return
if(
result = BLANK(),
"Not Detected",
result
)
event1Time tooltip =
var result = MIN(event1table[eventTime]) & ""
return
if(
result = "#,0.00",
"Not Detected",
result
)
Another solution that I just found which worked, reformatting the output:
event1Time tooltip =
var result = MIN(event1table[eventTime])
return
if(
result = BLANK(),
"No Data",
FORMAT(result, "h:nn AM/PM")
)
Perhaps try one of these:
event1Time tooltip =
var result = MIN(event1table[eventTime]) & ""
return
if(
result = BLANK(),
"Not Detected",
result
)
event1Time tooltip =
var result = MIN(event1table[eventTime]) & ""
return
if(
result = "#,0.00",
"Not Detected",
result
)
Thanks @Greg_Deckler , the first measure worked:
event1Time tooltip = var result = MIN(event1table[eventTime]) & "" return if( result = BLANK(), "Not Detected", result )
It now displays the time instead of the "#,0:00".
Could you help me understand what adding the & "" did to solve this? Does this force it to format result as a string?
Thanks!
@lachlanP Bingo, forces it to a string.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |