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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Memorable Member
Memorable Member

@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
Memorable Member
Memorable Member

@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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.