Forum Discussion
wwii
9 years agoFrequent Visitor
Calculate Marginal Ratio in PowerBI
Hi, I wonder is there any quick way to calculate a marginal profit ratio, i.e. (x-y)/x in PowerBi? Thank you and I appreciate.
wwii
9 years agoFrequent Visitor
I used this formula,
YoY% = var Sales = SUM(SalesTable[Amount])
var SalesLastYear=CALCULATE(Sales, SAMEPERIODLASTYEAR(Calenda[Date]))
return if(Sales, DIVIDE(Sales - SalesLastYear, Sales))
But the outcome is all 0.
Is there is a way to know why?
Thanks
Baskar
Resident Rockstar
9 years agoHi
First u have to check whether u have getting correct data from SalesLastYear , Sales
Then do the calculation that will help u to understand , where u r missing .
otherwise share some sample data i will help u.