Forum Discussion
Anonymous
7 years agoNot applicable
partial month calculation
year month amount year month amount 2017 1 1000 2017 1 1000 2017 2 3000 2017 2 2000 2017 3 7000 wanted result-> 2017 3 4000 2017 ...
- 7 years ago
Hi Anonymous,
Maybe you could try to modify the formula as below:
Column = VAR a = 'Table1'[month] - 1 RETURN [amount] - CALCULATE ( SUM ( Table1[amount] ), FILTER ( 'Table1', 'Table1'[month] = a && 'Table1'[year] = EARLIER ( Table1[year] ) && 'Table1'[code] = EARLIER ( Table1[code] ) && 'Table1'[company] = "dk" ) )Regards,
Daniel He
Vishnu_1980
7 years agoFrequent Visitor
Hi Snifer,
Do you want to get the partial results from the same month last year or
you need to subtract previous month amount from YTD or MTD.
Could please explain little more with two months data ?
Anonymous
7 years agoNot applicable
| 2017 | 10 | 75000 | 2017 | 10 | 35000 | |||
| 2017 | 11 | 95000 | 2017 | 11 | 20000 | |||
| 2017 | 12 | 100000 | 2017 | 12 | 5000 | |||
| 2018 | 1 | 2000 | 2018 | 1 | 2000 | |||
| 2018 | 2 | 3000 | 2018 | 2 | 1000 |
in the line we have for example
11/2017 ->95000-75000=20000
12/2017 -> 100000-95000=5000
1/2018 -> 2000
2/2018-> 3000-2000=1000