Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Unclear how the Text.Contains function treats spaces within the text substring (e.g., "DR" vs. "DR " vs. " DR " vs. " DR"). Will it exactly match the sequence including spaces? If not, how can I do that?
Solved! Go to Solution.
Yes, Text.Contains treats spaces as text. So " DR", "DR", " DR ", and "DR " are not equal. However, each Text.Contains([FieldName], "DR" would = true for each of the above, but " DR " would = true only for " DR ".
--Nate
Yes, Text.Contains treats spaces as text. So " DR", "DR", " DR ", and "DR " are not equal. However, each Text.Contains([FieldName], "DR" would = true for each of the above, but " DR " would = true only for " DR ".
--Nate
Thanks! That explains why I'm having the problem...not considering the characters before or after the substring. I'll split on all spaces and then do the check using equal operator. Reduces the purmutations to evaluate in a conditional.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.