Forum Discussion
Colinr
5 years agoNew Member
Help to convert hard coded Dax filter to use current selection values
I have a Dax filter that correctly filters to hard coded values, How can I change this to use the Filters of the current PBI visualisation page filter selection, Id also like the Date to use the SAM...
Colinr
5 years agoNew Member
Ive got a bit further with below, but the sameperiod last year function, returns an empty filed in my pbi table, What Do I need to do to provide this expression with the correct context please ?
previousYear = CALCULATE (
SUM ( 'vw Monthly Milk Production'[value] ),
FILTER (
ALLSELECTED('vw Monthly Milk Production'),
'vw Monthly Milk Production'[date] == SAMEPERIODLASTYEAR(Dates[Date].[Date])
)
)