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.
Hello,
In my model I have 3 tables, all identical ,I'm trying to UNION to grab one column from each table to create a master list, then a column to display1 or 0 based on which table is the source table, so I can use that in slicers
Table 1:
ServerName
Server 1
Server 2
Table 2: ServerName
ServerName
Server 1
Server 3
Server 4
Table 3: ServerName
ServerName
Server 5
Server 6
New Table (Master Server List) :
ServerName, Table 1, Table 2, Table 3, Source Table
Server 1, 1,1,0, Table 1&Table 2
Server 2, 1,0,0, Table 1
Server 3, 0,1,0, Table 2
Server 4, 0,1,0, Table 2
Server 5, 0,0,1,Table 3
Server 6, 0,0,1,Table 3
Try
Master table =
UNION (
GENERATE (
DISTINCT ( 'Table1'[Server name] ),
ROW ( "Table 1", 1, "Table 2", 0, "Table 3", 0, "Source Table", "Table 1" )
),
GENERATE (
DISTINCT ( 'Table2'[Server name] ),
ROW ( "Table 1", 0, "Table 2", 1, "Table 3", 0, "Source Table", "Table 2" )
),
GENERATE (
DISTINCT ( 'Table3'[Server name] ),
ROW ( "Table 1", 0, "Table 2", 0, "Table 3", 1, "Source Table", "Table 3" )
)
)
Thank you, that worked if the server is only in 1 Table, however the server can be in multiple tables, Ex: Server12 can be in Table1 & Table2 for example
Ah, OK. Try
Master table =
VAR SummaryTable =
UNION (
GENERATE (
DISTINCT ( 'Table1'[Server name] ),
ROW ( "Table 1", 1, "Table 2", 0, "Table 3", 0, "Source Table", "Table 1" )
),
GENERATE (
DISTINCT ( 'Table2'[Server name] ),
ROW ( "Table 1", 0, "Table 2", 1, "Table 3", 0, "Source Table", "Table 2" )
),
GENERATE (
DISTINCT ( 'Table3'[Server name] ),
ROW ( "Table 1", 0, "Table 2", 0, "Table 3", 1, "Source Table", "Table 3" )
)
)
VAR Result =
ADDCOLUMNS (
SUMMARIZE ( SummaryTable, [Server name] ),
"Table 1", CALCULATE ( SUMX ( SummaryTable, [Table 1] ) ),
"Table 2", CALCULATE ( SUMX ( SummaryTable, [Table 2] ) ),
"Table 3", CALCULATE ( SUMX ( SummaryTable, [Table 3] ) ),
"Source Table", CALCULATE ( CONCATENATEX ( SummaryTable, [Source table], " & " ) )
)
RETURN
Result
Thank you! it took forever to run and looks like it's looping to forever, the results are totally wrong though
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.