Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone,
I am having some issueswith my DAX code.
I have an Excel table named 'MyTable' that I use as a dataset. In this table there are several columns, including one for dates (from 2019 to 2021) and one for the number of orders I have per day.
I wanted to create a 7-day rolling sum the returns for a given day the number of orders for the current day and the 6 days before.
Here is an example:
Date | Orders | 7-day rolling sum for orders |
Jan 1st | 5 | 5 |
Jan 2nd | 2 | 7 |
Jan 3rd | 6 | 13 |
Jan 4th | 3 | 16 |
Jan 5th | 7 | 23 |
Jan 6th | 4 | 27 |
Jan 7th | 2 | 29 |
Jan 8th | 3 | 27 |
Here is an example of the kind of results I am supposed to get. Here, for Jan 8th, I should get the sum of Jan 8th + the 6 days before.
My DAX formula is the following:
Any idea? I have been trying many things and nothing works at the moment...
hi @gb1997
When you say "ask it to filter the data for february 2019", which day do you mean by february 2019?
Hi @FreemanZ ,
When I say "filter the data for February 2019" what I mean by that is that I want the slicer to show me the data only for February 2019. All the data that is before Feb 2019 and after is not shown.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |