cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
Impactful Individual
Impactful Individual

@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
Impactful Individual
Impactful Individual

@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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors