Table unions

For some reason, software like Tableau and Power BI makes doing joins very obvious but unions (adding rows from one table to another/ stacking two or more tables on top of each other) less so.

Tableau at least has the button show up immediately when you connect to a data source.

Tableau’s button for unions

Tableau’s button for unions

But if you want to do a union across multiple sources (say two Excel workbooks), you can’t do it in Tableau without tricking it into thinking you’re doing a join (Full Outer Join specifically).

You can do this in Microsoft Power BI if you click the “transform data” button.

Power BI “Transform data” button

Power BI “Transform data” button

Then, you can do an append query.

Append Queries in Power BI

Append Queries in Power BI

And then you can get your data back into Excel by copying the table. But if you have more than 1,000 rows in your final table, it isn’t easy. The “Copy Entire Table” button only grabs the first 1,000 rows.

Power Bi Copy table

Power Bi Copy table

To get more rows, you have to make a “visualization,” and to get more than 30,000 rows, it looks like there are more tricks involved.

And this is why I just use Python/Pandas or put my data into SQL server…. Thanks for the reminder Tableau and Power BI! Thanks for the reminder.

Previous
Previous

Continued: ITS: multiple interventions and control

Next
Next

Imaginary roots of a parabola