Forum Discussion
previousmonth does not work
- 6 years agoTry Below
lastmonth = CALCULATE(SUM(Data[Salary]),PREVIOUSMONTH(Data[Date]))
Thanks
Ankit JainDo Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.
my expect matrix is below
Date Department Staff type Staff Salary lastmonthsalary
04-01-2019 A R Peter 1
04-01-2019 A C Mary 2
04-01-2019 B R John 3
04-01-2019 B C James 4
04-01-2019 C C Henry 5
05-01-2019 A R Peter 2 1
05-01-2019 A C Mary 3 2
05-01-2019 B R John 4 3
05-01-2019 B C James 5 4
05-01-2019 C C Henry 6 5
06-01-2019 A R Peter 3 2
06-01-2019 A C Mary 4 3
06-01-2019 B R John 5 4
06-01-2019 B C James 6 5
06-01-2019 C C Henry 7 6