Forum Discussion

edayeh's avatar
edayeh
New Member
5 years ago
Solved

Calculate Snapshot Data Delta -

Hello   I am trying to get deltas from snapshotted data and I can't seem to figure out how.  I snapshotdata (in SFDC) daily by Account and ARR for that account and bring store that value. I would ...
  • camargos88's avatar
    5 years ago

    edayeh ,

     

    You can use this code to create a calculated column:

    Delta = 
    VAR _date = CALCULATE(MAX('Table'[Date]), FILTER('Table', 'Table'[Date] < EARLIER('Table'[Date])))
    RETURN IF(_date <> BLANK(), CALCULATE(SUM('Table'[ARR]), FILTER('Table', 'Table'[Name] = EARLIER('Table'[Name]) && [Date] = _date)) - 'Table'[ARR], BLANK())