Using the code sent by Michal, I tested different formulas and now it works, I added the line "ALLSELECTED('Append')" followed by the line "PARALLELPERIOD('Append'[DATE_REFERENCE], -1, QUARTER)"
This line allows me to select all the values, even those that were previously filtered and not retrieved by "PARALLELPERIOD"
Here is the code
CalculateMeasure =
VAR CurrentValue = SUM('Append'[Value])
VAR CurrentSale = SUM('Append'[Sale])
VAR PreviousQuarterValue =
CALCULATE(
SUM('Append'[Value]),
ALLSELECTED('Append'),
PARALLELPERIOD('Append'[DATE_REFERENCE], -1, QUARTER)
)
RETURN
IF (
CurrentValue <> 0,
CurrentValue - PreviousQuarterValue,
IF (
CurrentValue = 0,
CurrentSale - PreviousQuarterValue,
BLANK()
)
)