Forum Discussion
smpa01
6 months agoCommunity Champion
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...
- 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.
jeffrey_wang
6 months agoPower BI Team
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.