Power Query

Power Query

947 bookmarks
Custom sorting
Unfold Child-Parent hierarchy in Power Query
Unfold Child-Parent hierarchy in Power Query
In this post I consider two types of hierarchies First table defines typical hierarchy of companies. Usually, such hierarchy is used for financial reports to group key figures. Most probably, we kn…
·bondarenkoivan.wordpress.com·
Unfold Child-Parent hierarchy in Power Query
Combination of rows of tables list in Power Query
Combination of rows of tables list in Power Query
Recently I faced interesting Power Query problem. Actually, initial problem has nothing related to Power Query. I required to export quite big volume of data from SAP BW using Business Objects Anal…
·bondarenkoivan.wordpress.com·
Combination of rows of tables list in Power Query
Part 2: Combination of rows of tables list in Power Query
Part 2: Combination of rows of tables list in Power Query
Part 1 describes approach showing how to work with List.Generate, Table.FromRecords, List CrossJoin in Get & Transform (aka Power Query, M language). Homework is done. Advice is digested. And I…
·bondarenkoivan.wordpress.com·
Part 2: Combination of rows of tables list in Power Query
Matchlists/tables in power query
Matchlists/tables in power query
let fxContain = (txt as text, idx as number) => let Result = if Text.Contains(txt,ListB{idx}) then ListB{idx} else if idx = ListCountB then null else @fxContain(txt,idx+1) in Result, ListA = {"help me rhonda", "in my room", "good vibrations", "god only knows"}, ListB = {"room", "me", "only", "help"}, ListCountB = List.Count(ListB)-1, ListC = List.Transform(ListA, each fxContain(_,0))in ListC
·social.technet.microsoft.com·
Matchlists/tables in power query
Text Contains Any Of
Text Contains Any Of
let ListOfWords = List.Buffer({"ed", "us", "an"}), Source = Table.FromColumns({{"red bus","blue train", "orange airplane"}}, {"some text"}), AddColumn = Table.AddColumn(Source, "Custom", (x) => List.AnyTrue(List.Transform(ListOfWords, each Text.Contains(x[some text], _))) )in AddColumn
·social.technet.microsoft.com·
Text Contains Any Of
How to use Record.Field for a list
How to use Record.Field for a list
Hi bjzk. You're going to have issues if you use Table.ColumnNames(GetH123Prices) to derive the equivalent of ColumnList in my example. Instead, you'll need to specify the names of the columns you want to check against (or use a formula to automatically whittle down the list of column names to exclude H0 and any other columns you don't want to check). For example:= Table.AddColumn(GetH123Prices, "ContainsH0", each List.Contains(Record.FieldValues(Record.RemoveFields(_, "H0_Price")), [H0_Price]))EhrenTuesday, August 09, 2016 6:26 PMReply | QuoteEhren - MSFTMicrosoft (MSFT) 6,290 PointsOwner
·social.technet.microsoft.com·
How to use Record.Field for a list
Matchlists/tables in power query
Matchlists/tables in power query
let fxContain = (txt as text, idx as number) => let Result = if Text.Contains(txt,ListB{idx}) then ListB{idx} else if idx = ListCountB then null else @fxContain(txt,idx+1) in Result, ListA = {"help me rhonda", "in my room", "good vibrations", "god only knows"}, ListB = {"room", "me", "only", "help"}, ListCountB = List.Count(ListB)-1, ListC = List.Transform(ListA, each fxContain(_,0))in ListC
·social.technet.microsoft.com·
Matchlists/tables in power query