Power Query - 概觀與學習- Excel - Microsoft Support
Power Query M 公式語言參考- PowerQuery M | Microsoft Docs
Power Query四部處理過程,Power Query 簡介- 每日頭條
Differences between the M Language and DAX in Power BI
M Language and DAX are the two languages supported by Power BI to manipulate, filter and analyse the data. Though both languages have similar functionalities, they operate independently of each other. M is used to pre-process the data inside the Query Editor whereas DAX is used to analyze the data after the data is loaded into the Data View Model.
Basics of M: Power Query Formula Language - RADACAD
M (Power Query Formula Language) is Case Sensitive. There is a difference between x and X.
推薦書籍:
Power BI終極實戰寶典|使用Power Query與PowerBI進行資料分析
let
Source = SharePoint.Files("此處為On line sharepoint網址", [ApiVersion = 15]),
#"Removed Other Columns" = Table.SelectColumns(Source,{"Name"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", each [Name] = "latest file name"),
Name = #"Filtered Rows"[Name]
in
Name
let
Source = SharePoint.Files("此處為On line sharepoint網址", [ApiVersion = 15]),
#"Filtered Rows" = Table.SelectRows(Source, each Text.Contains([Folder Path], "此處輸入檔案的關鍵字")),
results = Source{[Name=#"從另一個處理的資料,抓到最新檔案的名稱"{0},#"Folder Path"="此處為On line sharepoint網址+檔案的最後一層folder"]}[Content],
#"Imported Excel" = Excel.Workbook(results),
Export_Sheet = #"Imported Excel"{[Item="Export",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Export_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"欄位名稱1", type text}, {"欄位名稱2", type text}, {"欄位名稱3", type text},....})
in
#"Changed Type"
