简体   繁体   English

Power BI代码以M语言进行过滤

[英]Power BI code for filtering in M Language

Please let me know why the below is not filtering 请让我知道为什么以下内容没有过滤

let
    Source = Sql.Database("localhost\SQLEXPRESS", "master"),
    dbo_dqra = Source{[Schema="dbo",Item="dqra"]}[Data],
    WTF = Table.SelectRows(dqRA as table, "column 0" < 25 as function) 
in
    dbo_dqra

first line is let 2nd line is source 3rd line is db 4th line is wtf 5th line is in 6th line is db 第一行是第二行是源第三行是db第四行是wtf第五行在第六行是db

Your filter is being applied in the step that you have labeled "WTF", but the last clause of your query is returning the prior step, "dbo_dqra" 在标记为“ WTF”的步骤中将应用过滤器,但查询的最后一个子句将返回上一步“ dbo_dqra”

Also, there's some syntax that's wrong. 另外,有些语法是错误的。 You don't need those "as table" / "as function" remarks, and the column should be wrapped in brackets, not quotes. 您不需要那些“作为表” /“作为函数”的注释,并且该列应括在方括号中,而不是用引号引起来。

Try this: 尝试这个:

let
    Source = Sql.Database("localhost\SQLEXPRESS", "master"),
    dbo_dqra = Source{[Schema="dbo",Item="dqra"]}[Data],
    WTF = Table.SelectRows(dbo_dqra, each [column 0] < 25) 
in
    WTF 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM