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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

time intelligence - Dax problem

Hi,

i have a dim Date table and i wish to create a total sum of production QTY for a selected period.

i want to take  a specifceic date and lookback 30 working days backward and sum up the productin QTY for this period.

 

for example:

the selected period :

if today is : 25.2.2020

minus 30 days :  26.1.2020 

 for every seleced days in this period i want it to calculate the sum QTY for 30 days before.

 

for example :

 

for the 27.1.2020

 

take the qty for every day (in the last 30 days) before this date (27.1.2020)

 

thanks in advance

 

ofir

 

 

 

 

 

 

 

 

 

2 REPLIES 2
Anonymous
Not applicable

What do you mean by "30 working days"? Do you have a Date table that marks days as working/non-working?

Best
D
vivran22
Community Champion
Community Champion

@Anonymous 

 

You may try this:

 

Prev 30 days = CALCULATE([Total Orders], DATEADD('Calendar'[Date],-30,DAY))

where,
Total Orders = SUM(dtTable[Order Quantity])

 

Cheers!
Vivek

If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂

https://www.vivran.in/

Connect on LinkedIn

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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