Power Query intermedio in Excel
Lyndsay Girard
Performance Analytics Consultant
let
Source = ""
in
Source
let
MyTable = Table.FromRecords({
[ID = 1, Name = "A", Result = 10],
[ID = 2, Name = "B", Result = 5]})
in
MyTable
Espressione let con 1 passaggio
let
MyTable = Table.FromRecords({
[ID = 1, Name = "A", Result = 10],
[ID = 2, Name = "B", Result = 5]}),
#"Sorted Rows" = Table.Sort(MyTable,{{"Result", Order.Ascending}})
in
#"Sorted Rows"
Espressione let con due passaggi
let
MyTable = Table.FromRecords({
[ID = 1, Name = "A", Result = 10],
[ID = 2, Name = "B", Result = 5]}),
#"Sort" = Table.Sort(MyTable,{{"Result", Order.Ascending}}),
#"Lower" = Table.TransformColumns(#"Sort",{{"Name", Text.Lower, type text}})
in
#"Lower"
Espressione let con tre passaggi
Primitivo
[ID = 1, Name = "A"]
Strutturato
Lista:
List = {1,2,3}
Record:
Record = [Column1=1,Column2=2]
Tabella:
Table = #table({"Column A","Column B"},
{{1,10},{2,20}})
Funzione:
Sintassi funzione personalizzata:
= (Variable as Data Type, Variable as Data Type) => (Output Expression)
Esempio semplice di funzione personalizzata:
let
MyFunction = (x) => x + 1
in
MyFunction(10)


Power Query intermedio in Excel