Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have a column with titles that I want to pivot, and the column with the cell info has both values and embeded lists. I got this to work once, and now I can't repeat it. I keep getting errors like "can't convert list to text".
Any ideas?
| Titles | Values |
| Name | Elmer Fudd |
| Locations | List |
Solved! Go to Solution.
Hello @Anonymous
this depends from whats in your List and how you would like to handle it. Here some basic examples
Transform the column content to list and expand afterwards the list to new rows
let
Source = #table
(
type table [Titles= any, Values= any],
{
{"Name", "Elmer"}, {"Location", {"Street", "City"}}
}
),
Transform = Table.TransformColumns
(
Source,
{
{
"Values",
each if Value.Is(_,type list) then _ else {_},
type list
}
}
),
#"Expanded Values" = Table.ExpandListColumn(Transform, "Values")
in
#"Expanded Values"
or you want to extract the first entry of your list like this
let
Source = #table
(
type table [Titles= any, Values= any],
{
{"Name", "Elmer"}, {"Location", {"Street", "City"}}
}
),
Transform = Table.TransformColumns
(
Source,
{
{
"Values",
each if Value.Is(_,type list) then _{0} else _,
type any
}
}
)
in
Transform
this to give you some ideas. If you have a more specific scenario, let me know
Copy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello @Anonymous
this depends from whats in your List and how you would like to handle it. Here some basic examples
Transform the column content to list and expand afterwards the list to new rows
let
Source = #table
(
type table [Titles= any, Values= any],
{
{"Name", "Elmer"}, {"Location", {"Street", "City"}}
}
),
Transform = Table.TransformColumns
(
Source,
{
{
"Values",
each if Value.Is(_,type list) then _ else {_},
type list
}
}
),
#"Expanded Values" = Table.ExpandListColumn(Transform, "Values")
in
#"Expanded Values"
or you want to extract the first entry of your list like this
let
Source = #table
(
type table [Titles= any, Values= any],
{
{"Name", "Elmer"}, {"Location", {"Street", "City"}}
}
),
Transform = Table.TransformColumns
(
Source,
{
{
"Values",
each if Value.Is(_,type list) then _{0} else _,
type any
}
}
)
in
Transform
this to give you some ideas. If you have a more specific scenario, let me know
Copy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.