How can I get a column value from previous row in Power Query?

后端 未结 1 747
既然无缘
既然无缘 2021-01-03 17:04

I want to get a value from the previous row.

I tried the following code as suggested in this post:

Table.AddColumn(#\"Added index\", \"custom column\         


        
1条回答
  •  有刺的猬
    2021-01-03 17:20

    The error comes because {[Index]-1} without anything before it is a list value, but instead you want to index into a row of a table with this syntax: MyTable{index}

    That looks like:

    = Table.AddColumn(#"Added index", "custom column", each #"Added index"{[Index]-1}[My Column])
    

    0 讨论(0)
提交回复
热议问题