Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Can Text.Contains be used to detect the existence of line feeds and carriage returns, e.g. TextContains([column1]."#(cr)#(lf)") ?
Thanks!
Solved! Go to Solution.
Hi @ebjim
Thanks for using Fabric Community.
You can use the below codes for acheiving the above requirement.
Text.Contains([column1], String.Characters({10, 13}))
This approach uses Text.Contains to check if the column contains any of the character codes for carriage return and line feed. String.Characters({10,13}) creates a string containing the character codes for line feed (10) and carriage return (13).
Text.Matches([column1], "\r|\n")
You can also use the Text. Matches function with a regular expression that matches both carriage returns and line feeds. This expression will return a list of matches for either a carriage return (\r) or a line feed (\n) in the text column. If there are any matches, it means the text contains at least one line break.
Hope this helps. Please let us know if you have any further questions.
Hi @ebjim
Thanks for using Fabric Community.
You can use the below codes for acheiving the above requirement.
Text.Contains([column1], String.Characters({10, 13}))
This approach uses Text.Contains to check if the column contains any of the character codes for carriage return and line feed. String.Characters({10,13}) creates a string containing the character codes for line feed (10) and carriage return (13).
Text.Matches([column1], "\r|\n")
You can also use the Text. Matches function with a regular expression that matches both carriage returns and line feeds. This expression will return a list of matches for either a carriage return (\r) or a line feed (\n) in the text column. If there are any matches, it means the text contains at least one line break.
Hope this helps. Please let us know if you have any further questions.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
4 | |
3 | |
1 | |
1 | |
1 |