March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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
Solved! Go to 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.
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.
Hi Ashish, thanks for your reply! Let me try and back to you as soon as possible. Thank you
Hi,
What problem are you facing there? You have already writtten the formula.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |