Forum Discussion
Margin % Calculation
Hello got the below table in which I'm displaying the sales by Engineer per year
what I want now is to calculate per engineer per year the Margin(%) which is calculated as follows (pseudo code):
for 2010: (sales (2010) - sales(2009)) / sales(2009)
if the Sales measure is defined as follows:
Sales = CALCULATE(sum(Transactions[cSales]),Transactions[SDLNTY]="SA" || Transactions[SDLNTY]="RG" )
what would be the sales of previous year?
Please advise
8 Replies
- SeanCommunity Champion
PY Sales = CALCULATE ( [Sales], PREVIOUSYEAR(CalendarTable[Date])
YoY $ = [Sales] - [PY Sales]
YoY % = DIVIDE ( [YoY $], [PY Sales], 0)
- alihijaziHelper I
Can I share with you the file I'm working on?
it didn't work for me the previous year sales; it is giving blanks
- SeanCommunity Champion
Do you have a Calendar Table?
If not visit MattAllington's link - http://www.powerpivotpro.com/2015/02/create-a-custom-calendar-in-power-query/
Time Intelligence Functions require the presence of a Calendar Table