Newbies Malcolm99 Posted February 9, 2021 Newbies Posted February 9, 2021 I am new to FM and am wanting some help with a calculation. I have four fields, rate1 & rate2, quantity & result. What I am trying to figure out is how to have a calculation that will calculate the result of the value in the quantity field divided by the rate where if the field rate2 has no data (is empty) the calculation formula will use rate1 to calculate the result. However if there is a value in the field rate2 then the result should be calculated based on this rate2 and not use the value found in rate1. Appreciate any direction and help. Thanks
Ocean West Posted February 9, 2021 Posted February 9, 2021 Quantity * GetValue ( List ( Rate2 ; Rate1 ) ; 1 )
Newbies Malcolm99 Posted February 9, 2021 Author Newbies Posted February 9, 2021 Thanks thats exactly what was needed. Works as I wanted.
comment Posted February 10, 2021 Posted February 10, 2021 10 hours ago, Malcolm99 said: if the field rate2 has no data (is empty) the calculation formula will use rate1 IMHO it would be much simpler to do exactly what you said: quantity / If ( IsEmpty ( rate2 ) ; rate1 ; rate2 ) instead of converting the values to text, stacking them into a list, extracting the first value from the list and converting it back to number. 1
Ocean West Posted February 10, 2021 Posted February 10, 2021 After second thought I would agree that what @comment suggests is actually better.
Recommended Posts
This topic is 1393 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now