March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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.
Solved! Go to Solution.
@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
@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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
26 | |
21 | |
20 | |
13 | |
12 |
User | Count |
---|---|
40 | |
27 | |
27 | |
21 | |
19 |