如何从 Power Query 中的上一行获取列值?
How can I get a column value from previous row in Power Query?
我想从上一行中获取一个值。
我按照 this post 中的建议尝试了以下代码:
Table.AddColumn(#"Added index", "custom column", each {[Index]-1}[column name])
但是它抛出这个错误:
Cannot use field access fot type List
请帮忙,我做错了什么?
出现错误是因为 {[Index]-1}
在它之前没有任何内容是列表值,而是您想使用以下语法索引到 table 的一行:MyTable{index}
看起来像:
= Table.AddColumn(#"Added index", "custom column", each #"Added index"{[Index]-1}[My Column])
我想从上一行中获取一个值。
我按照 this post 中的建议尝试了以下代码:
Table.AddColumn(#"Added index", "custom column", each {[Index]-1}[column name])
但是它抛出这个错误:
Cannot use field access fot type List
请帮忙,我做错了什么?
出现错误是因为 {[Index]-1}
在它之前没有任何内容是列表值,而是您想使用以下语法索引到 table 的一行:MyTable{index}
看起来像:
= Table.AddColumn(#"Added index", "custom column", each #"Added index"{[Index]-1}[My Column])