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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Sergii22
Helper I
Helper I

I need to create a universal forecast measure that would take into account any interval set

There is a table with a plan for months. There is also a table with a fact by day. It is necessary to calculate the forecast for the end of the period, which is defined by the filter. Let's say there is a fact by day for January and a fact by day until February 7th. The time filter is set to January 1 - February 28. The formula for calculating the linear forecast that I use is: Fact for the month I clicked on/number of sale days * number of days in the month. Below pictures:

Date Interval.jpg

Actual 1.jpg Forecast 1.jpg

Actual 2.jpg Forecast 2.jpg

Actual 3.jpg Forecast 3.jpg

This is the same product that was sold in January and February.
Overhead bold cumulative sales on Feb. 7, followed by down January sales and February sales.
In the case of selecting sales for February, I received a correct forecast (green card). When choosing for January, in theory, I got a figure of what sales could be in terms of a linear forecast, but the period is already closed. The biggest problem is the result of the forecast when choosing total current sales. The formula considers an incorrect prediction.

 

Obviously, I need to create a condition that will evaluate the presence of the fact of a closed period (months) and calculate the forecast until the end of the current period. I need to create a universal measure that would take into account any interval set by the time filter.
The forecast measure, in my opinion, might look like this: Fact of the closed period + (Fact for the month I clicked on / number of sales days * number of days in the month.)
This is where I have a problem(
I would be very grateful for an example solution.

0 REPLIES 0

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.