Table.ClearDown

Syntax

Table.ClearDown(table as table, columns as list) as table

About

Replaces the specified columns with null when all their values are repeated from the previous row.

Example

Clear the Region and Place columns when they're both repeated.

Usage

Table.ClearDown(
    Table.FromRecords({
        [Region = "West", Place = 1, Name = "Bob"],
        [Region = "West", Place = 1, Name = "John"],
        [Region = "West", Place = 2, Name = "Brad"],
        [Region = "East", Place = 3, Name = "Mark"],
        [Region = "East", Place = 3, Name = "Tom"]
    }),
    {"Region", "Place"}
)

Output

Table.FromRecords({
    [Region = "West", Place = 1, Name = "Bob"],
    [Region = null, Place = null, Name = "John"],
    [Region = "West", Place = 2, Name = "Brad"],
    [Region = "East", Place = 3, Name = "Mark"],
    [Region = null, Place = null, Name = "Tom"]
})