Forum Discussion
Anonymous
7 years agoNot applicable
Datesinperiod not working as expected?
Why would 1 day in the same month suddenly remove a full month from below measure? Rolling PTLIQ =
CALCULATE(SUM('NetSuite_P&L_Monthly'[Monthly PTLIQ]), DATESINPERIOD(DateDimension[Date],
...
- Anonymous7 years ago
Hey Greg, your code was a little too much for me. I went with something simpler that seems to give me the results I need.
Rolling PTLIQ = CALCULATE(SUM('NetSuite_P&L_Monthly'[Monthly PTLIQ]), DATESINPERIOD(DateDimension[Date], LASTDATE(PREVIOUSDAY(PREVIOUSMONTH(DateDimension[Date]))),-1,Year ) )
Greg_Deckler
Community Champion
7 years agoSee if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008
- Anonymous7 years agoNot applicable
Hey Greg, your code was a little too much for me. I went with something simpler that seems to give me the results I need.
Rolling PTLIQ = CALCULATE(SUM('NetSuite_P&L_Monthly'[Monthly PTLIQ]), DATESINPERIOD(DateDimension[Date], LASTDATE(PREVIOUSDAY(PREVIOUSMONTH(DateDimension[Date]))),-1,Year ) )