This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi to all, can someone help me if possible to Merge multiple Summarize table into one table
Output
| Job | Task |
| rwer | ttytyt |
| werwer | tytytytyytyty |
| ertr | ghfghf |
| ertet | jghjgjgyt |
| 564eyryt | ydrdryjtyjdtj |
| rtry | jtr6urjdj |
| fdhry5sysrt | dghdfgh6urt |
| 65745ytjt | ueruytueu |
| ghjdtjj | hr754ysrtdun |
| 2w4w4 | nyw45 754ue |
Solved! Go to Solution.
Quick note on terminology first: in Power Query "Merge" means a join (it adds columns), whereas what you want here is to stack the rows from several tables into one - that's "Append" (Power Query) or UNION (DAX).
- If these summaries are Power Query queries: Home > Append Queries > Append Queries as New, then pick the tables. They share the same Job/Task columns, so you get one stacked table.
- If they are DAX calculated tables (created with SUMMARIZE): Combined = UNION(Summary1, Summary2, Summary3). UNION matches columns by position (so keep the same column order), takes the column names from the first table, and keeps duplicate rows - wrap it in DISTINCT() if you want to remove duplicates.
- If all three summaries come from the same base table, the cleanest option is to skip the intermediate tables and do a single SUMMARIZE/GROUPBY over the base table (or just drop Job and Task into one visual).
Hope that helps!
If these are separate SUMMARIZE results stored as variables or separate tables, you can combine them using UNION. Please try the logic below:
Combined Table =
VAR _Table1 =
SUMMARIZE ( Source1, Source1[Job], Source1[Task] )
VAR _Table2 =
SUMMARIZE ( Source2, Source2[Job], Source2[Task] )
VAR _Table3 =
SUMMARIZE ( Source3, Source3[Job], Source3[Task] )
RETURN
UNION ( _Table1, _Table2, _Table3 )
If you need this as a physical table (not a measure), use it inside a Calculated Table definition. If you are working in Power Query instead of DAX, use Table.Combine:
= Table.Combine({Table1, Table2, Table3})
Hi @AllanBerces,
If you have the table with the same number of columns you can use the union to merge them all (as same your expected O/P)
Merged Table =
UNION (
SELECTCOLUMNS ( Table1, "Job", Table1[Job], "Task", Table1[Task] ),
SELECTCOLUMNS ( Table2, "Job", Table2[Job], "Task", Table2[Task] ),
SELECTCOLUMNS ( Table3, "Job", Table3[Job], "Task", Table3[Task] )
)
If you want to do the same in the power query editor you can use query something like, Assuming tables are already created.
let
Combined =
Table.Combine({Table1, Table2, Table3})
in
Combined
Hope this is the asnwer to your question. Please consdier this as an accepted solution or give some kudos.
Hi @AllanBerces,
If you have the table with the same number of columns you can use the union to merge them all (as same your expected O/P)
Merged Table =
UNION (
SELECTCOLUMNS ( Table1, "Job", Table1[Job], "Task", Table1[Task] ),
SELECTCOLUMNS ( Table2, "Job", Table2[Job], "Task", Table2[Task] ),
SELECTCOLUMNS ( Table3, "Job", Table3[Job], "Task", Table3[Task] )
)
If you want to do the same in the power query editor you can use query something like, Assuming tables are already created.
let
Combined =
Table.Combine({Table1, Table2, Table3})
in
Combined
Hope this is the asnwer to your question. Please consdier this as an accepted solution or give some kudos.
Hi @Lodha_Jaydeep @cengizhanarslan @freginier thank you very much for the reply working all good.
If these are separate SUMMARIZE results stored as variables or separate tables, you can combine them using UNION. Please try the logic below:
Combined Table =
VAR _Table1 =
SUMMARIZE ( Source1, Source1[Job], Source1[Task] )
VAR _Table2 =
SUMMARIZE ( Source2, Source2[Job], Source2[Task] )
VAR _Table3 =
SUMMARIZE ( Source3, Source3[Job], Source3[Task] )
RETURN
UNION ( _Table1, _Table2, _Table3 )
If you need this as a physical table (not a measure), use it inside a Calculated Table definition. If you are working in Power Query instead of DAX, use Table.Combine:
= Table.Combine({Table1, Table2, Table3})
Quick note on terminology first: in Power Query "Merge" means a join (it adds columns), whereas what you want here is to stack the rows from several tables into one - that's "Append" (Power Query) or UNION (DAX).
- If these summaries are Power Query queries: Home > Append Queries > Append Queries as New, then pick the tables. They share the same Job/Task columns, so you get one stacked table.
- If they are DAX calculated tables (created with SUMMARIZE): Combined = UNION(Summary1, Summary2, Summary3). UNION matches columns by position (so keep the same column order), takes the column names from the first table, and keeps duplicate rows - wrap it in DISTINCT() if you want to remove duplicates.
- If all three summaries come from the same base table, the cleanest option is to skip the intermediate tables and do a single SUMMARIZE/GROUPBY over the base table (or just drop Job and Task into one visual).
Hope that helps!
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 32 | |
| 26 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 65 | |
| 43 | |
| 28 | |
| 24 | |
| 22 |