Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a variable vSalesUnits which is a total of units.
I have a variable vSalesRevenue which is a total of types of revenues.
Each are working independently but when I try to create a new variable for the Per Unit called vSalesPer_Unit where I divide the total revenue by the units, I can't get it to calculate.
vSalesPer_Unit is defined like this:
$(vSalesRevenue ) / $(vSalesUnits )
... doesn't work for me
I've tried putting additional () around each, doesn't work
($(vSalesRevenue )) /( $(vSalesUnits ))
I've tried the Div function with and without extra parentheses, didn't work.
I searched and found a few postings of other people having a similar issue, but I can't find a solution other than extra parentheses.
Can someone tell what am doing wrong or make a suggestion?
Thank you very much!
Maybe your variable-result contains a comma as thousand/decimal-delimiter. That's fine by a single-output but it's not a valid number if you want to calculate anything on top of it. In this case you could either adjust the formatting by the variable-creation or you need to consider it by calling the variables, for example with something like:
num(num#($(vSalesRevenue ), '#.##0,00', ',', '.') / num#($(vSalesUnits ), '#.##0,00', ',', '.'), 'YourFormat')
- Marcus
Thank you Marcus!
While I was trying your suggestion, I noticed a space after one of the variable names before the second parentheses of the dollar sign expansion. I admit I did not think that would cause an issue, but that seems to have been it. I fixed it and now it calculates just fine.
I had $(vSalesUnits ) instead of $(vSalesUnits)
Thank you both for your quick responses.
Does this work for you?
vDivide =vSalesRevenue/vSalesUnits
Maybe your variable-result contains a comma as thousand/decimal-delimiter. That's fine by a single-output but it's not a valid number if you want to calculate anything on top of it. In this case you could either adjust the formatting by the variable-creation or you need to consider it by calling the variables, for example with something like:
num(num#($(vSalesRevenue ), '#.##0,00', ',', '.') / num#($(vSalesUnits ), '#.##0,00', ',', '.'), 'YourFormat')
- Marcus
Thank you Marcus!
While I was trying your suggestion, I noticed a space after one of the variable names before the second parentheses of the dollar sign expansion. I admit I did not think that would cause an issue, but that seems to have been it. I fixed it and now it calculates just fine.
I had $(vSalesUnits ) instead of $(vSalesUnits)
Thank you both for your quick responses.