Building something similar to a calculator app where users input multiple values in multiple fields on a single page. I would like to perform calculations on these user inputs similar to calculations I could make in excel or google sheets. This is an example of a formula I would like to put into an expression that would be displayed for the user in a text box(and maybe later can be saved to a database)
Billing_Cost=(min(Total_Hours_Billed,Hours_Logged_Employee_A)×Hourly_Rate_Employee_A)+(max(0,Total_Hours_Billed−Hours_Logged_Employee_A)×Hourly_Rate_Employee_B)
I tried using expressions and was not able to get it working. Im also curious to know whether there is a more efficient way of making these calculations in the backend. Your help is truly appreciated.