Forum Discussion
Razvan66
1 year agoFrequent Visitor
Delta between values in the same column
Hello together, Have a question about a calculation. So, i have this matrix, what im intrested to do i a delta between each release numbers to calculate the difference. Now the problem ...
- Anonymous1 year ago
Hi Razvan66 ,hello danextian,thank you for your prompt reply!
Please check the following measure:
Delta Between Versions = VAR CurrentRelease = SELECTEDVALUE('Table'[Release No]) VAR CurrentDate = SELECTEDVALUE('Table'[Deliv. Date]) VAR PreviousRelease = CALCULATE(MAX('Table'[Release No]), 'Table'[Release No] < CurrentRelease, 'Table'[Deliv. Date] = CurrentDate) VAR CurrentQuantity = CALCULATE(SUM('Table'[Quantity]), 'Table'[Release No] = CurrentRelease, 'Table'[Deliv. Date] = CurrentDate) VAR PreviousQuantity = CALCULATE(SUM('Table'[Quantity]), 'Table'[Release No] = PreviousRelease, 'Table'[Deliv. Date] = CurrentDate) RETURN IF(NOT(ISBLANK(PreviousRelease)), CurrentQuantity - PreviousQuantity, BLANK())Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.