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! Request now

Reply
PBI_newuser
Post Prodigy
Post Prodigy

How to calculate the current forecast count based on the rate and count in previous month

Hi,

I have a forecast rate Table to forecast the current month count based on last month.

For example, 2021-02 is 129 count and this month is 2021-03. The forecast count should be 129 * (1+10.5%) = 143.

How to create a measure to calculate if Month(Today()) = Rate[Month], then PreviousMonth(Date) * Rate?

Here is the sample.

PBI_newuser_0-1614574246502.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PBI_newuser ,

 

Please follow these steps:

1. Add a MonthNumber column to Rate table:

MonthNumber =
MONTH ( CONVERT ( [Month] & " 1", DATETIME ) )

2. Add a Rate column to Data table.

Rate =
VAR _month =
    IFERROR ( CONVERT ( RIGHT ( [Period], 2 ), INTEGER ), BLANK () )
VAR _m =
    IF ( _month = 12, 0, _month )
RETURN
    LOOKUPVALUE ( 'Rate'[Rate], 'Rate'[MonthNumber], _m + 1 )

3. Create measure:

Measure =
[ID Count]
    * ( MAX ( 'data'[Rate] ) + 1 )

The final output is shown below:

3.3.2.previous.PNG

 

Please take a look at the pbix file here.

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @PBI_newuser ,

 

Please follow these steps:

1. Add a MonthNumber column to Rate table:

MonthNumber =
MONTH ( CONVERT ( [Month] & " 1", DATETIME ) )

2. Add a Rate column to Data table.

Rate =
VAR _month =
    IFERROR ( CONVERT ( RIGHT ( [Period], 2 ), INTEGER ), BLANK () )
VAR _m =
    IF ( _month = 12, 0, _month )
RETURN
    LOOKUPVALUE ( 'Rate'[Rate], 'Rate'[MonthNumber], _m + 1 )

3. Create measure:

Measure =
[ID Count]
    * ( MAX ( 'data'[Rate] ) + 1 )

The final output is shown below:

3.3.2.previous.PNG

 

Please take a look at the pbix file here.

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous , thanks!!! It works. 😊

amitchandak
Super User
Super User

@PBI_newuser ,

Try with a date table

 

Forecast = CALCULATE([ID Count],DATESMTD(dateadd('Date'[Date],-1,MONTH))) * (1+CALCULATE([Rate],DATESMTD(dateadd('Date'[Date],-1,MONTH))))

 

or

 

Forecast = CALCULATE([ID Count],DATESMTD(dateadd('Date'[Date],-1,MONTH))) * (1+CALCULATE([Rate],DATESMTD(dateadd('Date'[Date],-1,MONTH)))/100)

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , how if the Date for Rate table is text?

PBI_newuser_0-1614578752985.png

 

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.

Top Solution Authors