This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I defined a simple function like this, which works perfectly when passing a single column reference:
DEFINE FUNCTION get_table = (col:anyref) =>
ALLSELECTED(col)
get_table(DimProduct[Category])
However, I would like to reuse the same function and pass multiple columns, like this:
get_table(DimProduct[Category], DimProduct[Subcategory])
Currently, this does not work.
From what I understand:
UDFs do not support variadic parameters
There is no array/list-of-columns type in DAX
Overloading is not supported
At the moment, the only workaround seems to be defining separate functions for each number of column parameters (e.g., 2-column version, 3-column version, etc.).
Is there currently any supported way for a DAX UDF to accept multiple column references dynamically?
If not, is this a known limitation and potentially on the roadmap?
Thank you.
Solved! Go to Solution.
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.
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.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 61 | |
| 35 | |
| 33 | |
| 23 | |
| 23 |