Calculate Rolling Totals in Power BI Using DAX

2 comments

Here I’m going to show you how you can calculate the amount sold between two different dates.

Another way to think about this is calculating rolling sales or running totals.

We need the calculation to be dynamic, so that as we move through time we have a number that re-calculates based on the time frame window that we open.

I show you how on any single day you can isolate two dates and then count up the amount sold between those two dates. This is ultimately how you calculate running totals in Power BI.

I’m going to dive in how you can do that with DAX formula. I’m not going to stop there, as I also want to compare running totals between different time periods.

This is a great way to identify trends in your data or showcase outliers that may be occurring in real time in your datasets.

Lots of techniques to extract out of this one tutorial, as well as plenty to learn about DAX formula and how to implement it successfully.

In the video, I also look into the topic of measure branching. This is one technique you’ll want to learn well in Power BI.

Jump in and learn as much as you can. Try to implement this in your own models ASAP to really get the most benefit out of it.

***** Learning Power BI? *****
All Enterprise DNA TV Resources
FREE COURSE – Ultimate Beginners Guide To Power BI
FREE COURSE – Ultimate Beginners Guide To DAX
FREE – Power BI Resources
Enterprise DNA Membership

2 comments on “Calculate Rolling Totals in Power BI Using DAX”

  1. Does the rolling number you set take into account missing days like weekends or days where there may not be any sales? For instance, if you were looking at a Tuesday and did a rolling 7, would it calculate sales for Tuesday, Monday, Sunday, Saturday, Friday, Thursday, Wednesday? Or does it just look at the dates that are part of your Sales data?

    Like

    1. Hi Rose, you are correct, it would look at all the dates. To adjust this to only look at weekdays or days where there is a sale some different logic would need to be used. It’s an interesting concept your propose. Something I’ll look into showcasing shortly.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s