Skip to content

Instantly share code, notes, and snippets.

@halbuki
Last active September 6, 2022 11:12
Show Gist options
  • Save halbuki/4dd8b87983c963002f9e2e0217c06567 to your computer and use it in GitHub Desktop.
Save halbuki/4dd8b87983c963002f9e2e0217c06567 to your computer and use it in GitHub Desktop.
Excel Lambda functions for Power Query Text functions
/* USE NAMESPACE "Text" */
AfterDelimeter = LAMBDA(_text, delimiter, [_index], _text);
At = LAMBDA(_text, _index, MID(_text, _index, 1));
BeforeDelimeter = LAMBDA(_text, delimiter, [_index], _text);
BetweenDelimeters = LAMBDA(_text, _startDelimiter, _endDelimiter, [_startIndex], [_endIndex], _text);
Clean = LAMBDA(_text, CLEAN(_text));
Contains = LAMBDA(_text, _substring,
LAMBDA(_text, IFERROR(FIND(_substring, _text), FALSE))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment