Power query M the IN operator

流过昼夜 提交于 2020-01-15 09:41:30

问题


What would be equivalent of SQL IN operator for Power BI. Just like in clause:

where [Column1] IN ('Value1', 'Value2', 'Value3')

I am looking for M solution (not DAX).


回答1:


You can use the List.Contains function.

For example,

= Table.SelectRows(Table1, each List.Contains({'Value1', 'Value2', 'Value3'}, [Column1]))

will filter Table1 to include only rows where [Column1] is contained in the given list.



来源:https://stackoverflow.com/questions/51740679/power-query-m-the-in-operator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!