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
cartman21
Helper I
Helper I

Creating a filtered table via a contains function

Hello,

 

I have an urgent question for which I could really use some help.

 

Basically, I have a huge amount of data pulling in from an external resource, which is great.

 

I have say, 3000 companies and for them, investor data.

 

Company   Investor

 

Apple             Rafa           

Microsoft       Bill

Acer               John

Tito                Rafa, Niko

Logitech         Dino

 

 

Then, I have a seperate list of 'key investors. Lets say this list is

1) Rafa

2) Bill

 

 

How do I get to a table that shows me the companies filtered by the investors in this list of 2 priority people as above?

 

Company     Investor

 

Apple             Rafa

Microsoft       Bill

Tito                Rafa, Niko

 

I think it has something to do with the contains function,...but really don't get this at all. Any help would be much appreciated - on a strict deadline for this task. 

 

 

8 REPLIES 8
MFelix
Super User
Super User

Hi @cartman21,

 

I'm assuming the key investor list is in a separate table, if so just do a relationship between the two table and use the investor key table in your visual to have the companies per user and filter the blanks out of the key investor column.

 

Relationship.pngUntitled.png

 

Regards,

MFelix

 

 

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hello, thanks for taking the time to respond!

 

The problem is that the list is of KEY investors is like this:

 

1.PNG

 

But the data i am being fed has stuff like this:

 

211.PNG

 

So the method you provide sadly does not work due to this reason.

 

Any ideas?

 

 

Hi @cartman21,

If the investors name are in fixed location in your resource table.  In Query Edit navigator, you split the column into separate columns by delimiter(blank), get the investors column like the example you given above, then you can the solution posted by @MFelix.

In addition, from the screenshot below, the column is the investors or company fields? Could you please give more details, so that we can post the solution which is close to what you want.

1.PNG

Best Regards,
Angelia

Sorry I think my description was not good enough.

 

So basically, I have an API which I have created a report with in Power BI.

 

Here is the table I have working:

 

S1.PNG

 

 

If i use a delimiter, I get in row 4 for example different columns such as:

 

21111.PNG

 

My issue is i need to be able to search in the report (not in the query/backend) for say, 360 capital. 

 

I have tried the slicer, but then I have to select each iteration of 360 capital that shows up. Is there a way I can just type in a string into a slicer/search and all companies with investors matching the string show up in the table?

 

Here is the problem with the slicer----

 

and i can't find a 'select all' feature.

 

12.PNG

 

Any help with this would be greatly appreciated!!

Hi @cartman21,

 

Not abble to see this in the afternoon will try to get back to you tomorrow morning.

 

regards

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



hi @MFelix any help would be much appreciated, thanks!

@cartman21

 

Hi, a partial solution.  

 

This works only with 1 selection in slicer of investors.

 

A measure:

 

MatchInvestor =
IF (
    HASONEVALUE ( Investors[Investor] ) && HASONEVALUE ( Table1[Investor] ),
    IF (
        FIND (
            SELECTEDVALUE ( Investors[Investor] ),
            VALUES ( Table1[Investor] ),
            1,
            0
        )
            <> 0,
        1,
        0
    )
)

And add in the Visual level filter of your table visual and select only when measure is 1.

 

Regards

 

Victor

Lima - Peru




Lima - Peru

Anyone?

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.