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
badger123
Resolver I
Resolver I

Search measure & cross-filter

Hi all,

 

I have two table visuals: one is displaying phrases from Table 2, another is displaying terms from Table 1 with another column using measure CountWords (below), counting the frequency of each term appearing in the phrases. Is it possible at all that I can make it so that when I select a term it filters the phrases in the other table to show those that contain the selected term? 

 

CountWords = 
VAR CurrWord =
SELECTEDVALUE ( 'Table1'[term] )
RETURN
COUNTROWS (
    CALCULATETABLE (
        VALUES ( Table2[phrase]),
        FILTER ( Table2
        , SEARCH ( CurrWord, Table2[phrase], 1, -1 ) > 0 ) ))

I'm not sure if this is possible but happy to change my approach if it is using different measures. Any guidance would be appreciated 🙂 

1 ACCEPTED SOLUTION

Hi @badger123 

 

Based on my test, you may put Term in table visual.But you may also need put the measure in it.

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-cherch-msft
Employee
Employee

Hi @badger123 

 

Based on my test, the measure is correct and you may use it with Table 2 to display the phrases.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-cherch-msft Thanks Cherie! The measure works fine, but I would like it so that when I click on a term in my table visual, it filters the other table visual with the phrases. E.g. say the table visual looked as below, if I click "Oranges" in the term table, I would like only the phrases containing "oranges" to display in the phrase table. Is this possible?

 

Phrase
I like oranges
I don't like oranges
I like apples
I don't like apples

 

Term
Oranges
Apples

Hi @badger123 

 

Yes,it is possible.Please check below screenshot.

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your help @v-cherch-msft , you are right! That does work. The reason it's not working for me is because I am searching for "term" but I want to put "select" in a table and use this to filter (see below). Is this possible? 

 

SelectTerm
ApplesApple
ApplesApples
OrangesOrange
OrangesOranges

Hi @badger123 

 

Based on my test, you may put Term in table visual.But you may also need put the measure in it.

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.