let
Source = Record.ToTable(#shared)
in
Source
#"PreviousStep"{[IndexColumnName]-1}[ColumnName]
mVal = Excel.CurrentWorkbook(){[Name="vVal"]}[Content]{0}[Column1],
= Excel.CurrentWorkbook(){[Name="TableName"]}[Content]{0}[ColumnName]
=LEFT(CELL("filename"),FIND("[",CELL("filename"),1)-1)
SELECT *
FROM TableName as t1
WHERE t1.Date >= '8/1/2017'
=Sql.Database("Server:Port", "Dbname", [Query="SELECT * #(lf)FROM TableName as t1 #(lf)WHERE t1.Date >= '8/1/2017'"])
mVal = Text.From(Excel.CurrentWorkbook(){[Name="vVal"]}[Content]{0}[Column1]),
=Sql.Database("Server:Port", "Dbname", [Query="SELECT * #(lf)FROM TableName as t1 #(lf)WHERE t1.Date >= '" & mVal & "'"])
= Value.Is(Value.FromText([ColumnName]), type number)
= try Number.From([ColumnName]) otherwise null
(text as text, optional char_to_trim as text) =>
let
char = if char_to_trim = null then " " else char_to_trim,
split = Text.Split(text, char),
removeblanks = List.Select(split, each _ <> ""),
result=Text.Combine(removeblanks, char)
in
result
= if [LastPrevPurchase] = null then null else Duration.Days(Duration.From([purchaseTime]-[LastPrevPurchase]))
= Text.Contains("String","Substring")
= Text.Contains("String","Substring", Comparer.OrdinalIgnoreCase)
= List.Count(Splitter.SplitTextByAnyDelimiter({"dog","cat"})([Text]))>1
= List.Count(Splitter.SplitTextByAnyDelimiter({"dog","cat"})([Text]))=1
"dbq=C:\USERS\USERNAME\FOLDER\Receipt dump.xlsx;defaultdir=C:\USERS\USERNAME\FOLDER;driverid=1046;maxbuffersize=2048;MaxScanRows=1;pagetimeout=5;dsn=Excel Files"
= Odbc.Query("dbq=C:\USERS\USERNAME\FOLDER\Receipt dump.xlsx;defaultdir=C:\USERS\USERNAME\FOLDER;driverid=1046;maxbuffersize=2048;MaxScanRows=1;pagetimeout=5;dsn=Excel Files", "Select Distinct * From [Sheet1$]")
(tbla as table, tblb as table) as table =>
let
Source = Table.NestedJoin(tbla,{"Column1"},tblb,{"Column1"},"Joined",JoinKind.LeftOuter),
ColToExp = List.Skip(Table.ColumnNames(tblb),1),
Expand = Table.ExpandTableColumn(Source, "Joined", ColToExp, {ColToExp{0} & Number.ToText(Table.ColumnCount(Source))})
in
Expand
let
fPath = Excel.CurrentWorkbook(){[Name="vPath"]}[Content]{0}[Column1],
Source = Folder.Files(fPath),
#"Invoke Custom Function1" = Table.AddColumn(Source, "Transform File from CSV", each #"Transform File from CSV"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name","Transform File from CSV"}),
JoinTbl = List.Accumulate(
List.Skip(#"Removed Other Columns1"[Transform File from CSV]),
#"Removed Other Columns1"[Transform File from CSV]{0},
(JoinedTable,CurrentTable) => fMerge(JoinedTable, CurrentTable)
)
in
JoinTbl
=List.Max({[prevType1],[prevType2],[prevType3]})
= Table.TransformColumns(#"Changed Type", {"Column1", each Text.Select(_,{"a".."z","A".."Z","0".."9"," "})})
= Table.TransformColumns(#"Changed Type", List.Transform(Table.ColumnNames(#"Changed Type"), each {_, each Text.Select(_, {"a".."z","A".."Z","0".."9"," "}), type text}))
=List.Contains([Data][Column1],"SomeText")
=Text.Contains(Text.Combine(Table.ToList([Data], Combiner.CombineTextByDelimiter("", QuoteStyle.None)),""),"SomeText")
=Table.TransformColumnTypes(Source, List.Transform(Table.ColumnNames(Source), each {_, type text}))
(tbl as table, mRow as number) =>
let
lVal = Record.ToList(tbl{mRow}),
firstNum = List.Select(lVal, each Value.Is(Value.FromText(_), type number)){0},
colPos = try List.PositionOf(lVal, firstNum) otherwise null
in
colPos