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
Oketa_Emma
Frequent Visitor

smartfilterbySQLBi

Hellos

I am requesting for your assistance, I am using the SmartFilterBySQLBI in my desktop power Bi reporting Vitalization to help me search for names of members that participated in an event. I have a column, ("Team") with names of a Team of two members that participated in an event. E.g. Oketa Emma and Tutu Moses in many rows. But a member like Tutu Moses can also be with many other different members starting or ending with his name, e.g. Tutu Moses and Onen Geofrey..... Etc. I also created a column of unique names ("Names") of all the participants e.g. Tutu Moses....etc. in rows with a created relationship to the Team, Which i used in the SmartFilterBySQLBI visualization field. 

 

When I search and select Tutu Moses from the SmartFilterBySQLBI search box, I am only able to view results of Tutu Moses only when the Team starts with Tutu Moses but not When it ends with Tutu yet I am interested in all both starting and ending.

 

QN How can i make the SmartFilterBySQLBI search box display results of all the teams containing Tutu Moses?

 

Thank you

Oketa

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @Oketa_Emma,

 

If I understand you correctly, you should be able to follow steps below to get your expected result.

 

I assume you have a table with "Team" column called "Table1", and a table with "Name" column called "Table2" like below.

 

t1.PNGt2.PNG

 

1. Remove the relationship between "Table1" and "Table2" if there is.

 

2. User the formula below to create a new measure.

Measure =
SUMX (
    Table2,
    FIND (
        FIRSTNONBLANK ( Table2[Name], 1 ),
        FIRSTNONBLANK ( Table1[Team], 1 ),
        ,
        0
    )
)

3. Use the measure as visual level filter on the visual that you want to display the "Team" column, and apply "is greater than 0" for the filter.

 

f1.PNG

 

4. Then you should be able to use the "Name" column in the SmartFilterBySQLBI visualization field to display results of all the teams containing Tutu Moses etc.

 

r1.PNG

Here is the sample pbix file for your reference. Smiley Happy

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @Oketa_Emma,

 

If I understand you correctly, you should be able to follow steps below to get your expected result.

 

I assume you have a table with "Team" column called "Table1", and a table with "Name" column called "Table2" like below.

 

t1.PNGt2.PNG

 

1. Remove the relationship between "Table1" and "Table2" if there is.

 

2. User the formula below to create a new measure.

Measure =
SUMX (
    Table2,
    FIND (
        FIRSTNONBLANK ( Table2[Name], 1 ),
        FIRSTNONBLANK ( Table1[Team], 1 ),
        ,
        0
    )
)

3. Use the measure as visual level filter on the visual that you want to display the "Team" column, and apply "is greater than 0" for the filter.

 

f1.PNG

 

4. Then you should be able to use the "Name" column in the SmartFilterBySQLBI visualization field to display results of all the teams containing Tutu Moses etc.

 

r1.PNG

Here is the sample pbix file for your reference. Smiley Happy

 

Regards

Thanks very much, it worked!!!

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.