Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Table.SelectColumns error

I am using Power Query Editor's Custom Column window to attempt the following; I have Table1 and Table2. I am trying to add a custom column to Table1, that contains Table2 as the value, but only if ...
  • jbwtp's avatar
    3 years ago

    Hi Anonymous,

     

    Assuming that your example is in th econtext of Table.AddColumn() the behaviour is quite weird.

    Do you want to try to split the formula to something like:

    t2 = Table.SelectColumns(#"Table2", {"Column1", "Column2"}),
    t1 = Table.AddColumn(..., ..., each if [ValueFromThisTable] = null then null else t2)

    and see if this works Ok?

     

    Thanks,

    John