Skip to content
Advertisement

Power BI – DAX List.Select syntax to return specific records

I unfortunately discovered today that I cannot use SQL to return a subset of records when Power BI references a SQL Server DB as a data source. I’m trying to do something similar to a SQL where clause using “IN”

for example

I’ve tried this (and several other variations) in DAX but get an error for Token Literal Expected:

Is there a way to accomplish this in DAX?

Advertisement

Answer

In DAX, you’d write it like this:

However, it appears you are actually asking about the M language (used in the Query Editor).

In M, you can write it something like this:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement