Forum Discussion
smpa01
Community Champion
6 months agoDAX 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
Power BI Team
6 months agoThis 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.