Forum Discussion

sashakali's avatar
sashakali
Frequent Visitor
1 year ago
Solved

SELECTCOLUMNS throwing "not a valid table expression" when inside IF statement

Hello all, I am trying to create a table but I'm running into an issue where the SELECTCOLUMNS does not return a "valid table expression" when it comes from an IF statement. If it is outside the I...
  • HotChilli's avatar
    1 year ago

    This looks a bit overcomplex but the error is returned because IF can only return a scalar value (so not a table)