Forum Discussion
Anonymous
7 years agoNot applicable
Move Calculated Column value ahead in time?
Hi guys, i need help moving my calculated column calculation value (can be a measured if needed) into month ahead of it. The image below should make things clear. Instead of having my target li...
- 7 years ago
Anonymous,
You may refer to the following code.
Column = IF ( CALCULATE ( SUM ( 'Data Table'[Actual] ), PREVIOUSMONTH ( 'Data Table'[Fiscal Dates] ) ) <> BLANK (), 'Data Table'[Planned] + CALCULATE ( SUM ( 'Data Table'[Planned] ) - SUM ( 'Data Table'[Actual] ), PREVIOUSMONTH ( 'Data Table'[Fiscal Dates] ) ) )
Anonymous
7 years agoNot applicable
ryan_mayu, thank you for your response, i have created a new file in this link; https://filebin.net/qlgusdv2f3w0pfm4, called test data example.
In this excel file you can see an example of how the data should progress as i input in values. For the two starting 0 values in the first two months, if the planned and actual are equal then the target (the dax) should just input 0, and for any dates above the last input value (look in the excel example file ) they should be automatically 0 too. I hope this clears it up.
v-chuncz-msft
7 years agoCommunity Support
Anonymous,
You may refer to the following code.
Column =
IF (
CALCULATE (
SUM ( 'Data Table'[Actual] ),
PREVIOUSMONTH ( 'Data Table'[Fiscal Dates] )
)
<> BLANK (),
'Data Table'[Planned]
+ CALCULATE (
SUM ( 'Data Table'[Planned] ) - SUM ( 'Data Table'[Actual] ),
PREVIOUSMONTH ( 'Data Table'[Fiscal Dates] )
)
)