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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
hi All,
I need SQL code for below issue
I have two table as shown below
| Id | Name |
| 1 | Roy |
| 1 | Roy |
| 1 | Roy |
| 1 | Roy |
| 1 | Roy |
| Name | Type |
| Roy | GE |
| Roy | RA |
| Roy | SA |
| Roy | PA |
| Roy | PA |
These two have primary key as Name.
Desired Output
| Id | Type |
| 1 | GE,RA,SA,PA |
kindly need help
Solved! Go to Solution.
@Anonymous,
Use String_Agg if you use T-SQL: https://docs.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql?view=sql-server-ver15
@Anonymous
A dedicated forum might be more appropriate. In DAX, you may use CONCATENATEX to add a measure.
https://community.powerbi.com/t5/Desktop/split-by-delimiter/td-p/363277
@Anonymous
A dedicated forum might be more appropriate. In DAX, you may use CONCATENATEX to add a measure.
https://community.powerbi.com/t5/Desktop/split-by-delimiter/td-p/363277
@Anonymous,
Use String_Agg if you use T-SQL: https://docs.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql?view=sql-server-ver15
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 50 | |
| 42 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 139 | |
| 116 | |
| 53 | |
| 37 | |
| 31 |