Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to calculate percentages?

hey

what will be the expression to calculate margin percentage for 'total sales' and 'total cost'?

i need help with the expression.

i have used variables like

margin = 'vCm'

total cost price = ' vCcost '

total sales price = ' vCs'

so here i would like to calculate the margin percentage using the above variables>>what would be the expression to calculate??

thanks

5 Replies
Clever_Anjos
Employee
Employee

Percentage are expressions that reflects the ratio of two values

So you have to divide one value by another, what are the values of the variables above?

Not applicable
Author

vCm =  sum( {<Year={'$(vCy)'}>}LineSalesAmount)-sum ({<Year={'$(vCy)'}>}CostOfGoodsSold)

vCcost =  sum( {<Year={'$(vCy)'}>}CostOfGoodsSold)

vCs = sum( {<Year={'$(vCy)'}>}LineSalesAmount)

Clever_Anjos
Employee
Employee

% = num(vCcost / vCs, '#,##0.00%')

Not applicable
Author

error in expression

Clever_Anjos
Employee
Employee

Would you mind sharing a sample of your  data