Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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!
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
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!