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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
TotalAnonymous
Helper III
Helper III

Previous Week DAX

Hello everyone, hope you're doing well.

I have an issue regarding Previous Week calculation using DAX. I have sales table that is represented in the weekly basis. How can I calculate the Previous Week Sales since it's more challenging using Standard Date Table?
The purpose of why I want to calculate the previous week is to be a baseline to calculate Current Week vs Previous Week Sales, Current Week vs Same Week in the last month.


Please kindly find the attached link into the PBIX file. Really appreciate your help and support. Thank You!

Link to PBIX: https://drive.google.com/file/d/1p8O6ntoT_A02JGjdV-nTcK8hD0BK3HJ6/view?usp=sharing

1 ACCEPTED SOLUTION

Hi,

Not sure what you want the answer to be but i get 6000 with this edited measure

Total Sales Last Week = CALCULATE([Total Sales],DATESBETWEEN('Calendar'[Date],MAX('Calendar'[Date])-6,MAX('Calendar'[Date])))

Hope this helps.

Ashish_Mathur_0-1713327917556.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
TotalAnonymous
Helper III
Helper III

Hi Ashish, Thanks for replying! The questions are:
1) How to show the value of last week? since in the PBIX file, specifically in the Card Visual, the previous week sales is a cumulative of previous week in March
2) How can I calculate the Current Week vs Same Week in the Last Month?

Thank you!

Hi,

Not sure what you want the answer to be but i get 6000 with this edited measure

Total Sales Last Week = CALCULATE([Total Sales],DATESBETWEEN('Calendar'[Date],MAX('Calendar'[Date])-6,MAX('Calendar'[Date])))

Hope this helps.

Ashish_Mathur_0-1713327917556.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish, thanks for your reply! Let me try and back to you as soon as possible. Thank you

Ashish_Mathur
Super User
Super User

Hi,

What problem are you facing there?  You have already writtten the formula.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.