Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Retrieving Sum from Prior Period

Hello all...

 

I'm looking for guidance on how to create a measure/measures that will retrieve the sum total from the prior period, in this case $4.00, that I can then use to subtract from the current period total, in this case $8.00. I will be inserting the difference between the 2 values in a table, sorted by project ID.

Thanks in advance to anyone who can help!

ProjectPeriodInsertedDateValue
A16/1/2020$1.00
B16/1/2020$1.00
C16/1/2020$1.00
D16/1/2020$1.00
A26/15/2020$2.00
B26/15/2020$2.00
C26/15/2020$2.00
D26/15/2020$2.00

10 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Yes it should be.

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak  Thanks but I can't move the period to a separate table in this case.

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , Try like

        This Period = CALCULATE(sum('Table'[Value]), FILTER(ALLSELECTED('Table'),'Table'[Period]=max('Table'[Period])))
        Last Period = CALCULATE(sum('Table'[Value]), FILTER(ALLSELECTED('Table'),'Table'[Period]=max('Table'[Period])-1))