Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I'm trying to expand a column which contains list of records on each cell in Power Query (for example "Type de prestation" column) :
Each record of lists is organized as follow (self, value and id) :
The idea would be to concatenate the values "value" contained in each record of the list for each cell, delimiting them with semicolons.
For example, for the third row of the table, the celle "Type de prestation" would contain "PMO;Architecture".
I don't know if I'm clear... Have you ever done that? If yes, how?
Thanks in advance.
Solved! Go to Solution.
Hi Anthony,
That's good news.
To catch errors in general, you can use try/otherwise.
In this case, this should work:
= Table.TransformColumns(#"Développer Type de prestation",
{{"Phase projet", each try Combiner.CombineTextByDelimiter(";")(List.Transform( _ , each [value]))
otherwise null, type text}})
Hi @aaumond
You should create a new step with code like this.
PreviousStep should refer to the previous step in your existing query.
This is how the code would look in the advanced editor. If you enter in the formula bar by clicking fx, then leave out the step name CombineValueFromRecords.
CombineValueFromRecords =
Table.TransformColumns(
PreviousStep,
{
{
"Type de prestation",
each Combiner.CombineTextByDelimiter(";")(
List.Transform( _, each [value] )
),
type text
}
}
)
Regards,
Owen
Hi @OwenAuger
Thank you so much for the solution! It works.
Just a small detail: when a cell is empty, an error is displayed because it can not convert the null value to a list. How can I avoid this kind of error?
Regards,
Anthony
Hi Anthony,
That's good news.
To catch errors in general, you can use try/otherwise.
In this case, this should work:
= Table.TransformColumns(#"Développer Type de prestation",
{{"Phase projet", each try Combiner.CombineTextByDelimiter(";")(List.Transform( _ , each [value]))
otherwise null, type text}})
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
89 | |
80 | |
60 | |
59 | |
58 |
User | Count |
---|---|
157 | |
118 | |
101 | |
76 | |
68 |