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

Win a FREE 3 Day Ticket to FabCon Vienna. Apply now

Reply
diogobraga2
Helper IV
Helper IV

Calculate difference between measure at point in time and previous week

The goal is to create a 'New Measure' to calculate the diffence between measure at point in time and previous week. 

 

pbix file is here 

2020-08-20_15-24-37.png

1 ACCEPTED SOLUTION

Hi @diogobraga2,

 

You can expand the calc provided by @v-lili6-msft like

New Measure = IF([Total Returning W]<> BLANK(),[Total Returning W] - CALCULATE([Total Returning W],DATEADD('Dates Adj'[Date],-7,DAY)), Blank())

 

Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up! 



I hope this helps,
Richard

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

Proud to be a Super User!


View solution in original post

6 REPLIES 6
v-lili6-msft
Community Support
Community Support

hi @diogobraga2 

Just use DATEADD to create a meausre as below:

https://docs.microsoft.com/en-us/dax/dateadd-function-dax

New Measure = [Total Returning W]- CALCULATE([Total Returning W],DATEADD('Dates Adj'[Date],-7,DAY))

Result:

3.JPG

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @v-lili6-msft! It looks good, the only minor adjustment is to not show the variance when Total Returning is null. What's your suggestion? See 8/9/2020 below. 

2020-08-21_16-17-27.png

 

 

Hi @diogobraga2,

 

You can expand the calc provided by @v-lili6-msft like

New Measure = IF([Total Returning W]<> BLANK(),[Total Returning W] - CALCULATE([Total Returning W],DATEADD('Dates Adj'[Date],-7,DAY)), Blank())

 

Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up! 



I hope this helps,
Richard

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

Proud to be a Super User!


Thank you so much!

harshnathani
Community Champion
Community Champion

Hi @diogobraga2 ,

 

See this blog for week calculations

 

https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

For my purpose, I think it's best to have it as a 'New Measure' instead of a 'New Column.' The pbix is included for anyone willing to show how it's done. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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