How to query your Xero Payroll NZ data from Power BI

For many, the built-in Xero Payroll NZ reports on offer are enough for our day-to-day needs. However, if you need something a little more customized, then you’re going to have to have to build it yourself. And what better way than using the tool you’re already familiar with - Power BI

Ben Liebert Developer & Data Specialist LinkedIn

Xero Payroll NZ is a sophisticated and comprehensive cloud-based platform. For many, the built-in reports and analysis that Xero Payroll NZ offers is enough for our day-to-day needs. However, if you need something a little more customized, you need to aggregate your data over multiple Xero Payroll NZ accounts, or you need to cross-reference your Xero Payroll NZ data with other cloud services, then you’re going to have to build it yourself. And what better way than using the tool you’re already familiar with - Power BI.

In this article, I’ll take you through the steps to connect Power BI to your Xero Payroll NZ data, and get started customizing the reports you need.

First - grab your SyncHub Credentials

If you don’t already have a SyncHub account, you can grab a free trial here - go on, I’ll wait - it only takes a minute and you can cancel as soon as you’ve finished this tutorial if you like.

Ready? Now, a quick reminder - SyncHub works by staging your Xero Payroll NZ data in a relational database. This gives us a huge advantage over other connectors which query the Xero Payroll NZ API directly, but I won’t go in to them here. The point is, once you have connected your Xero Payroll NZ account, querying from Power BI is trivial as you are just using its native SQL Server Connector.

So, once you’re connected, go to your SyncHub Dashboard and grab your new database credentials - you'll need them below.

Reading your Xero Payroll NZ data from Power BI

We now just need to tell Power BI where to find your data. Either select Import data from SQL Server or a new SQL Server connection from the Data ribbon:

Power BI ribbon

When prompted, enter the Server and Database that SyncHub provided in the first step above:

Power BI server

Next - and this is the part that trips most people up - switch to the Database credentials tab (highlighted by the arrow below), then enter the username and password provided to you by SyncHub in the step above:

Power BI credentials

Troubleshooting

This is the point where you are most likely to run into issues - your login won’t be accepted. After triple-checking that you have used the correct server/database/username/password, the most common resolutions we see are:

  1. try opening Power BI in Administrator mode
  2. if you are in an office, perhaps you have some firewall restrictions?

All going well, you’ll now be presented with the tables from Xero Payroll NZ, and you know what to do from here:

Table list

Keeping your data up-to-date

SyncHub updates it’s staged data from Xero Payroll NZ in near-realtime, so it’s always available. However, depending on your Power BI settings you may still observe a delay with your reports. But not to worry - the solution isn’t too onerous. Every time you want to refresh your data, simply click the (appropriately named) Refresh button in your Ribbon:

Refresh

Beyond Xero Payroll NZ

Xero Payroll NZ-specific reports are essential, but the true power of SyncHub comes when you augment your Xero Payroll NZ data with additional information:

So what are you waiting for? Grab a free trial of SyncHub here and see what you can do. In ten minutes from now, you could be reporting against your Xero Payroll NZ data and taking your first steps towards a data-driven business.