Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

M query Filtered = #"Filtered Rows"{0}[Content]

What does the below step on the Advanced Editor do?
Filtered = #"Filtered Rows"{0}[Content]

  • Returns the first field value (Power query has 0 based index) after filtering.

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUcrPS1WK1YGwS8rzEeyMolSIjBGQl5ZfWgTmGIM4mWWpCkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}}),
        #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Column1] = 1)),
        Custom1 = #"Filtered Rows"{0}[Column2]
    in
        Custom1

1 Reply

  • smpa01's avatar
    smpa01
    Community Champion

    Returns the first field value (Power query has 0 based index) after filtering.

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUcrPS1WK1YGwS8rzEeyMolSIjBGQl5ZfWgTmGIM4mWWpCkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}}),
        #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Column1] = 1)),
        Custom1 = #"Filtered Rows"{0}[Column2]
    in
        Custom1