The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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.
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
47 | |
44 |