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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
adi38612
Frequent Visitor

Text Filter Facing conundrum!!

I am using Text Filter Visual to filter out values in a table and the SELECTEDVALUE function shows the output based on it.

The input is name of a person in the text filter, and if the name is found then the output, in a separate card, is the name of the person. The measure for the output is:

name_entered =
SELECTEDVALUE('Table 1'[name])

 

It is working for most of the cases. However, when I type in a name like 'John' when there is 'Johnson' or 'Johny' also available, it return blank because SELECTEDVALUE has a property where it returns the value when the context for columnName has been filtered down to one distinct value only, Otherwise returns alternateResult.

Note that it would return available when searched for Johnson or Johny, as there is no conflict (non-distinct values) there.

 

Can I get the desired output on this? I don't want to change the input type, i.e., it has to stay as text filter.

7 REPLIES 7
parry2k
Super User
Super User

@adi38612 don't think there is a going to a solution for this if you are using a Text filter because there is no way to compare the value entered by the user. You are out of luck my friend.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@adi38612 I understood your question and that's why I asked what the behaviour should be, assume someone enters "Johns" only, and what would be the return in case there are two values as listed below:

 

Johnson

Johnsabc



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

In case, user searches for anything that is not available in the column 'name', it should return a 'blank' only.
So if only John, Johnson and Johny are there in the table, and if I search for johns, it should return a 'blank'.

 

parry2k
Super User
Super User

@adi38612 so what do you want if it is a partial match? 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

John is a separate row entry under the column 'name' in the 'Table 1'. Similarly, Johnson and Johny are also separate entries.

I want that if I enter John in Text filter, I get only John. Right now, I am getting Blank, as John is not treated as distinct entries by SELECTEDVALUE function.

But when I enter Johnson or Johny, I get them respectivaly as the output as they are treated as Distinct entries.

parry2k
Super User
Super User

@adi38612 you can try something like this:

 

Measure = 
COCATENATEX ( VALUES ( Table[Name] ), Table[Name], "," )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thank you for the response.

By this, I am getting output as 'Johnson, Johny, John', rather than 'John'

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors