Contact us

Send
inqury

Knowledge base

home banner

bi@unija.com

  • Knowledge

  • Categories

July 31, 2020

Appending Queries

Author: Branka Trifunović

For Power BI version 2.76.5678.782 (December 2019).

Every Power BI project starts with many queries. Whenever possible, we append queries. We always work toward a star schema, meaning one large fact table and several smaller dimension tables. More on star schema can be found in article 5 best practices on data modeling.

Appending tables with the same columns

We usually append tables with same columns. Column order is not important, we only need to make sure names and data types match in both tables. Values from the second table will then be filled to the appropriate columns in the first table.

Let’s look at example of two tables, named Locations1 and Locations2.

   

Appending Locations2 to Locations1 gives a merged table.

To append the tables use the following steps.

  1. Select the primary table, in our case Locations1.
  2. Select Append Queries.
  3. Select the second table, in our case Locations2.
  4. Confirm with OK.

Appending tables with different columns

If column names in both tables don’t match, appending results in a bigger table with as many columns as unique names in starting tables. We’ll use the same tables as in previous example. We rename the column in second table to Name2.

After appending we get a table with all columns. Missing values are filled with null value.

Duplicates

Appending doesn’t remove duplicates, for this purpose we use Remove Duplicates.

Index