Forum Discussion
Calculate difference between versions of Forecast data
- 11 months ago
and try this
Measure = VAR NumQuarter = SELECTEDVALUE('Sales Forecast'[NumQuarter])-1 VAR PQTY = CALCULATE([FCST_QTY], 'Sales Forecast'[NumQuarter]= NumQuarter , REMOVEFILTERS('DimVersionNo'),REMOVEFILTERS(DimFYFISCAL)) RETURN [FCST_QTY] - PQTY
I still have problem, the solution does not work in pbix. I am trying to figure out why. Do you have other suggestion to derive calculation of difference of Forecast Qty from previous version ?
try creating another new column
- mbudiman10 months ago
Helper III
Here is my actual pbix data structure with mockup data. When I apply solution suggested by you, it does not work. SalesForecast sample.pbix
- Ahmedx10 months ago
Super User
pls try
- mbudiman10 months ago
Helper III
does not work, QTY Diff does not show calculate correctly.
- Ahmedx10 months ago
Super User
try
- Ahmedx10 months ago
Super User
try changing 1 to 0
- Ahmedx10 months ago
Super User
will everything be at zero there?
- mbudiman10 months ago
Helper III
QTY DIFF should be compare for versions within the same Fiscal Qtr. When reach max Version (based on Version No) of the same Fiscal Qtr, there is no more version to compare, thus QTY DIFF should be blank. If there is only 1 version for that Fiscal Qtr, then there is no data to compare, thus QTY DIFF should be blank (or zero).
See illustration below.
- Ahmedx10 months ago
Super User
This is what I got, I don't know if this solves your problem