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.
Greerings -
I have a column that has both 'Table' and 'text' values.
What I'd like to do is;
If value type == table then, extract values to new column (myNewCustomColumn) as CSV.
else copy existing value to new column (myNewCustomColumn).
Can someone please help w/ this type of logic/formula?
Attached mockup of data for clarity.
Thanks!!!!
Solved! Go to Solution.
Hi @ihayes916,
You can use below query to get expand values:
let
Source = #table( type table [#"Component"=any],
{
{"abc"},
{"Cda"},
{"AAA"},
{#table({"Element"}, {{"esc"},{"Test"}})},
{#table({"Element"}, {{"EAd"},{"BAA"}})}
}),
#"Added Custom" = Table.AddColumn(Source, "Expand", each if Value.Is([Component],type table) then Text.Combine([Component][Element],",") else [Component])
in
#"Added Custom"
Regards,
Xiaoxin Sheng
Hello @Anonymous!
Thanks for the reply. Unfortunatly, I can't share the data and I've not found a way to recreate a small sample data set.
I've attached a more refined version (screen shot) of my request.
Column1 (Component) is my source data.
Column2 (ExtractedValues) is the custom column that I am hoping to be able to create. I've mocked up the result I'd like to see for each of the 3 scenarios.
Again, thanks for any help you might be able to provide!
Hi @ihayes916,
You can use below query to get expand values:
let
Source = #table( type table [#"Component"=any],
{
{"abc"},
{"Cda"},
{"AAA"},
{#table({"Element"}, {{"esc"},{"Test"}})},
{#table({"Element"}, {{"EAd"},{"BAA"}})}
}),
#"Added Custom" = Table.AddColumn(Source, "Expand", each if Value.Is([Component],type table) then Text.Combine([Component][Element],",") else [Component])
in
#"Added Custom"
Regards,
Xiaoxin Sheng
Thank you so much!!!!! I came to a similar solution (albeit w/ one extra step) but I like yours better!!!
Truly appreciate it!
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.
| User | Count |
|---|---|
| 76 | |
| 38 | |
| 31 | |
| 27 | |
| 26 |