Forum Discussion
Unexpected number comparsion result
Hello,
I'm comparing decimal columns. There's a min and max goal and a accomplished value.
On a row I have accomplished 52, and the goal is between 48 - 52. My dax formula is returnin the 52.00 accomplished greater than 52 goal.
Why is it not understanding as equals? Already looked up to any number after the zeros, it's a round 52.
Here it's returning greater than. (I'm on Brazil, here "," is for decimal).
If i force it to INT it returns equal.
- Anonymous2 years ago
Hi crsjunior ,
I create a table as you mentioned.
Then I create a calculated column.
Column = IF('Table'[Number]>'Table'[Max],1,'Table'[Number])I think the reason why you can not achieve your requirements is 52,000000 is not a Decimal number type. So I think you can change it.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- ExcelMonke
Impactful Individual
Try the following symbol: >=
You can also try <=
Alternatively, you can also use the ROUND function - AnonymousNot applicable
Hi crsjunior ,
I create a table as you mentioned.
Then I create a calculated column.
Column = IF('Table'[Number]>'Table'[Max],1,'Table'[Number])I think the reason why you can not achieve your requirements is 52,000000 is not a Decimal number type. So I think you can change it.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.