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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
ravi_ch
Helper I
Helper I

Forecast for next 1 year

  1. I want to forecast from 4/10/2021 to 31/12/2022 Using last year data + 10% for forecast.
    For that first i calculated forecast amount Then i use if statement like if date is greater than 3/10/2021 use forecast If not use normal data
     
    But for me if statement not working it produces two line
    Screenshot 2021-10-04 050604.png

    can someone help it

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi  @ravi_ch ,

 

Modify "3/10/2021" as Date(2021,3,10),see below:

Web search Interest Forecast (Power BI) =
VAR Forecast =
    CALCULATE (
        [AVG websearch Interest (Power BI)],
        DATEADD ( 'Date table'[Date], -1, YEAR )
    ) * ( 1 + 0.1 )
RETURN
    IF (
        MAX ( 'Date table'[Date] ) > DATE ( 2021, 3, 10 ),
        Forecast,
        [AVG websearch Interest (Power BI)]
    )

And you will see:

vkellymsft_0-1633571579651.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi  @ravi_ch ,

 

Modify "3/10/2021" as Date(2021,3,10),see below:

Web search Interest Forecast (Power BI) =
VAR Forecast =
    CALCULATE (
        [AVG websearch Interest (Power BI)],
        DATEADD ( 'Date table'[Date], -1, YEAR )
    ) * ( 1 + 0.1 )
RETURN
    IF (
        MAX ( 'Date table'[Date] ) > DATE ( 2021, 3, 10 ),
        Forecast,
        [AVG websearch Interest (Power BI)]
    )

And you will see:

vkellymsft_0-1633571579651.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

ravi_ch
Helper I
Helper I

Share that and show the result in a simple Table format.  Once we get the result in a Table format, we can build any other chart/visual that we want.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

What does your raw inout data look like?  Share that and show the result in a simple Table format.  Once we get the result in a Table format, we can build any other chart/visual that we want.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.