DaveBlakeMAAT
Board Regular
- Joined
- Feb 28, 2016
- Messages
- 190
Hi
I am having an issue with the following DAX which I just can't seem to get working properly
It is not filtering the data for FiscalYear, it is returning all results, If I replace the CutOff variable to 2018, I get the expected results. If I create a measure using the variable definition (MAX ( 'Calendar'[FiscalYear] ) - 2) it returns 2018, which is what I expect.
My instinct is telling me i am having a battle with filter context, but i am not sure what else to try!
Any advice will be greatly received.
Regards
Dave
I am having an issue with the following DAX which I just can't seem to get working properly
Code:
Net Expenditure:=VAR CutOff =
MAX ( 'Calendar'[FiscalYear] ) - 2
RETURN
CALCULATE (
SUM ( SupplierNetExpenditure[NET_AMOUNT] ),
FILTER ( 'Calendar', 'Calendar'[FiscalYear] > CutOff )
)
It is not filtering the data for FiscalYear, it is returning all results, If I replace the CutOff variable to 2018, I get the expected results. If I create a measure using the variable definition (MAX ( 'Calendar'[FiscalYear] ) - 2) it returns 2018, which is what I expect.
My instinct is telling me i am having a battle with filter context, but i am not sure what else to try!
Any advice will be greatly received.
Regards
Dave