【问题标题】:How to move only one cell of a column and keep other columns same如何只移动一列的一个单元格并保持其他列相同
【发布时间】:2023-02-17 00:53:15
【问题描述】:

我希望有一个人可以帮助我。目前我有一个表,我需要在其中向上移动或删除最后一列的第一个空值。这将使我将所有数据放在同一行中。

enter image description here

我使用了条件列,但我不知道如何引用下一行。

= Table.AddColumn(#"Changed Type", "Custom", each if [Column5] = null then[第5栏]否则 1)

enter image description here

【问题讨论】:

    标签: excel powerquery


    【解决方案1】:

    这会将最后一列中的行向上移动。那是你要找的吗?

    let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    x = {List.Combine({List.RemoveFirstN(List.Last(Table.ToColumns(Source)),1),{null}})},
    y = List.RemoveLastN(Table.ToColumns(Source),1),
    z = List.Combine({y,x}),
    custom = Table.FromColumns(z,Table.ColumnNames(Source))
    in custom
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-30
      • 1970-01-01
      • 2017-09-05
      相关资源
      最近更新 更多