简体   繁体   中英

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

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"

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 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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