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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Wresen
Post Patron
Post Patron

Sum 5 days later

Hi

I have a problem that i cant solve.

I have a tabel with dates and sales, and i want to be able to see the sales with a lag of 5 days.

So the the sales on 2023-09-01 should be counted shown on 2023-09-06 as shown in the picture (red column).

It needs to be a measure.

 

Thx so much for any help or suggestion .

5days.PNG

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Two measure will do it.  The first one to sum the sale amount

Sales Amount = SUM ( YourTable[Sales] )

Then one to offset the calculation by 5 days

Sales +5 days = 
CALCULATE ( [Sales Amount], DATEADD ( YourTable[Date], -5, DAY ) )

jdbuchanan71_0-1697203459982.png

 

.

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Two measure will do it.  The first one to sum the sale amount

Sales Amount = SUM ( YourTable[Sales] )

Then one to offset the calculation by 5 days

Sales +5 days = 
CALCULATE ( [Sales Amount], DATEADD ( YourTable[Date], -5, DAY ) )

jdbuchanan71_0-1697203459982.png

 

.

Thx so much for the help . Works perfect 🙂

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.