Forum Discussion
hnguyen76
5 years agoResolver II
Conditional Filter On Different Tables
Hi All. I have an optimization question. Currently I have a measure that returns the correct values in which I'm looking for. The measure is as followed: VAR _DateFilter = DATESBETWEEN(Dim_Calen...
ImkeF
5 years agoCommunity Champion
Hi hnguyen76 ,
sorry, I didn't pay enough attention to your actual use case.
While the {} is valid when directly used as a table replacement in a CALCULATE for example,
it cannot be used in a SWITCH statement. Just like any other table expression cannot be used in there:
SWITCH and IF have to return scalar values, so you cannot create conditional table expressions in DAX variables with them unfortunately.