Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I am new to the powerbi graphs for forecasting and I am trying to build a sales data graph in powerbi with the below requirements:
1. the x axis with continous dates of a month
2. Sales data for each day in that month( the red line in the below graph produced in 17th of this month, where '169' is the total sales for the date '17' and after that it is forecasted )
3. previous year same month sales data ( solid blue line in the below graph)
I tried many methods for the last few weeks but no luck. It would be great if anyone of you could help me with the above. Is it possible in powerbi?
Thank you in advance.
Hi, @sclement
Please check my article https://allure-analytics.com/index.php/2022/06/11/combine-actuals-forecast-in-power-bi/
and hope it can help you to achieve the red line (actuals + forecast in one line) and then you can add your Previous Year measure below as line.
Proud to be a Super User!
Hi, @sclement
Please try the following methods.
Measure:
Preyear = CALCULATE(SUM('Table'[Actual]),DATEADD('Table'[Date],-1,YEAR))
Current =
IF(SELECTEDVALUE('Table'[Date])<TODAY(),SUM('Table'[Actual]),SUM('Table'[forecast]))
The X-axis can be set in this way to get a continuous date of one month.
Measure = IF(YEAR(SELECTEDVALUE('Table'[Date]))=YEAR(TODAY())&&MONTH(SELECTEDVALUE('Table'[Date]))=MONTH(TODAY()),1,0)
June 28 and onwards are shown as forecast values. A line cannot be split to show solid and dashed lines. Does this result match your expected output?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Charlote , @v-zhangti
Thank you for providing me the solution!
Unforuntely it doesn't help me much as my very first problem is obtaining the Forecasted MTD sales. I couldn't find any appropriate resources or community forum post that helps me in this direction to obtain Forecasted MTD sales per each day.
Any advise on this would be very much helpful for me.
Thank you!
Hi, @sclement
By what logic do you want to get your sales forecast? Is there a relationship with the previous year's data?
Best Regards
Hope it helps!
Solved: Calculate actual vs Forecast? - Microsoft Power BI Community
Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users
Hi @ribisht17 ,
Thank you for your response. The link you have provided didn't me help that much as I am finding a way to obtain the forcasted MTD sales which was not covered in the post. I want to obtain the forecasted values in my PowerBi report.
Thanks!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |