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

Searching for text containing key words

Hi All,

 

I am working in Power BI service using DirectQuery mode.

I want to search for keywords in a free text feld and then say true of false if the keyword can be found or not. 

Ideally this would be a measure, I used a conditional column with this code:

 

= Table.AddColumn(#"Added Conditional Column", "SearchText", each if Text.Contains([eps_description], "FW") then "Firmware" else if Text.Contains([eps_description], "Firmware") then "Firmware" else if Text.Contains([eps_description], "Panel") then "Panel" else if Text.Contains([eps_description], "Settings") then "Settings" else false)

 

But I get an error "This step results in a query that is not supported in DirectQuey mode Switch all tables to import mode"

 

Can the above be done as a measure?

 

Many Thanks for your help,

1 ACCEPTED SOLUTION
nandukrishnavs
Community Champion
Community Champion

@drwinny 

 

Try to implement the column logic in the source table. Or, try to create a calculated column using DAX.

example:

 

Status = 
var _x=database_file[root_path]
var _result= CONTAINSSTRING(_x,"MSSQL")
return _result

nandukrishnavs_0-1607693774135.png

 

 


Regards,
Nandu Krishna

View solution in original post

2 REPLIES 2
nandukrishnavs
Community Champion
Community Champion

@drwinny 

 

Try to implement the column logic in the source table. Or, try to create a calculated column using DAX.

example:

 

Status = 
var _x=database_file[root_path]
var _result= CONTAINSSTRING(_x,"MSSQL")
return _result

nandukrishnavs_0-1607693774135.png

 

 


Regards,
Nandu Krishna

Sorry i am new to DAX and don't really understand the example, I will ask for it to be added to the database view that I am using.

 

Thanks for trying to help me.

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.