Forum Discussion

RGallagher320's avatar
RGallagher320
Frequent Visitor
5 years ago
Solved

Total column not using formatted values

I have four columns. Let's call them Column A, B, C and D.  I am making a new column (E), that is A - (B+C+D).  I formatted ALL columns to Decimal number and 2 decimal numbers.  But for example, if A = 10.00 and B=0.00, C=10.00 and D=0.00, then 10.00-(0.00+10.00+0.00) = 0.00.  I am noticing though if I do a check on the total, it's sometimes not resulting to TRUE in my SWITCH statement. I am finding out that it's resulting in a very close to zero negative number (like -.0000000321).  So it appears that it's not using the 0.00 result in the SWITCH statement (it's using the close to zero negative number instead).  Any thoughts why it wouldn't use the two decimals if it's formatted that way? Thanks!

  • Hi RGallagher320 ,

     

     You can also format the measure and the new column to Decimal number and 2 decimal numbers. When you format the column and measure, it will just change the displayed content does not change the true value of the underlying data, and the formula uses the underlying data

     

    In your case, when you change column B and column D to Decimal number and 2 decimal numbers , the underlying value for them could be  such as 0.00123 and 0.00000001233113, and you limit them to 2 decimal numbers , so it will show like 0.00. 

     

    Underlying data:

     

    Result:

     

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best Regards,

    Dedmon Dai

3 Replies

  • hi RGallagher320 ,

     

    the decimals that you see is only visual so if you have more values on the number it will calculate accordingly. I suggest you make the use of the round when making the calculating. 

  • v-deddai1-msft's avatar
    v-deddai1-msft
    Community Support

    Hi RGallagher320 ,

     

     You can also format the measure and the new column to Decimal number and 2 decimal numbers. When you format the column and measure, it will just change the displayed content does not change the true value of the underlying data, and the formula uses the underlying data

     

    In your case, when you change column B and column D to Decimal number and 2 decimal numbers , the underlying value for them could be  such as 0.00123 and 0.00000001233113, and you limit them to 2 decimal numbers , so it will show like 0.00. 

     

    Underlying data:

     

    Result:

     

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best Regards,

    Dedmon Dai