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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Convert power query table to a single line list

Hi,
I have a table in power query that I want to convert into a SINGLE line list so I can use it as a parameter.  I want to use the parameter in an "in" clause in a SQL statement.

Here is the example table

Table
Cow
Chicken
Dog
Cat
Bird

 

Desired Single line list
'Cow','Chicken','Dog','Cat','Bird'

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

3 REPLIES 3
Anonymous
Not applicable

Hi again, I think I found the menu item to convert it

Anonymous
Not applicable

Hi Ahmedx,

Thanks for the detailed instructions. I was able to follow them through. The only issue is that the result is a string, not a list. I am unable to create a parameter from the result. Do you know how to convert the string to a single-line list? All of the transformation options are grayed out for the result. 

Ahmedx
Super User
Super User

pls see my video
https://1drv.ms/v/s!AiUZ0Ws7G26RiAM5vdvvIh8nFqPw?e=8tth7V


Sample PBIX file attached
https://1drv.ms/u/s!AiUZ0Ws7G26RiAIx2m_UnXzIz_Ls?e=HGWMj2

(x) => "'" & Text.Combine(x, "','") & "'"

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.