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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Curious2115
Frequent Visitor

Day to Day Sales Forecast Difference

Hello,

 

I have this data where I forecast sales in the future. This forecast changes every day, and I am trying to create a measure where it shows the difference in the day-to-day sales forecast (column E in the picture below). I am trying to create clustered column chart and table with this new measure; where the Sales Date would be in X-Axis, the difference in Y-Axis, and the updated date as the legend.

Please note that the Sales Date column is when the sale is going to happen. The Date Created column is when the first forecast was created, and the Forecast Updated Date is when the forecast was updated.

Any help would be greatly appreciated.

 

Curious2115_2-1689354322488.png

 

 

 

 

1 ACCEPTED SOLUTION
BeaBF
Super User
Super User

@Curious2115 Hi!
you can create a measure like:
Sales Forecast Difference =
VAR CurrentDate = MAX('YourTable'[Sales Date])
VAR PreviousDate = CALCULATE(MAX('YourTable'[Sales Date]), 'YourTable'[Sales Date] < CurrentDate)
VAR CurrentForecast = CALCULATE(SUM('YourTable'[Sales Forecast]), 'YourTable'[Sales Date] = CurrentDate)
VAR PreviousForecast = CALCULATE(SUM('YourTable'[Sales Forecast]), 'YourTable'[Sales Date] = PreviousDate)
RETURN
CurrentForecast - PreviousForecast

BBF

View solution in original post

2 REPLIES 2
BeaBF
Super User
Super User

@Curious2115 Hi!
you can create a measure like:
Sales Forecast Difference =
VAR CurrentDate = MAX('YourTable'[Sales Date])
VAR PreviousDate = CALCULATE(MAX('YourTable'[Sales Date]), 'YourTable'[Sales Date] < CurrentDate)
VAR CurrentForecast = CALCULATE(SUM('YourTable'[Sales Forecast]), 'YourTable'[Sales Date] = CurrentDate)
VAR PreviousForecast = CALCULATE(SUM('YourTable'[Sales Forecast]), 'YourTable'[Sales Date] = PreviousDate)
RETURN
CurrentForecast - PreviousForecast

BBF

Hello, I updated 'YourTable'[Sales Date] to 'YourTable'[Forecast Updated Date], and it worked. thank you so much!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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