Reputation: 93
I recently implemented a Dynamic Row Filter (http://msdn.microsoft.com/en-us/library/hh231092.aspx) on a Tabular Model.
For the purposes of this question, let's assume it's a simple =[Country]="US" DAX filter. This works just fine.
I would like to add a second filter on the same table to further restrict results by state. The obvious solution that comes to mind is something like this: =[Country]="US" && [State]="CA" but this does not work.
Any ideas or workarounds?
Upvotes: 0
Views: 2429
Reputation: 23
I know this question is old but it came up for me when I searched for the same thing but ended up figuring out on my own, so I'll leave my findings for anyone else having the same problem.
To solve your particular problem you need to put the filter like this:
=AND([Country]="US",[State]="CA")
It's as simple as that, the only proboem is that if you have more than 2 filters you need to put them like this:
=AND(filter1,AND(filter2,AND(filter3,filter4)))
Because on DAX you can't use a single AND like in excel.
Upvotes: 1