Forum Discussion
SirBI
3 years agoFrequent Visitor
Hide Title when icon is blank
I have created a trend icon, see code below.
I added this into a "card" and added a title.
I need to hide the title when the "NuteralIcon" is displayed, which is blank.
Any help on how to do this?
FailTrendIcon =
var PostiveIcon = "▲"
var NegativeIcon = "▼"
var NuteralIcon = " "
var Result = switch(
true(),
ds_failrate[FailRateCompare] >= .02, PostiveIcon,
abs(ds_failrate[FailRateCompare]) >= 0 && abs(ds_failrate[FailRateCompare]) < .02, NuteralIcon,
ds_failrate[FailRateCompare] <= -.02,NegativeIcon)
Return Result
Create another measure for the card title that has the same logic but returns BLANK() for the second condition.
By the way,
abs(ds_failrate[FailRateCompare]) >= 0is meaningless as it will always be true.
1 Reply
- lbendlin
Super User
Create another measure for the card title that has the same logic but returns BLANK() for the second condition.
By the way,
abs(ds_failrate[FailRateCompare]) >= 0is meaningless as it will always be true.