Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Searching Contacts by First Name, Last Name, or a Nickname Using Text Filter Add In

I am trying to create a formula for a text filter search that will allow someone to search by either a contacts first and last name or by a designated nickname. Currently I have two columns of data: one containing both the first and last name (Contact.FirstandLast) and one containing the designated nickname (Contact.Nickname).

 

I'm not sure what function(s) would allow this to be possible. 

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous,

You could combine the two columns in a new Calculated Table, like this:

PLUs = UNION(
       DISTINCT(<YourTable>[Nickname Column]),
       DISTINCT(<YourTable>[FirstLast Column])
)
 
After that, I'm not sure exactly what you're trying to do - could you give more details on the goal?
 
Thanks,
Nathan
Anonymous
Not applicable

@Anonymous  Thanks for the reply. The end goal is to be able to search by a contact's first, last, and/or nickname. 

 

Ex. I have a contact Douglas Johnson. I want to be able to search by Douglas Johnson or Doug Johnson. 

Anonymous
Not applicable

@Anonymous  - 

Ah, I wasn't familiar with the Text Filter visual - pretty nice!

First you would create the table as mentioned above. Then use that new column in the Search Filter visual.

Hope This Helps

Nathan

Anonymous
Not applicable

Actually, scratch the former solution. That won't work, because you would need to create a relationship that wouldn't work. What you can do is add a calculated column to your table. It will concatenate the 2 columns.

 

SearchColumn = <YourTable>[FullName] & <YourTable>[NickName]

 

Then you can search on that column.

Anonymous
Not applicable

I'll give this a shot. One of the limitations I have come across with the text filter search is that it does search for all the characters in the criteria it's searching (if that makes sense).

 

Ex. If I have Douglas D. Johnson and search for Douglas Johnson it will not appear because it is searching for the full name. 

Anonymous
Not applicable

@Anonymous -

In my limited testing, I see that you can search for Doug, and that would return all values that include that text.

 

If you want Douglas Johnson, you could create two filter visuals, like this:

 

Search - 2 Filters.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.