Created
August 31, 2022 22:59
-
-
Save ncalm/0203a0ad3c9e8a3dea9a2d804224e629 to your computer and use it in GitHub Desktop.
Power Query patterns for changing default behavior when combining text values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//"a" & null = "a" | |
//null & "b" = "b" | |
//And this behavior which is different to the default behavior for Text.Combine: | |
//null & null = null | |
//Default separator is an empty string | |
custom_combine = (columns as list,optional sep as nullable text) => | |
if | |
ListAllNull(columns) | |
then | |
null | |
else | |
Text.Combine( | |
columns, | |
if sep = null then "" else sep | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment