电源查询连续列表从记录中的值不扩展到行

发布于 2025-01-30 07:09:35 字数 371 浏览 1 评论 0原文

我有一个API JSON响应,可以提供一些公司数据。它包括公司ID的列表和SIC_Codes的记录,该列表存储为列表(因为一家公司可能有许多SIC代码),

我当前将值扩展到行,然后使用自定义列来组并组合组合它们成类似于“ SIC1,SIC2,SIC3”之类的格式,

是否可以在不首先扩展行的情况下创建此串联列?

这是数据的预览:

”在此处输入图像说明”

I have an API JSON response that provides some company data. It includes a list of Company IDs and a record for sic_codes which is stored as a list (as there can be many sic codes for one company)

Currently, I'm expanding the values to rows and then using a custom column to group and combine them into a format like "sic1, sic2, sic3"

Is there a way to create this concatenated column without first expanding the rows?

here's a preview of the data:

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如若梦似彩虹 2025-02-06 07:09:35

怎么样

#"Transform" = Table.TransformColumns(#"PriorStepNameGoesHere",{{"sic_codes", each try Combiner.CombineTextByDelimiter(", ")(List.Transform( _ , each Text.From(_))) otherwise null }})

#"Added Custom" = Table.AddColumn(#"PriorStepNameGoesHere, "expanded_SICs", each try Text.Combine(List.Transform([sic_codes], each Text.From(_)),", ") otherwise [sic_codes])

How about

#"Transform" = Table.TransformColumns(#"PriorStepNameGoesHere",{{"sic_codes", each try Combiner.CombineTextByDelimiter(", ")(List.Transform( _ , each Text.From(_))) otherwise null }})

or

#"Added Custom" = Table.AddColumn(#"PriorStepNameGoesHere, "expanded_SICs", each try Text.Combine(List.Transform([sic_codes], each Text.From(_)),", ") otherwise [sic_codes])
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文