Forum Discussion

Simon_29's avatar
Simon_29
Icon for Helper II rankHelper II
4 years ago
Solved

Power query has a problem with decimal places under conditions

Hello,

I have a problem that under the condition in Power Query, which I highlighted in yellow, the column called "Check 70% Margin" gives an incorrect output in the form of "no" as can be seen in the picture. In the first line (when I count integers) it throws the correct output, but in decimal numbers (the second line) it gives the output as "no" and there is a correct result.

Has anyone already had a similar problem that you could refer me to him?

Thank you very much for your help.

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Simon_29 

     

    You can use Number.Round: 

    Number.Round( [Column2]/[Column1],1)=0.7

     

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Simon_29 

     

    You can use Number.Round: 

    Number.Round( [Column2]/[Column1],1)=0.7

     

    • Simon_29's avatar
      Simon_29
      Icon for Helper II rankHelper II

      Hi Vera:) 

      Your solution worked. I had never thought of such a possibility before.
      Thank you very much:) 

  • FarhanAhmed's avatar
    FarhanAhmed
    Icon for Community Champion rankCommunity Champion

    Your column Submitted TCV has an unassigned data type. change the type to decimal for both Submitted columns and check your results.

    • Simon_29's avatar
      Simon_29
      Icon for Helper II rankHelper II

      Hi,
      I've tried this before and it didn't work. However, Vera33 below in this post gave the right solution and it already works.
      Thank you very much 🙂