Introduction
Tableau is an interactive data visualization tool that can be used to create customized dashboards and generate compelling business insights. It can help anyone see and understand their data. It empowers the users with features like the ability to connect to almost any database, drag and drop to create visualizations, and share with a click.
Today, let us learn how we can integrate Tableau with SharePoint as a data source. We will also see how Tableau reports can be embedded in a SharePoint page.
Create SharePoint List
Let's create a custom list with the below column names as text type.
You may populate some sample valid data.
Setting up Tableau
Let's connect the SharePoint list using OData with Tableau.
This is how you will form the URL.
<yoursiteurl>/_vti_bin/ListData.svc/<List Name>
Please choose authentication accordingly. It gives two options - no authentication or embed user id and password.
Once done, the SharePoint list will be loaded as a data source. This data source can be used to generate various insights on data.
Tableau generates a request using OData protocol which is then processed by SharePoint.
SharePoint generates the output in the form of JSON or ATOM, which is then parsed by Tableau.
Creating Tableau Reports
In this example, we will use the data to generate dynamic and interactive maps.
Drag Country, State, and City under Marks and Tableau will generate the latitude and longitude accordingly.
Fields can also be dragged to Filters to enable filtering. Go to Server on the top menu and publish your workbook on Tableau server.
Permissions
Tableau provides View, Interact/Edit, and Edit Permissions. More granularity can be achieved within these permission levels.
Add permissions accordingly to the View. This will enable authentication once you log into your organization's Sharepoint.
Obtaining a link for your View
Click "Share" on the published View and copy the link from the Link section. Replace link in your code as mentioned below.
Add Tableau report to your SharePoint page
Add a script editor web part on your page and insert the below code.
Enter the URL of your View in the src of the iframe tag. I have used 80% of the space for Tableau View as mentioned in the code below.
- <html>
- <body>
- <iframe align="left" src="<your view url>"id="tableauIframe"></iframe>
- <script type="text/javaScript">
- var iframe = document.getElementById('tableauIframe');
-
-
- var height = window.innerHeight;
- var width = window.innerWidth;
- iframe.height = height*0.80;
- iframe.width = width*0.80;
-
- </script>
- </body>
- </html>
Rendering Tableau in SharePoint
You can create filters and sort the maps according to country cities. Moreover, you can achieve other BI requirements and embed in SharePoint.
Summary
Well, it is fun using Tableau in our application. Integration of Tableau with SharePoint can be achieved seamlessly using the above approach.