Previous Weeks Sales – Advanced Time Intelligence w/DAX in Power BI


Calculating the difference between weekly sales results in Power BI is unfortunately not that easy.

The reason behind this is that Power BI doesn’t have a weekly based, built-in time intelligence function. The only available options are for the day, month, quarter, and year.

Therefore, to be able to work out weekly results in Power BI, we need to utilize different logic within a formula. It’s unfortunately slightly more advanced, but it’s an important and really high-quality technique that you need to understand and utilize in your models.

If you can understand some of the formula techniques that I work through to actually calculate this result, then you’re doing very well with DAX inside of Power BI. Invariably you will be able to create some really good insights and high quality analysis in your Power BI reports.

In this video tutorial, I run through how to use the CALCULATE and FILTER functions, including how to utilize variables really effectively within your DAX formulas.

It is a really great concept to understand as it will provide you with good insights, especially if you’re working with information over weeks.

Maybe you’re a retailer and you want to analyze this week versus last week, or this week during this month versus the same week the year before.

The tutorial will show you how such great analysis can be done if you utilize these formula techniques in combination with your data models.

For much more on data modeling in Power BI, certainly check out the Advanced Data Transformations & Modeling at Enterprise DNA Online. The feedback I get from this one module is crazy, so well worth reviewing.

***** Learning Power BI? *****
All Enterprise DNA TV Resources
FREE COURSE – Ultimate Beginners Guide To Power BI
FREE COURSE – Ultimate Beginners Guide To DAX
FREE – 60 Page DAX Reference Guide Download
FREE – Power BI Resources
Enterprise DNA Membership
Enterprise DNA Online


***Learn more about Enterprise DNA Membership***membership banner 3

8 comments on “Previous Weeks Sales – Advanced Time Intelligence w/DAX in Power BI”

  1. Hi Sam, your solution works perfectly for a summarized view, but what would you suggest in case I want to bring in more details to the table, ie. Performance Country,Product Model, Product Family that way the Previous Week measure is not usable as it will always give a number total.

  2. Hi Sam, I just wanted to thank you for this tutorial. I could not find any better solution for my problem. I needed to find Week over Week Volume delta and I used your approach to calculate the difference in volume from current week to previous week. I’m looking only at one year at a time and get a correct weekly trend, so this approach works. Not sure if it would work if I needed to look at multiple years. In this case, many thanks!

  3. Hi Sam , thank you for this method but i have an issue. My issue is that my date table is : 15th of every month and last date of every month. The last date can be 28 or 29 in case of february and 30th or 31st depending on the month. Because of that the difference between my week numbers ,though most times is 2, can be 3 at sometimes. How do you suggest i adapt this formula to my particular case ?

  4. Hi Sam, great solution which I’ve got to work with a report I was writing. Thank you. What would I have to do to get totals working? My report is reporting a week on week sales variance by product and I need to show a weekly total as well.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.