Forum Discussion
How to make comparisons with float in DAX?
- 4 years ago
Hi, Anonymous
I checked your measure 'indicador base64' and found that you have offset the calendar table by one day.
DateADD( oCalendario[Date], -1, Day )You may need to remove this filter. The code in the SWITCH section is sufficient for your needs.
Best Regards,
Community Support Team _ Eason
Anonymous , Try to use unichar like this, see if that can help
/////Arrow
Arrow =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, UNICHAR(9650),
_change = 0, UNICHAR(9654),
_change < 0, UNICHAR(9660)
)
/////Arrow Color , use in conditional formatting using field value option
Arrow color =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, "green",
_change = 0, "blue",
_change < 0, "red"
)
UNICHAR - Tool for Custom Icon Formatting: https://www.youtube.com/watch?v=veCtfP8IhbI&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=50
Thanks for replying, my icon works fine, my problem is with the values ββin the comparison. Note that the value is negative but the icon points to positive! I believe it is a problem with decimal numbers since this only happens when the value has places to the right (-0.05, -0.065, ...)