erikwiffin / 0.30000000000000004

Floating Point Math Examples

Home Page:https://0.30000000000000004.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DAX example

hernandemczuk opened this issue · comments

There are not that many examples of this in Data Analysis Expressions (DAX),

It would be:

EVALUATE { VAR _sum = 0.1 + 0.2 // 0.30000000000000004 RETURN IF( _sum = 0.3, ":)", ":(" ) }

EVALUATE { VAR _sum = CURRENCY( 0.1 ) + CURRENCY( 0.2 ) // 0.3 RETURN IF( _sum = 0.3, ":)", ":(" ) }

Thanks @hernandemczuk, but I'm not familiar enough with DAX to feel confident adding it as an example myself. If you submit a PR, I'd be happy to merge it.