电源查询:列中每组新元素的索引

发布于 2025-02-08 14:42:39 字数 183 浏览 1 评论 0原文

我在表中有一个指示组标识的列,我想生成一个索引,该索引从1到该组出现的次数,对于每个组。当然还有其他列有数据

示例:

I have a column in a table that indicates a group identification and I would like to generate an index that goes from 1 to the number of times that group appears, for each of the groups. And then of course there are other columns with data

Example:

Example table

So, how do I generate the Index column from the Group ID column?

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

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

发布评论

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

评论(1

心意如水 2025-02-15 14:42:39

右键单击“组ID”,“组”,保留名称,使用操作所有行

更改窗口中的代码,从而

= Table.Group(#"Changed Type", {"Group ID"}, {{"Count", each _, type table ....

使用

= Table.Group(#"Changed Type", {"Group ID"}, {{"Count", each Table.AddIndexColumn(_, "Index", 0, 1, Int64.Type), type table}})

箭头上的箭头扩展

Right click Group ID, Group By, keep name, use operation All Rows

Change the code in the window from

= Table.Group(#"Changed Type", {"Group ID"}, {{"Count", each _, type table ....

to

= Table.Group(#"Changed Type", {"Group ID"}, {{"Count", each Table.AddIndexColumn(_, "Index", 0, 1, Int64.Type), type table}})

Expand using arrows atop column

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文