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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
we4get
Advocate I
Advocate I

Weekly Reporting

Hi,

 

I'm looking for some help in using weekly totals for results made up from datestamped entries.

 

I need to show weekly summaries over time using sum/average etc. and it's simple to do this for a std week range (Mon-Sun or Sun-Sat) using weeknumber. What I'm looking for is some calculation which shifts the weekly pattern based on today's 'Day'.

 

For example, assuming results are available up to prior day, if I run the report on a Friday, the weekly history shows week levels based on a Fri-Thurs pattern. Similarly, if report run on a Wednesday, all prior 'weeks' would reflect the Wed-Tues picture.

 

This was something which was fairly straight forward using Qlik but I can't find a suitable method in Power BI.

 

Any help appreciated - Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

The week is rolling for 7 days. so rolling 7 days should help you for this week vs last week or if you filter on weekday and display dates. for each dates(filtered) you should get 7 days data.

This one should work for last 7 days. And you view by day and filter for weekday this should also work 7 days.

Rolling 7 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],max(Sales[Sales Date]),-7,DAY))

 

If needed

Rolling 7 before 7 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],max(dateadd(Sales[Sales Date],-7,DAY)),-7,DAY))

 

But for this create a date from timestamp and join it with date calendar

Date = [timestamp].date

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

These are bit different files , but should help you in creating calendar

https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0

https://www.dropbox.com/s/9agcbser2sqk02s/sales_analytics_weekWiseFriday_thru.pbix?dl=0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

The week is rolling for 7 days. so rolling 7 days should help you for this week vs last week or if you filter on weekday and display dates. for each dates(filtered) you should get 7 days data.

This one should work for last 7 days. And you view by day and filter for weekday this should also work 7 days.

Rolling 7 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],max(Sales[Sales Date]),-7,DAY))

 

If needed

Rolling 7 before 7 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],max(dateadd(Sales[Sales Date],-7,DAY)),-7,DAY))

 

But for this create a date from timestamp and join it with date calendar

Date = [timestamp].date

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

These are bit different files , but should help you in creating calendar

https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0

https://www.dropbox.com/s/9agcbser2sqk02s/sales_analytics_weekWiseFriday_thru.pbix?dl=0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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