Simple example as usual
Two range tables changes to Structured Tables
Basic rule: unique Primary Key for both tables
- Click on the first table
- On the ribbon go to DATA - From Table
- in new window select Close&Load to...
- then select Only Create Connection
do the same for the second table
- From Workbook Queries first query (right click) Edit
- From Query Editor - Home - Merge Queries - select Merge Queries as New...
- You've first table loaded then select from empty field - second query
- then click on Primary Key column (PK) on the first selected query and Primary Key column on the second query
- at the bottom in Join Kind select Left Outer (bla bla bla)
- press OK (If OK button is inactive refresh second query then OK)
- In Query Editor you'll see new table called Merge1 (you can change this name to more friendly if you wish. I changed it to : Common)
- In this new table last column (or more) has header: NewColumn
- click on double arrow and from menu choose appropriate field from the second query
- go to Home - Close&Load to... - Only Create Connection
- Close Workbook Queries
- Now create Pivot Table(s) (Insert - Pivot Table)
- from pop-up select: Use an external data source
- click on Choose connection
- select Query - Common (remeber I changed Merge1 to Common)
- Untick Add this data to the Data Model if you wish
- select New worksheet or choose place in existing sheet
- OK
- Click on the first Pivot Table and from the tab PivotTable Tools, Filter, select Insert Slicer (what kind of slicer it's up to you)
- then right click on slicer and select Repoert Connections...
- and select these PTs which you want to manage by this slicer
on the end click Add Rep if you like it (bottom left corner)![]()
Bookmarks