Forum Discussion
mkg
7 years agoRegular Visitor
Following Period Last Year Measure - SUMX
Hi, My goal is to have a table with each period showing the reporting quantity from last year and the next period. Meaning for Period P-01 (Jan 2019) I would show P-02 (Feb 2018).
Currently I have the following so I am trying to "push" my data by one month. so the sum for each period is correct when I remove Yr.
Current Formula
Following Period/ Last Yr Reporting Qty = CALCULATE(SUMX(FILTER('SC Data','SC Data'[Yr]="LAST YR"),[Reporting Quantity]))
2 Replies
- v-chuncz-msft
Community Support
- mkgRegular Visitor
This works but when I add +1 Month is breaks is there a different way to go about that?
VAR y =SELECTEDVALUE ( 'SC Data'[Fiscal Year] )VAR m =SELECTEDVALUE ( 'SC Data'[Month])RETURNCALCULATE ( SUM ( 'SC Data'[Reporting Quantity] ), 'SC Data'[Fiscal Year] = y - 1, 'SC Data'[Month] = m + 1)