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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I need to concatenate values from a related table but cannot figure out how to get it done. I have used a measure with CONCATENATEX when I need to concatenate value from a single table, but it doesn't work here.
My scenario is as follows:
I have a Main table (that contains several more fields than what is shown here) and a Clients table that "harmonises" client names. The two tables are linked by the Client field. Some records apply to multiple clients and I need a summary table visual that will concatenate the various client names on a single row for each ID.
Any help woul be appreciated 🙂
Solved! Go to Solution.
You can write a measure like this
Measure =
CALCULATE (
CONCATENATEX (
RELATEDTABLE ( client ),
client[Final],
",",
MAX ( main[Client] ), ASC
),
CROSSFILTER ( main[Client], client[Client], BOTH )
)
@huguestremblay okay try this
Measure =
CALCULATE (
CONCATENATEX (
SUMMARIZE(RELATEDTABLE ( client ),client[Client],client[Final]),
client[Final],
",",
MAX ( main[Client] ), ASC
),
CROSSFILTER ( main[Client], client[Client], BOTH )
)
new pbix is attached
Hello @smpa01 , for some of my records, I am getting duplicate values in the result (e.g. Client A, Client A, Client B). Is there a way to eliminate the duplkicates to only get each unique value listed once?
Thanks!
@huguestremblay okay try this
Measure =
CALCULATE (
CONCATENATEX (
SUMMARIZE(RELATEDTABLE ( client ),client[Client],client[Final]),
client[Final],
",",
MAX ( main[Client] ), ASC
),
CROSSFILTER ( main[Client], client[Client], BOTH )
)
new pbix is attached
You can write a measure like this
Measure =
CALCULATE (
CONCATENATEX (
RELATEDTABLE ( client ),
client[Final],
",",
MAX ( main[Client] ), ASC
),
CROSSFILTER ( main[Client], client[Client], BOTH )
)
Thanks again, this works perfectly.
Awesome, thanks a lot!
User | Count |
---|---|
91 | |
71 | |
68 | |
53 | |
27 |