Forum Discussion
Forecast for next 1 year
- 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 dataBut for me if statement not working it produces two line
can someone help it
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:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
4 Replies
- Ashish_Mathur
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.
- ravi_ch
Helper I
- Ashish_Mathur
Super User
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.
- v-kelly-msft
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:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!