powerbi Power Query (M) and DAX - What's the difference? Power Query (M) sample


Example

let
    Source = Folder.Files("\\jsds1.live\dfs\Userprofiles\ixh500\UPM_Profile\desktop\PQ Desktop Demos\Set 2"),
    #"Lowercased Text" = Table.TransformColumns(Source,{{"Extension", Text.Lower}}),
    #"Filtered Rows" = Table.SelectRows(#"Lowercased Text", each ([Extension] = ".csv")),
    #"Combined Binaries" = Binary.Combine(#"Filtered Rows"[Content]),
    #"Imported CSV" = Csv.Document(#"Combined Binaries",[Delimiter=",", Columns=4, Encoding=1252, QuoteStyle=QuoteStyle.None]),
    #"Promoted Headers" = Table.PromoteHeaders(#"Imported CSV"),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"TranDate", type date}, {"Account", Int64.Type}, {"Dept", Int64.Type}, {"Sum of Amount", type number}})
in
    #"Changed Type"

(Opens all files in a folder, filters on CSV files, opens and combines all CSV files and sets column data types. Note that none of that code was manually typed, but generated by clicking icons in the Power Query Editor.)