Forum Discussion
Anonymous
6 years agoNot 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
- vivran22Community 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 - AnonymousNot applicableWhat do you mean by "30 working days"? Do you have a Date table that marks days as working/non-working?
Best
D