Forum Discussion
nandhinielango
8 years agoFrequent Visitor
Subtraction from different rows
Hi All, I need to calculate the following in incremental pattern. Period Value (cumulative) Value (incremental) Remarks Apr-17 100 100 For the start of each FY, mean...
Phil_Seamark
8 years agoMicrosoft Employee
This formula is one way you can derive the gap backwards
Subtract Gaps =
[Value Cumulative] -
CALCULATE([Value Cumulative],
FILTER(
ALL('Table3'[Period]),
[Period] = var d1 = min('Table3'[Period])
var myStartOfMonth = DATE(year(d1),month(d1),1) - 1
RETURN DATE(Year(myStartOfMonth),Month(myStartOfMonth),1)
)
)nandhinielango
8 years agoFrequent Visitor
This gives me the same result as cumulative values.
- Zubair_Muhammad8 years agoCommunity Champion
Try this calculated column
Incremental = VAR CurrentLine = PREVIOUSMONTH ( TableName[Period] ) RETURN IF ( MONTH ( TableName[Period] ) = 4, TableName[Value (cumulative)], TableName[Value (cumulative)] - CALCULATE ( SUM ( TableName[Value (cumulative)] ), FILTER ( ALL ( TableName ), TableName[Period] = CurrentLine ) ) )- Zubair_Muhammad8 years agoCommunity Champion