Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Filtering nested groups - Power Query M

Hi All,

I am having trouble filtering the column [Source] within my nested group table "Grouped".

My condition should check whether the value "SAT" exists in the column, if true it will remove rows with values "VBRP", else column will remain as is.

 

Code is as follows:

= Table.AddColumn(#"Grouped Rows", "FilteredTable", each Table.SelectRows([Grouped], each
if Text.Contains([Source],"SAT") then [Source] <> "VBRP"
else true
))

 

Thanks!

  • pls try this

    if List.Contains([Grouped][Source],"SAT") then Table.SelectRows([Grouped],each [Source] <> "VBRP") else [Grouped]

2 Replies

  • pls try this

    if List.Contains([Grouped][Source],"SAT") then Table.SelectRows([Grouped],each [Source] <> "VBRP") else [Grouped]

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you so much!