Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys...
I'm trying to extract all data from this column keeping all data in one column only, separated by comma.
Solved! Go to Solution.
Hello @Williamspsouza ,
We've added a custom column to meet your requirements.
if [Data] is table
then
Text.Combine(
List.Transform(
List.Combine(Table.ToRows([Data]))
, each Text.From(_)
)
,","
)
else [Data]
And we can get the result this way,
All inquiries are here:
let
Source = Table.FromRows(
{
{1, null},
{2, "QA"},
{3, Table.FromRows({{"Camunda"}, {"Salesforce"}} ,{"Element:Text"})},
{4, null},
{5, Table.FromRows({{"A",1}, {"B",2}, {"C",4}} ,{"Element:Text2","AnotherID"})}
}
,{"ID", "Data"}),
#"Added Custom" = Table.AddColumn(Source, "Custom", each if [Data] is table
then
Text.Combine(
List.Transform(
List.Combine(Table.ToRows([Data]))
, each Text.From(_)
)
,","
)
else [Data])
in
#"Added Custom"
If you don't meet your requirement, could you show the expected exact result based on the table we shared?
BTW, pbix as attached.
Best regards
Hi @Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Hello @Williamspsouza ,
We've added a custom column to meet your requirements.
if [Data] is table
then
Text.Combine(
List.Transform(
List.Combine(Table.ToRows([Data]))
, each Text.From(_)
)
,","
)
else [Data]
And we can get the result this way,
All inquiries are here:
let
Source = Table.FromRows(
{
{1, null},
{2, "QA"},
{3, Table.FromRows({{"Camunda"}, {"Salesforce"}} ,{"Element:Text"})},
{4, null},
{5, Table.FromRows({{"A",1}, {"B",2}, {"C",4}} ,{"Element:Text2","AnotherID"})}
}
,{"ID", "Data"}),
#"Added Custom" = Table.AddColumn(Source, "Custom", each if [Data] is table
then
Text.Combine(
List.Transform(
List.Combine(Table.ToRows([Data]))
, each Text.From(_)
)
,","
)
else [Data])
in
#"Added Custom"
If you don't meet your requirement, could you show the expected exact result based on the table we shared?
BTW, pbix as attached.
Best regards
Hi @Anonymous ,
Could you please share a sample data to me?
So I can try to solve it in my desktop first to make sure my way is working.
Thanks
Aiolos Zhao
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |