Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi im new here. Starting to work more and more with DAX calculations in PowerBi. Learning every day and could use some help. I have been working on setting up a forecast step by step, these are the first steps.
The data i have is as follows:
1 dimension date table
1 facttable where amount of received requests are stored (i made a relationship from date received to datetable)
I have been able to get these measures:
- total current requests in stock (until last date) :
- received request per date:
Instr= CALCULATE(COUNTROWS('Ss'))
- 30days MA:
CALCULATE(
Thanks for the reply @amitchandak .. To make it a bit clear ill try to explain it step by step. See screenshot below.
19 april for example was the last date there are requests received. Untill that day the amount of open requests (not finished) was 4640.
I made a 60day MA with this dax measure:
as you can see the MA also goes in the future, i would like to see that it calculated the MA until the last day that there are requests received and after that date it shows that MA.
So in this example until april 19th it should show 130, and for all future dates also 130 instead of changing...
i cant do this by the way:
CALCULATE(sum('Table'[Number]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-30,Day))
to calculate the amount received requests i have a measure of countrows... i cant do a sum of a measure right?
@01_RAF_01 , Not very clear typically
Rolling 30 day = CALCULATE(sum('Table'[Number]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-30,Day))
Rolling 30 day from today= CALCULATE(sum('Table'[Number]),DATESINPERIOD('Date'[Date],today(),-30,Day))
next 30
Rolling 30 day = CALCULATE(sum('Table'[Number]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),30,Day))
Rolling 30 day from today= CALCULATE(sum('Table'[Number]),DATESINPERIOD('Date'[Date],today(),30,Day))
last to next 30
Rolling 30 day = CALCULATE(sum('Table'[Number]),DATESINPERIOD('Date'[Date],MAX('Date'[Date])-30,60,Day))
Rolling 30 day from today= CALCULATE(sum('Table'[Number]),DATESINPERIOD('Date'[Date],today()-30,60,Day))
But if you want to travel workday
Traveling Across Workdays - What is next/previous Working day
https://community.powerbi.com/t5/Community-Blog/Travelling-Across-Workdays-Decoding-Date-and-Calenda...
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |