Forum Discussion
ThisIsHalloween
2 years agoHelper I
Sum Not Updating with Filter
I am subtracting current fiscal year's receipts less previous fiscal year's receipts but the total continues to take the previous year's receipts into account. I want it to sum only what you can see.
HASONEFILTER was recommended to me but I haven't had luck with that working.
Difference =
VAR RPY =
CALCULATE(
sum(Receipts[Net Amount]),
PARALLELPERIOD('Date'[Date],-12,month))
VAR RCY =
CALCULATE(
SUM(Receipts[Net Amount]))
RETURN
if(HASONEFILTER('Date'[FY]),
if(sum(Receipts[Net Amount]) <> 0,
CALCULATE(
(RCY - RPY), DATESYTD('Date'[Date], "30/6")), ""))
ThisIsHalloween Once you have the result computed in a variable, you can apply a filter to it. so nothing is happening here, except whatever computed in the variable:
CALCULATE( (RCY - RPY), DATESYTD('Date'[Date], "30/6")), ""))
1 Reply
- parry2kSuper User
ThisIsHalloween Once you have the result computed in a variable, you can apply a filter to it. so nothing is happening here, except whatever computed in the variable:
CALCULATE( (RCY - RPY), DATESYTD('Date'[Date], "30/6")), ""))