Forum Discussion

smpa01's avatar
smpa01
Community Champion
6 months ago
Solved

DAX UDF – Can a Function Accept Multiple Column References?

jeffrey_wang AlexisOlson   I defined a simple function like this, which works perfectly when passing a single column reference: DEFINE FUNCTION get_table = (col:anyref) => ALLSELECTED(col) g...
  • jeffrey_wang's avatar
    6 months ago

    This is a known limitation. There is ongoing discussion about potential solutions, but nothing has been finalized yet. If the input columns are known in advance, you can pass their names into the function as a small table and then use the SWITCH function to map the strings back to column references.