Forum Discussion

leinad's avatar
leinad
Regular Visitor
3 years ago
Solved

can't apply changes when accessing tables using the #shared environment

Hi everyone,   I am trying to access some tables via their names as text using the #shared environment. Assuming for example I have the following two queries (called table1/table2 respectively): ...
  • Greg_Deckler's avatar
    Greg_Deckler
    3 years ago

    leinad Maybe try something like this:

    let
        Source = #shared,
        #"Converted to Table" = Record.ToTable(Source),
        #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each if Type.Is(Value.Type([Value]), Table.Type) then 1 else 0),
        #"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Custom] = 1)),
        #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Value"})
    in
        #"Removed Columns"