Page 1 of 1

Convert T-SQL to Power Query

Posted: Sun Aug 11, 2019 3:06 am
by tutuk28
How can I turn the next query en SQL:

SELECT Column1, Column2 FROM Table WHERE Column3 < 15

Into Power Query M?
I can only perform the first part:

= Table.SelectColumns(#"Table", {"Column1", "Column2"})

Thanks a lot!

Re: Convert T-SQL to Power Query

Posted: Mon Aug 12, 2019 3:13 pm
by RamanaV
Hi,

the following should help
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Column3] < 20),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Column3"})