cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
mgerusdurand
Level IV

Difference despite same numbers...

Hello,

 

Today I have a non-understanding question.

I have 2 columns of products prices. I wanted to check that same numbers are the same in the 2 columns so I created a formula column with the formula 

If( :"Mean(Final Price)"n != :prixLot / 100,
"Yes",
"No"
)

 

Even if same number was in the 2 columns (exactly the same including decimals) then the formula returned me a "Yes".

 

So I did difference column: :Prix Lot - :"Mean(Final Price)"n

and I have indeed difference. See image attach.

 

How this could be possible? Does anyone can help me please? 

mgerusdurand_0-1696845295003.png


What am I missing here????

Thanks for your help

MGD
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Difference despite same numbers...

Floating point math most likely Floating Point Math (https://0.30000000000000004.com/). One option is to round the values to same decimal before performing the comparison (add more decimals to your columns and you might be able to see what is going on, you might also have to increase the width of column from column properties).

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Difference despite same numbers...

Floating point math most likely Floating Point Math (https://0.30000000000000004.com/). One option is to round the values to same decimal before performing the comparison (add more decimals to your columns and you might be able to see what is going on, you might also have to increase the width of column from column properties).

-Jarmo
mgerusdurand
Level IV

Re: Difference despite same numbers...

Thanks Jarmo,

It is actually that. I forget that I did a mean and didn't change the format so JMP is keeping the whole mean not truncated. It is now working. 

An easy one but I couldn't figure out on monday morning.

 

Best,

 

Marie

 

 

MGD