Skip to content

Instantly share code, notes, and snippets.

@jaykilleen

jaykilleen/pquery.m

Created May 10, 2016
Embed
What would you like to do?
(Haystack as text, Needle as text) as number =>
List.Count(Text.Split(Haystack, Needle)) - 1
(Rec as record, Lambda as function) as record =>
let
Keys = Record.FieldNames(Rec),
Values = Record.FieldValues(Rec),
Renamed = List.Transform(Keys, each Lambda(_, Record.Field(Rec, _))),
Recorded = Record.FromList(Values, Renamed),
Return = Recorded
in
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment