Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
edayeh
New Member

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 love to be able to calculate the delta of any daily changes for a specific account. Below is what I would love to get.

I want to create a colum (Delta below) that will show me what accounts changed from the previous date. Small sample size below. 

 

NameARRDateDelta
Account 1 $    68,22329-Oct 
Account 1 $    26,65630-Oct($41,567)
Account 2 $    68,16229-Oct 
Account 2 $    68,16230-Oct$0
Account 3 $  177,32429-Oct 
Account 3 $      1,67930-Oct($175,645)
Account 4 $    12,81929-Oct 
Account 4 $      8,07130-Oct($4,748)
Account 5 $          18029-Oct 
Account 5 $          18030-Oct$0

I have over 500 accounts so the snapshot have over 500 records daily. 

 

How can I get a formula to show me this? thanks in advance

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

@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())

 

Capture.PNG



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

2 REPLIES 2
camargos88
Community Champion
Community Champion

@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())

 

Capture.PNG



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



THANK YOU SO MUCH.....YES

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.