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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
marktait
Helper I
Helper I

How to return a list of rows from a table where text is found within a free text field in a/o table

I have a table, Defender, with a column, Device Name

 

I have another table, Defender SNOW, which has a column, Short Description (which is a text field).

 

The Short Description contains free text. I want to be able to lookup 'Defender'[Device Name] and check if it appears anywhere in the 'Defender SNOW'[Short Description] field. 

 

I can do this with the following calculated column:

 

Has SNOW Ticket = 
    IF(
        ISEMPTY(
            FILTER(
                'Defender SNOW',
                CONTAINSSTRING(
                    'Defender SNOW'[Short description],
                    Defender[Device Name]
                )
            )
        ),
         FALSE(),
         TRUE()
    )

 

I can then lookup the 'Defender SNOW'[Number] column to return the reference number of the record where the device name exists.

 

Has SNOW Ticket Ref = 
    IF(
        ISEMPTY(
            FILTER(
                'Defender SNOW',
                CONTAINSSTRING(
                    'Defender SNOW'[Short description],
                    Defender[Device Name]
                )
            )
        ),
        BLANK(),  -- or you can use 0 or any default value based on your requirement
        MAXX(
            FILTER(
                'Defender SNOW',
                CONTAINSSTRING(
                    'Defender SNOW'[Short description],
                    Defender[Device Name]
                )
            ),
            'Defender SNOW'[Number]
        )
    )

 

 

 

However, I want to be able to return multiple entries from the 'Defender SNOW' table, if the [Device Name] is found in multiple records in the [Short Description] field, and show the multiple 'Defender SNOW'[Number] in a table on a Power BI tab.

 

Is it possible to do this?

 

Alternatively, is it possible to create a dynamic table, which is will list all records in the 'Defender SNOW' table where 'Defender'[Device Name] exists in Short Description? I could then just show that dynamic table in a visual/power BI tab.


So, for example, the source tables and the expected/desired resulting dynamic table would look like this:

Defender Relations and Dynamic Table.png

Thanks for any pointers,

 

Mark

1 ACCEPTED SOLUTION
marktait
Helper I
Helper I

Hi - adding ths measure works (thanks to Sam Nseir):

SNOW count = 
  CALCULATE(
    COUNTROWS('Defender SNOW'),
    CONTAINSSTRING('Defender SNOW'[Short Description], SELECTEDVALUE('Defender'[Device Name]))
  )

Thanks, Mark

 

View solution in original post

3 REPLIES 3
marktait
Helper I
Helper I

Hi - adding ths measure works (thanks to Sam Nseir):

SNOW count = 
  CALCULATE(
    COUNTROWS('Defender SNOW'),
    CONTAINSSTRING('Defender SNOW'[Short Description], SELECTEDVALUE('Defender'[Device Name]))
  )

Thanks, Mark

 

Anonymous
Not applicable

Hi @marktait ,

In order to better understand your demands and give the right solution, could you please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi - of course - I've added sample tables and the desired result to the original post. Thanks.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.