Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am working on some Day's Inventory on Hand measures. In order to do this, I need to select the next four months of forecast and get them to display by month in a visual. For example:
We are currently in June. So I need to select June, July, August, and September from the forecast data. In the visual, I want to display Each month with it's forecast quantity. Then, when I roll into July, I want the visual to display the next four months of visual forecast (i.e. July thru October). I do not want to use filters to do this.
I have a Fiscal Date table which has the date, month, year, month number 1-12). My thought was to add a calculated column as a yes/no for the "Next Four Forecast". But not sure how to get there.
So fields available:
Forecast Quantity
Date
Fiscal Month
Fisal Year
Fiscal Month Number
Hi @nywi6100 ,
Another way would be using what if parameter.
You can calculate the number of months dynamically.
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-what-if
yes, calculated column is the way to go. Let's assume you have a FiscalMonth column in your Fiscal calendar table.
NextFourMonths =
var d=Dates[date]
var s=SELECTCOLUMNS(filter(Dates,Dates[date]>=EDATE(d,1) && Dates[date]<=edate(d,4)),"FMonth",Dates[Fiscal Month])
return concatenatex(distinct(s),[FMonth],",",[FMonth],ASC)
This is slow as molasses but it may give you some ideas how to tackle the issue. EDATE seems an innocent choice here but it is actually pretty smart, handling month math nicely even with different length months.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 9 | |
| 8 | |
| 7 |