Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Does anyone have an idea of why would this expression results with different results?
if("Balance" - "Safety Stock" < "Safety Stock", "Balance" - "Safety Stock", 0)
Items marked in yellow are expected to show 0 in the last column:
Thanks
For 4th row values after your condition
1. Step
"Balance" - "Safety Stock"
38168 - 27000 = 11168
2. Step
"Balance" - "Safety Stock" < "Safety Stock"
11168 < 27000
This statement is true so for this true part of the statement execute
That is "Balance" - "Safety Stock"
Then why you expecting 0 let me know.
Try this?
if(("Balance" - "Safety Stock") < "Safety Stock", ("Balance" - "Safety Stock"), 0)
You have to write this
if("Balance" - "Safety Stock" < "Safety Stock", 0, "Balance" - "Safety Stock")
Thx, but I tried that before posting the question. Just one detail, those are not field names but column labels.
No, that does not work. I want to show red lines with actual numbers, and others with 0. If you look my screenshot you would see that lines 1 and 2 are fine, but lines 4, 7, 8, 10 are not. How come?
Can you attach inline because i just tested and it's working.. I am not sure Where you made mistake. Are you doing this in script / UI ??
If UI, Try this? May be
if((Balance - [Safety Stock]) < [Safety Stock], (Balance - [Safety Stock]), 0)
This should work as i feel, But if number format issue, You could define Num() .. over expression
For 4th row values after your condition
1. Step
"Balance" - "Safety Stock"
38168 - 27000 = 11168
2. Step
"Balance" - "Safety Stock" < "Safety Stock"
11168 < 27000
This statement is true so for this true part of the statement execute
That is "Balance" - "Safety Stock"
Then why you expecting 0 let me know.
I apologize, it is consistent with the expression used. My mistake.
Thanks for your time. I'll mark all your replies helpful.