Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
So, i want to make a DAX UDF that takes a (one-column) table as input and outputs a concatenation of all distinct values.
Something like:
DEFINE FUNCTION
ConcValues = (column: Table) => CONCATENATEX( DISTINCT(column), ???columnName???, ", ")
Since i can pass any table, the column name is variable and cannot be hard-coded in the UDF.
Any ideas how to implement this? How to make a reference to a column name? Or how to reference the column of a table by a number, i.e. the 2nd column of the table or the first column, etc)
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file, and please try something like below.
@Jihwan_Kim that works! I could have sworn that i had tried anyref but i must have messed somewhere else - my actual measure is a bit more complex that the simplified version i posted here. Anyway, problem solved, thanks mate!
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file, and please try something like below.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
11 | |
9 | |
8 | |
8 |