, ,

Phone Call Business Intelligence with Power BI and FoneBox

Microsoft Power BI lets you build dashboards and interactive reports from your existing data. It can connect to pretty much any data source and also comes with a bunch of built in connectors to services like Google Analytics, Facebook, Quickbooks Online etc.

We’ve been working on a range of Power BI connectors for our accommodation provider clients, providing them with updating business intelligence dashboards to monitor their Xero Accounting, NewBook booking data, Office 365 activity, MailChimp, Facebook, and now their phone calls.

Since phone numbers are unique, this data can be matched against existing customer data in Power BI, so our clients can find out which customers are calling, how often, and for how long.

This is a sample dashboard I put together this morning using the phone data we’re importing for a Queensland tourist park. The data comes from FoneDynamics, an online call tracking and analytics service based in Australia. Power BI Dashboard Phone Calls

Clicking on dashboard elements opens the interactive Power BI reports. From here, you can drill down into the data and see how the elements relate to one another. In this example, we’ve selected ‘No’ under the Repeat callers chart. This gives us some pretty detailed information about the first time callers into the tourist park. This could include how long they spent on the phone, how many first time callers went unanswered, how long it took to answer these calls etc.Phone Call Business Intelligence Dashboard

Since we’re using Power BI, we can open and interact with these reports on any device. Here’s the same dashboard running on an iPhone, where you can open the charts and set alerts on important data. For example, get notified when the missed calls for the month exceeds a certain number.FoneBox Power BI Dashboard

The tech stuff

For this solution, we had to pull the data from a collection of CSV files stored on an FTP site. Power BI will connect to CSV files out of the box, though not via FTP and it won’t join multiple CSVs into a single dataset.CSVs For Import Into Power BI

I wrote a console app last night to connect to the FTP site, pick up each CSV, collect the phone records from it and upload them into an Azure Storage Table.Extract Phone Data for Business Intelligence On PowerBI

Here’s the data in an Azure Storage Table.

Power BI Phone Data On Azure Storage

Once the data for the previous day’s phone records is uploaded into Azure Table Storage, I set up an Azure Web Job to run the process once a day.Azure Web Jobs To Power BI

Now that we have a regular, up to date source of phone data, we can connect to it using Power BI Desktop app. We can use this app to create our reports before publishing them to Power BI Online.Connect To Azure Table Storage Via PowerBI

If you’d like to learn more about setting up Business Intelligence dashboards for your data, send an email with what you have in mind and we might be able to make it happen.

, , ,

Connecting Xero to Power BI for detailed, up to date reporting

Last week I connected NewBook to Microsoft’s Power BI for our Accommodation provider clients. This weekend I gave Xero the same treatment, and it’s worked out better than I thought.

Some tech stuff

XerotoAzuretoPowerBI

The architecture of this solution is pretty much the same as the NewBook solution. A .net console app runs as an Azure web job on a set schedule. It pulls the up to date Xero data via the Xero API and transfers it into Azure Table Storage. Power BI connects to the table storage, transforms the data, creates the relationships between the flat tables and makes it really easy to create cool reports and dashboards.

Discover more with Power BI reporting

Once our cloud hosted application pulls your Xero data into Power BI, we can get to work building the reports. Most of these examples are built using the sample data in the Xero demo organisation. I’ve included a couple of reports from our own Xero organisation because I think they demonstrate the functionality of Power BI a bit better. I’ve edited out the names and figures, though you’ll get the idea.

 

This above report showing our custom tracking option breakdown, our total amount paid vs owing and a donut chart of our top paying customers. Clicking on a chart element updates the other chart elements. Clicking around these reports gave me some great insight on how we’re performing as an organisation.

 

This map uses the data from your Xero contact’s street and postal info to give you an idea of how your customers are distributed.  Our demo data only contained two address records, though map data updates when other elements are selected also. For example, you can even find out whether customer location has anything to do with the sorts of products they purchase from you.

Create the perfect dashboard(s)

Once the reports are created, they can be pinned to a custom dashboard in Power BI. Dashboards can give you a quick overview on how everything’s running. You can create multiple dashboards, and view them on your phone, tablet, or computer. We have a dashboard on a TV in our office displaying our daily performance data from a few sources.

 

Ask the right questions

This is probably the coolest thing about Power BI – the ability to ask questions of your data. You don’t need to be a data scientist to put together these dashboards, just open up Power BI and tell it what you want. The Q&A feature builds charts, graphs and returns numbers instantly. Once you’re happy with the response, you can pin it to your dashboard.

 

Check in from anywhere

The current Xero mobile apps don’t give you access to the same reports that you get on the full website. Now with the Power BI mobile apps, we can create and access our own custom Xero reporting and dashboards from any device.

 

Tap the mobile graphs to drill down into the data. Set alerts on important data to be notified when targets are exceeded or not met.

 

Export and share with anyone

Dashboards can be shared with other Power BI users via the web, tablet or mobile apps. You can also export, annotate and share individual chart elements if you don’t want to give someone access to your entire dashboard or dataset.

If you want to know more about getting this set up for your organisation, get in touch. We’re going to be offering this as a per user, per month pricing bundled with Power BI. This bundle will include set up, training and customisation of your first Xero to Power BI dashboard.

, ,

Unlock insight with NewBook and Power BI

Powerful, easy up to date reporting on all devices with Power BI

We support a large number of tourist park operators and accommodation providers running NewBook, a cloud based reservation system. We got in touch with the developers last week and asked if we could get API access to a test tenant to see if we could connect NewBook to Power BI. We wanted to create some cool Business Intelligence dashboards with up to date reporting for our customers.

NewBook’s developers responded the same day with the details, and I spent the weekend putting it together. I had a lot of fun getting this working, and I think the end result is so powerful we’ll be offering it as a standalone service.

The architecture of the solution is pretty straightforward, though it took me a few iterations to settle on this one.

New Book Power BI SolutionOutline

The solution works via a .Net console app running on Microsoft Azure. The app pulls up to date booking and revenue information from NewBook and sends it on to Azure Table Storage. Power BI connects to the table storage as a data source. We used Power BI desktop to create some interesting graphs and charts, and published the results to a Power BI dashboard where it can be viewed on all devices.

What does it look like?

Here’s some sample charts that I put together yesterday, though you don’t have to be restricted to the below examples. One of the coolest things about Power BI is its powerful natural language Q&A feature, you can ask it pretty much anything and it’ll build the chart instantly – I’ll add an example of that below.

See a snapshot of your current guests:

Dive into the data to gain more insight. Dashboards link with the reports we published from Power BI Desktop. Clicking on a charts segment will update other charts. Now we can see that 8 of our 36 bookings are here on business, most of them booked direct, and are staying in a permanent cabin or van.

We can also view historical financial and booking data. This can help you get an understanding of your business’ performance over time.

Even better on mobile

Power BI apps are available for mobile devices too, where the charts become even more interactive. Tapping the charts and rotating them by touch unlocks more information.

 

Here’s the natural language Q&A feature. You can ask it questions about your business and it’ll generate a chart that you can pin to your dashboards.

 

Dashboards can be created, annotated and shared amongst your team. You can display them on TV’s, interact with them on phones and tablets or just use them via your PC or laptop.

Interested in Power BI and NewBook?

If you’re interested in Power BI, or if you’d like to get your NewBook reporting set up like this, get in touch with us.

Interested in using Newbook to manage your resort or tourist park property? Find out more here.

, , , ,

Sending our Temperature data to the cloud for Power BI

In the previous post I outlined connecting our temperature/humidity sensor to a Raspberry Pi and taking a reading from it. The next step is to send that data to the cloud and make use of it in Power BI.

Here’s a basic outline of the process

Connecting the sensor to the Cloud

Of course, Power BI isn’t the only thing you could use this data for, though our goal is to add this temperature reading to the Power BI dashboard in our office.

The first thing I needed to find was somebody who had done this before. A few days ago I found this post by Rakesh George that outlines his process: http://www.identitymine.com/blog/2015/06/19/iot-with-raspberry-pi-azure-and-windows-devices/

His temperature sensor setup is a lot more complicated than mine – it looks like he’s taking the binary values from the sensor and working out the temperature value. In our case, we had a great library from Adafruit that did all of that for us.

Compared to other IoT projects, this one is extremely simple. We’re not making use of Event Hubs or Stream Analytics or any of the high scale, high performance tools in Azure. We’re just sending a temperature and humidity value to Azure Table Storage once a minute, then connecting to that data via Power BI Desktop.

I downloaded Rakesh’s source files to see how it can apply to my setup.

Firstly, you’ll need to install the Azure SDK on the Raspberry Pi to make use of the Azure services, check the linuxruninstructions.txt in Rakesh’s Python source file download for instructions on this.

Most of the code relevant to Azure is located in the azuremodule.py file. I learnt a lot about the Azure Python SDK by reading and modifying this script file.

If you’re setting this up yourself, you’ll need to sign up for Microsoft Azure (free trials are available), create a storage account, and add the storage account name and primary key into the sample code.

After a little bit of tweaking, I was able to get it to work using the Adafruit library to retrieve the values from my sensor and upload it to my Azure Table Storage account every 60 seconds.

Once you’re collecting data, you can use the Power BI Desktop App to pull this data into your dashboards for reporting. As I’m testing it, I created a new dashboard for these temperature/humidity values.

Power BI Desktop can be downloaded from here: https://powerbi.microsoft.com/desktop

A basic version of Power BI is available free, though you can sign up for a 60 day trial of Power BI Pro, which has many of the same features, though it refreshes your dashboards hourly instead of daily.

Importing and preparing the data for Power BI

Click Get Data, choose Azure, Microsoft Azure Table Storage.

Get Data in Power BI

Enter the storage account name, click OK, then enter the primary key.

Connect to Azure Table Storage

Select the table to import.

Connect to data in Power BI

Import the data, and use the query editor to set the data types and separate the columns for humidity and temperature values.

Modify Data in Power BI

Create your Power BI graphs and publish them to Power BI.

Building Graphs in Power BI

Once published, you can access them via the browser or the Power BI apps on mobile devices.

View graphs on Power BI Mobile Devices
, ,

Connect a DHT11 Temperature/Humidity sensor to a Raspberry Pi

At GCITS we’re getting familiar with the Internet of Things (IoT). To start with, we’re connecting sensors to the cloud to make use of the real time data.

As a quick test, we want to connect a temperature sensor in our office to our dashboard in Power BI. The first step is to get a reading from the temperature sensor via the Raspberry Pi.

I had a bit of trouble getting this working using the some of the suggested wiring diagrams (it may just be an issue with my breadboard) so I’m posting this here in case it helps someone else.

You will need:

  • Raspberry Pi running Raspbian
  • A Breadboard
  • Assorted wires
  • 10k ohm resistor
  • DHT11 Temperature/Humidity Sensor

Wire it all up

First step is to wire up your Raspberry Pi to the DHT11 temperature sensor.

Here’s a drawing of my wiring, as well as two photos that should make it clear.

DHT11 Wiring Diagram
Raspberry Pi Wiring
DHT11 Wiring On Breadboard

 

Set up your Raspberry Pi

Once you’re all set, you’ll need to install a library to easily pull data from the sensor. I’m getting started with Python, so I’m using the Python library provided by Adafruit. I found some great instructions in this PDF: https://learn.adafruit.com/downloads/pdf/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging.pdf

I’ll summarise it here:

Open the terminal on your Raspberry Pi and run the following commands:

git clone https://github.com/adafruit/Adafruit_Python_DHT.git
cd Adafruit_Python_DHT

This will clone the Adafruit Python Library to your Pi

To make sure you have the correct dependencies to use the library, you’ll also need to run these commands:

sudo apt-get update
sudo apt-get install build-essential python-dev python-openssl

Next you’ll need to install the library we cloned earlier:

sudo python setup.py install

To confirm that you’ve successfully installed the library, test the sensor by navigating to the Examples folder and running the test python script:

cd examples
sudo ./AdafruitDHT.py 11 4

This tests pin GPIO 4 for the DHT11 sensor and returns the temperature and humidity values.
Temperature and Humidity Results
Temperature Outside

 

As you can see, the result seems to be pretty accurate.

The parameters at the end can be modified to suit your setup. If you’re using the DHT22 sensor, replace 11 with 22 , or if you’re using another GPIO pin, substitute 4 for the appropriate GPIO pin number.

For example, sudo ./AdafruitDHT.py 22 17 refers to a DHT22 on GPIO17

Stay tuned for future posts on how we’ll connect this data to the cloud and Power BI!

Our Power BI dashboard stopped working

We ran into an interesting problem the other day when our internal app.PowerBI.com dashboard just stopped automatically updating. I tried to force a manual refresh but received this rather unhelpful error message.

Power BI Error Message

Here’s how we fixed it.

After some back and forth with the PowerBI support team, we realised that the issue might have something to do with the oAuth security tokens stored in Zendesk. We were able to connect to the Zendesk data using the PowerBI desktop application which generated a new oAuth request. From there, we queried Zendesk support on how to delete the oAuth tokens manually so we could recreate them.

The support guys at Zendesk have been pretty fantastic and this time was no exception. They quickly sent through instructions for deleting the existing oAuth tokens. They linked us to a page with a curl command that would revoke the tokens stored on Zendesk. After downloading curl and running the command we were back in action and our data was live again! Here is how you can do the same thing.

If you’re using Windows, download the latest version of curl.exe from http://www.paehl.com/open_source. You’ll need the version that includes WinSSL, since that’s how we’ll connect to your Zendesk platform. Unpack the 7zip archive and open a command prompt to the extracted “curl_X64_ssl\winssl” directory.

You can query the stored tokens using this command (remember to substitute the values in the curly braces with your own):
curl.exe https://{subdomain}.zendesk.com/api/v2/oauth/tokens.json -v -u {emailaddress}:{password}

Which returned the following output:

ZenDesk OAuth Token

This gives us information about the current oAuth token, including the token ID (in red) which we could now use to revoke the token:
curl https://{subdomain}.zendesk.com/api/v2/oauth/tokens/{ID from the last command}.json -X DELETE -v -u {emailaddress}:{password}

I had to do this a couple of times to delete all tokens. Be careful running this command if you have other applications that integrate with Zendesk – if you delete the wrong token you will break them. In our case, we only connected Zendesk with PowerBI and no other application so I just deleted all tokens. Once they were gone, I deleted the Zendesk data and dashboards from PowerBI and then reconnected to the service using the “Get Data” menu. As expected, this prompted me to authenticate so PowerBI and Zendesk could create a new token.

Power BI Dashboard Ready

Everything was all good after this point and my automatic update was working again. If you’re interested in PowerBI and Office 365 or if you want to get more value out of your existing subscription then get in touch and we can build something that works for you.

 

, ,

Building a Business Intelligence dashboard with a Raspberry Pi and Power BI

This week we’re exploring the capabilities of Microsoft Power BI (an Office 365 add-on) to give us a clear picture of our daily performance.

Power BI allows you to connect multiple data sources from a wide range of on-premise and cloud services and view the live data in a clean dashboard. You can view and share dashboards from the browser, the windows app, or the mobile apps for iOS, Android or Windows Phone. In our case, we wanted the screen in our office to focus on a couple of things: the performance of our support team, and our website statistics.

We’re tracking the support team performance because it’s the core of our business, and the website performance because we’re focusing on delivering more useful content and would like to see how it’s received.

The data we need to track these metrics is stored in external silos – Zendesk and Google Analytics. Luckily, Power BI makes it easy to connect these data sources to a single dashboard.

Here’s a video of it starting up, and a photo of the finished dashboard:

Power BI Dashboard

This setup uses a Raspberry Pi connected to an Azure Virtual Machine running Power BI through the browser.

We’ll be adding new features in the next few weeks  involving additional Raspberry Pis, some connected sensors and Azure SQL. Stay tuned!