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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ravi_ch
Frequent Visitor

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
Frequent Visitor

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.