Finding " " in DAX

We had to generate an email address for these customers that were of the form “FirstName Surname” as seen here.

The task was to do all of the steps in PowerBI Desktop instead of PowerQuery.

My initial thought was to do a FIND() function on the Customer Name field to find the “ “ and this kept returning an Error Message in the column. I then did some searching around to see why this was happening and found that FIND() or SEARCH() are not able to search for a “ “ in DAX.

So the way I had to do it was to use a SUBSTITUTE() function that will replace the “ “ with a “.” and then use the FIND function to search for the “.”. This worked perfectly and resulted in the answer I was looking for.

Author:
Alfie King
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab