Understanding and visualizing building data is essential to any data-driven workflow and being Speckle a data platform, it follows quite naturally that you might want to analyze streams and commits coming from it. And thats what we are going to do in this tutorial. I am going to show you how you can visualize Revit Room data in Power BI using Speckle connectors.
Let’s get started!šāāļø
Prefer watching than reading? Here’s a video too!
Tutorial Files
You can access the Revit project document used in the tutorial š:
The stream used in this tutorial is right hereš!
Prerequisites
To follow this tutorial you’ll need the following:
- Revit 2018 - 2022 (I’ll be using 2022)
- Microsoft Power BI (Iāll be using the free version)
- a Speckle account (you can get one for freeš atĀ https://speckle.xyz/)
- the Speckle Connector for Revit (install it viaĀ Manager)
- the Speckle Connector for Power BI (install in from its repo)
Since we are working with Revit and Power BI, basic knowledge of both tools will be essential.
Installing Connectors
Installing connectors is the first step of data communication. They take care of sending and receiving data in the host software to and from Speckle server.
Installing Revit Connector
Installing the Revit connector is as simple as finding it in the list of available connectors in Speckle Manager and clicking āInstallā.
Installing Power BI Connector
Installing Power BI Connector is not as straightforward as other connector since itās in Alpha. To install Power BI Speckle Connector:
-
Go to Speckle Power BI Repo
-
Go to the releases page and download the .mez file of the latest release.
-
Copy the downloaded file into the following folder:
YOUR_USER_FOLDER\Documents\Power BI Desktop\Custom Connectors\
If the folder does not exist, create one and name itCustom Connectors
. -
After you copy the file, open Power BI.
-
Go to
Settings -> Security -> Data Extensions
Ā and activate the(Not Recommended) Allow any extension to load without validation or warning
option. -
Now, restart Power BI and you should see
Speckle (beta)
appear in the data source.
Creating a Stream and Sending Data from Revit
Let’s open the document and create a new stream. It just takes three steps:
- Go to Add-Ins and open Revit connector.
- Click the blue button on the bottom right corner.
- Use text box to name your stream and click the “+” button to create a new stream.
There are couple ways to send data from Revit. We are going to send by category and select the Rooms.
- Click on the blue button in the middle of the card.
- Select the āSet/Edit Objects Filterā.
- Type in the category name and select it.
- Click on āSet Filterā option
- And finally double click on Send to send data straight away.
Voila! You have send your Revit rooms. When sending data from Revit, Speckle takes care of converting the data to a Speckle friendly format. Letās view it in Speckleverse!
Receiving in Power BI
Letās receive room data in Power BI.
- Click on Get Data and search for Speckle.
- Search for Speckle and select
Speckle - Get stream by URL(Beta)
- Click
Connect
. - Copy the
Stream URL
, paste it in the new screen and click OK.
Congrats, now you should see a screen that shows Speckle Objects as Records.
Transforming Data in Power BI
In order to create dashboards using the data received, it needs to be transformed into more readable format. Letās do that!
-
Click on Transform data to access Power Query Editor
-
Received data includes blank rows at the moment. So we have to remove that first. From
Remove Rows
, selectRemove Blank Rows
. -
We are not going to edit this table directly. So we are going to create a reference to that.
Right click
on table, selectReference
. Lets rename this table as āFiltered Roomsā because we are going to filter only rooms from the received data. -
Received data includes mesh geometry as well. So we have to filter the room objects. Lets add a custom column and get Speckle Types of objects using Record functions. Then filter only room objects.
-
Lets create a reference to Filtered Rooms table this time and rename it as Room Data.
-
To access parameters attribute of the records, simply click on the expand icon and select the attribute you want to expand. After you have the parameters record, expand it one more time to access the specific parameter records you want to access.
-
Now lets access the values of those parameters. Follow the steps mentioned above but select value attribute to get their values. Do this for all parameter columns.
-
Finally rename all columns into their parameter names such as āRoom Areaā, āRoom Nameā etc.
-
Now we are done tranforming lets close the Query Editor and apply any pending changes.
Congratsš, you have imported your very first Speckle data into Power BI. You should be proud of yourself. Now you can create beautiful dashboards such as the one belowš.
Watch the video above if you donāt know how to create Cards, Donut Charts and Slicers. If you are more of a reader, then read the **Visualization documentation here**š
Conclusion
We hope you enjoyed this tutorial and found it useful!
Speckle is an Open Source projectĀ and we really ā¤ļø feedback, so if you have any questions, comments, critiques, or praises please let us know on ourĀ community forum.