Forum Discussion
Select multiple values from slicer for DAX formula
- 8 years ago
Hey,
I guess if you replace your estimation measure
EstimateCurrentMonth = calculate(sum('Sales'[Estimate]);FILTER(ALL('Sales'[MonthNumber]);[MonthNumber] = 'MonthParameter'[MonthParValue]))with this
EstimateCurrentMonth = var selectedMonths = Values('MonthParameter'[MonthParValue]) return calculate( sum('Sales'[Estimate]) ;FILTER( ALL('Sales'[MonthNumber]) ;[MonthNumber] IN selectedMonths ) )You are good to go.
Please be aware that the variable selectedMonths contains a table and no loger a scalar value. You also have to make sure that the slicer with the Month numbers has to be enabled for multi selection
Regards,
Tom
- 8 years ago
Hi TomMartens
Thanks, but i think i fixed it fairly easily.
I created a measure
IsFiltered = ISCROSSFILTERED(MonthParameter[MonthPar])
In the other DAX a simple IF check seems to work fine..
IF(MonthNamesNumbersAsVar[IsFiltered] = TRUE;
calculate(..................
Regards
Tom
Hi TomMartens
Thanks, but i think i fixed it fairly easily.
I created a measure
IsFiltered = ISCROSSFILTERED(MonthParameter[MonthPar])
In the other DAX a simple IF check seems to work fine..
IF(MonthNamesNumbersAsVar[IsFiltered] = TRUE;
calculate(..................
- TomMartens8 years agoSuper User
Perfect!