Forum Discussion

crsjunior's avatar
crsjunior
Icon for Advocate I rankAdvocate I
2 years ago
Solved

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.

 

 

  • Anonymous's avatar
    Anonymous
    2 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's avatar
    ExcelMonke
    Icon for Impactful Individual rankImpactful Individual

    Try the following symbol: >=

    You can also try <=
    Alternatively, you can also use the ROUND function

  • Anonymous's avatar
    Anonymous
    Not 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.