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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
arth78
Frequent Visitor

Power Query : Select a line from a list

Hello,

 

I'm a new user of PowerBI and I need your help to find a Power Query formula.

 

I have a column which contains a list of lines and I need to create a column which select a single line when it contains the expression "PRIO2". I'm probably not really understandable so I made a screen that explain what I want :

 

example.png

 

Can you help me to find the right Power Query formula to do that ?

 

Any help would be appreciated. 

1 REPLY 1
WanderingBI
Resolver III
Resolver III

Hi!

 

You could use the following formulas as in this example.

 

You can copy this code into the advanced editor of a new blank query to run it:

let
    Source =  #table(
    {
      "Task",  
      "Status" 
    }, 
    {
      {
       "Task1",{"status1 pending","status2 pending"}   },
      {
        "Task2",{"status1 pending","text PRIO2","text PRIO2"}
      }
    }
  ),
    extractOccurence = Table.AddColumn(Source, "extract", each List.FindText(_[Status], "PRIO2")),
    checkOccurenceCount = Table.AddColumn(extractOccurence, "containsPRIO2", each if List.Count(_[extract]) >0 then true else false, type logical)
in
    checkOccurenceCount

 

 

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.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.