數據源:
任意數據源
目標:
設置適合的數據類型
操作過程:
選取指定列》【主頁】》【數據類型】》選取
選取指定列》【轉換】》【數據類型】》選取
選取指定列》【轉換】》【檢測數據類型】
單擊列標題左側的【數據類型】按鈕選取
M公式:
= Table.TransformColumnTypes( 表,{{ "列名1", 指定類型1},...,{ "列名n", 指定類型n}}, "地區")
指定類型:
小數:type number / Number.Type
貨幣:Currency.Type
整數:Int64.Type
百分比:Percentage.Type
日期/時間:type datetime
日期:type date / Date.Type
時間:type time / Time.Type
日期/時間/時區:type datetimezone
持續時間:type duration / Duration.Type
文本:type text / Text.Type
邏輯值:type logical / Logical.Type
二進制:type binary / Binary.Type
其他數據類型:
空值:null
函數:function
兩種或兩種以上的type:any
不屬於任何type:none
其他:
日期表示法:=#date(年,月,日)
時間表示法:=#time(時,分,秒)
日期時間表示法:=#datetime(年,月,日,時,分,秒)
日期時間時區表示法:=#datetimezone(年,月,日,時,分,秒,偏移小時,偏移分鍾)
持續時間表示法:=#duration(天,時,分,秒)
擴展:
轉二進制:
= Text.ToBinary("文本型數字", encoding, 邏輯值)
= Lines.ToBinary({"文本型數字"})
= Binary.From(任意, encoding)
= Binary.FromList({數值列表})
= Binary.FromText("文本型數字", encoding)