Forum Discussion
mbudiman
Helper III
10 months agoCalculate difference between versions of Forecast data
Hello, I need help for a DAX measure to calculate Forecast Qty difference between versions for each Fiscal Qtr. A Fiscal Qtr may have multiple versions of Forecast. See example data below. ...
- 10 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
Ahmedx
Super User
10 months agotry changing 1 to 0
mbudiman
Helper III
10 months agohi Ahmedx ,
It works partially for Version_No = 2 and Version_No =1, but not for Version_No = 0 (Preview).
- 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