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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have two tables as depicted in the visuals here. As you can see table 2 has a mix of blanks and additional entries. I need table A exactly as is but with the blanks removed and additional entries from table 2 for the same id separated by commas as shown.
Preferably via DAX.
TIA
Needed table
| 1 | IA,XU |
| 2 | PG,GTM |
| 3 | XU |
| 4 | XU |
| 5 | GTM,IA |
Table 1
| 1 | IA |
| 2 | PG |
| 3 | XU |
| 4 | XU |
| 5 | GTM |
Table 2
| XU | |
| PG | |
| 1 | IA |
| 1 | XU |
| 2 | PG |
| 2 | GTM |
| 3 | XU |
| 4 | XU |
| 5 | GTM |
| 5 | IA |
@aldoha Hi try it 2 calculate table
CombinedTable =
FILTER (
UNION (
SELECTCOLUMNS ( 'Table 1', "ID", 'Table 1'[Col1], "Value", 'Table 1'[Col2] ),
SELECTCOLUMNS ( 'Table 2', "ID", 'Table 2'[Col1], "Value", 'Table 2'[Col2] )
),
NOT ISBLANK ( [ID] )
)and
NeededTable =
SUMMARIZE (
CombinedTable,
CombinedTable[ID],
"CombinedValues", CONCATENATEX (
VALUES ( CombinedTable[Value] ),
CombinedTable[Value],
","
)
)
Thanks for the reply. For the 1st one i get an error. The expression refers to muliple columns. Multiple columns cannot be converted to a scalar value
@aldoha Hi, Show your DAX code
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 137 | |
| 102 | |
| 68 | |
| 66 | |
| 64 |