For over an hour I'm trying to make a simple math expression work. I don't get it.
Goal
I'm trying to compare two values. I want to use the result of this comparison in a more complex expression to decide which value should be displayed.
Finally I'll use something like this:
IfElse( IsRange( Math( [BPM manual] - replace([BPM calculated], /,, .) ) , 1-3 ), [BPM calculated], IsEmpty( [BPM manual] ), *[BPM calculated], 1, [BPM manual])
Current state
Math(replace([BPM calculated], /,, .) - [BPM manual])
So, what I am trying to do is a simple subtraction. I used the wiki to figure out how to handle the replace expression to replace the local "," as decimal separator with "." to make the math expression work. It contains two user fields.
BPM calculated
It's an expression field which divides JRiver analyzed bpm value with 4. It looks like this:
Math([BPM (analyzed)] / 4)
BPM manual
This is an user data integer field which only contains numbers with zero decimal places.
Current output with current state
15 - 15 = -45
33,25 - 16 = -99,75
15,25 - 16 = -45,75
33 - 16 = -99
42 - 22 = -126
Can anybody figure out what am I doing wrong?