一个组索引编号如何按PowerQuery中的自定义类别进行

发布于 2025-02-09 13:37:59 字数 343 浏览 0 评论 0原文

在此图像中,如何通过自定义类别显示一个组索引号。 挑战在左侧,而预期的输出则由右侧的箭头显示。 我想要每个包含g-tan的行的ID,应该具有单独的索引编号,因此,根据此格式,K-tan,m-tan,如下图所示:

https://ibb.co/kghq3bp

“在此处输入图像说明”

谢谢。

How can one group index number by a custom category in this image show below.
The challenge is on the left section, while the expected output is shown by an arrow at the right section.
I want for for every ID that has row containing G-TAN, should have a seperate index number, so also K-TAN, M-TAN according to this format as shown in the image below:

https://ibb.co/kghq3Bp

enter image description here

Thank you.

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

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

发布评论

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

评论(1

奈何桥上唱咆哮 2025-02-16 13:37:59

尝试

let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"FIKA"}, {{"Count", each _, type table}}),
#"Added Index" = Table.AddIndexColumn(#"Grouped Rows", "Index", 1001, 1000, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each Table.AddIndexColumn([Count],"ID2", [Index], 1, Int64.Type)),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Count", "Index"}),
#"Expanded Custom" = Table.ExpandTableColumn(#"Removed Columns", "Custom", {"DOSE", "UNIT", "QTY", "ID2"}, {"DOSE", "UNIT", "QTY", "ID2"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Custom",{{"ID2", "ID"}})
in  #"Renamed Columns"

IDfika剂量单位数量
1G312
2G215
3G1G 21 2
4 G 2 4G213
5K115
6K25 6 K 2 12
7K1 115
8 8m312
9m112

try

let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"FIKA"}, {{"Count", each _, type table}}),
#"Added Index" = Table.AddIndexColumn(#"Grouped Rows", "Index", 1001, 1000, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each Table.AddIndexColumn([Count],"ID2", [Index], 1, Int64.Type)),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Count", "Index"}),
#"Expanded Custom" = Table.ExpandTableColumn(#"Removed Columns", "Custom", {"DOSE", "UNIT", "QTY", "ID2"}, {"DOSE", "UNIT", "QTY", "ID2"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Custom",{{"ID2", "ID"}})
in  #"Renamed Columns"

enter image description here

IDFIKADOSEUNITQTY
1G312
2G215
3G112
4G213
5K115
6K212
7K115
8M312
9M112
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文