Note
The Power BI Data Connector is available in closed beta beginning 14 September 2023. Please reach out to your Samsara representative if you are interested in participating and getting the feature enabled.
Connect Samsara data into Power BI to create custom dashboards and uncover actionable business insights without having to write code.
The connector provides a rich range of data that enables you to create dashboards/reports that fit your specific needs and use cases. Some Samsara tables and fields that you can use in Power BI include:
Data Type |
Fields |
---|---|
Fleet Vehicles |
Fleet vehicle ID, Name, VIN, Make, Model, Year, License plate, Vehicle regulation mode |
Drivers |
Driver ID, Name, Activation status, ID card number, License number, License state, Timezone, ELD exempt, ELD day start hour |
Tag Assignments |
Tag name, Tag ID, Parent tag ID, Object type, Object ID, Tag assignment ID |
Attribute Assignments |
Attribute name, Attribute ID, Object type, Object ID, Attribute assignment ID |
Safety Events |
Safety events ID, Time, Driver ID, Vehicle ID, Coaching state, Max acceleration, Latitude, Longitude, Behavior label, Behavior name, Behavior source |
Idling Segments |
Idling segment ID, Start time, End time, Duration (min), Vehicle ID, Fuel consumed (L), PTO active |
Vehicle Stats |
Timestamp, Vehicle ID, Currently assigned driver ID, Geographic information, Last speed value, Odometer value, Engine hours, Fuel level |
Vehicle Fuel and Energy |
Day UTC, Vehicle ID, Energy used (kWh), Distance traveled (km), Idling time (min), Efficiency (mpg), Carbon emissions (kg), Fuel energy cost amount, Engine hours, Fuel consumed (L) |
Driver Fuel And Energy |
Day UTC, Driver ID, Energy used (kWh), Distance traveled (km), Idling time (min), Efficiency (mpg), Carbon emissions, Fuel energy cost amount, Engine hours, Fuel consumed (L) |
Samsara also supports additional Samsara data types for use with Power BI.
Note
This table is not a comprehensive list of all the data fields available with the connector but lists the most common and relevant fields.
-
Power BI: Power BI Pro subscription.
For information about pricing and product comparison, see the Microsoft Power BI documentation.
-
Samsara: API access
Data tables will only return values if customers have matching licenses that provide access to that data (proper API access).
Samsara built the integration and will assist with deployments as needed. Follow the steps below to get started. If there are any issues, please contact Samsara Support.
-
Reach out to your Samsara representative to request the Power BI feature.
-
After Samsara enables the app, install it from your Samsara dashboard.
-
In your Samsara dashboard, navigate to Settings > Apps.
-
On the top right corner, click Beta Code and enter the code provided by your Samsara point of contact to install the app
Note
If you do not have your beta code, contact your Samsara representative.
-
Review the access scope and then click Generate Token.
-
Record the token as you will need it to set up the following installation steps. The token can be regenerated if necessary.
-
-
The Power BI Desktop installation is the same for both standard and personal gateway.
-
Install Power BI Service.
There are two ways Power BI Service can be set up: standard and personal gateway. The standard gateway has a longer installation process but is recommended for organizations where multiple people access multiple data sources.
-
Download the installation file for the Power BI Desktop that was sent to you in email.
-
Go to file explorer and recursively create the following file path:
~/Documents/Power BI Desktop/Custom Connectors
-
Copy and paste the installation file into the Custom Connectors folder in the path you just created on the Power BI Desktop.
-
Open Power BI Desktop.
-
Go to File > Options and settings > Options > Security and under Data Extensions change the preference to (Not recommended) Allow any extension to load without validation or warning. Then click OK.
Note
If you want Samsara to have the trusted thirty-party verification, please contact your Samsara representative.
-
On the popup, click Get data. If necessary, you may need to go to File > New.
-
Search for Samsara. Then select Samsara (Beta) and click Connect.
-
Enter the region and time range in Month/Day/Year format for how long you want to pull data, and then click OK. This data connector currently has a 6 month limit for data refresh. This means it can only retrieve the last 6 months of data.
The start date and end date fields are text fields, not date types. This is because Microsoft does not support entering date fields when using the standard gateway. To avoid errors later in this process, ensure that you use the proper format.
-
Enter Samsara API token you generated when you installed the Power BI app and click Connect.
After entering Samsara API token, you can then view all the data tables available and select which ones to load. Some tables will take a while (up to a few minutes) to load, especially for larger datasets.
-
Download the Power BI Gateway – standard mode.
-
Sign in with your Microsoft credentials.
-
Click Configure to begin the gateway setup.
-
Select Register a new gateway on this computer and then click Next.
-
Fill out the required fields for gateway name and recovery key.
Note
The recovery key is not the same as API token.
-
Review the gateway status to confirm it is ready for use.
-
Go to Power BI Service online, and then select Settings > Manage connections and gateways > On-premises data gateways.
Verify that you can see the connection you created.
-
Return to the gateway popup and click Connectors.
You should see the name of your Samsara connector. This ensures that the service account the gateway is using has the correct permissions to access the folder in which the connector was installed.
If you don't see the Samsara connector, the folder path was not set up correctly with the gateway installation or the Power BI Service account does not have permission to read the folder path.
To resolve issues with the path, try the following steps.
-
In Windows Explorer, go to the folder path you previously created in the Power BI installation steps:
~/Documents/Power BI Desktop/Custom Connectors
-
Right click Custom Connectors and choose Properties.
-
Go to the Security tab and verify that the user
PBIEgwService
exists in the list. If the user does not exist, proceed to create the user as described in the following steps. -
Click Edit and then Add the user.
-
Enter the name
NT SERVICE\PBIEgwService
and then click OK. -
Ensure the user PBIEgwService has the following access permissions:
-
Read & execute
-
List folder content
-
Read
-
-
Click OK.
-
On the Log On tab, change the service account for the On-Prem Data Gateway Service to the Local System account.
-
Click OK.
-
Verify that you can now see the Samsara connector on the Connectors section of the On-premises data gateway page.
-
-
Publish the report in Power BI Desktop that you want to see in Power BI Service. The published report should be visible in your Power BI Service workspace.
-
Select Schedule Refresh for the dataset (calendar icon next to the three dots and refresh icon).
-
Select Datasets > Gateway and cloud connections and verify that you see the gateway listed with a
not configured correctly
status. -
Click on the gear icon next to the gateway to manage connections and gateways.
-
Select the two options under Power BI section to enable refresh.
-
Save your changes and close.
-
Create a new connection for the standard gateway.
-
Click New and fill out the required fields.
If
Samsara API Get Records (Beta)
does not display under Connection type, there is a path issue.Note
The start date and end date fields are text fields. Ensure the text you enter follows the proper format.
-
Click Create and then close the pop up.
The new connection should appear if created successfully and is green when running. This connection is shareable and reusable among members of the same organization.
-
-
Return to My workspace > Schedule refresh > Datasets >Gateway and cloud connections.
-
Click the dropdown under Maps to and select the proper gateway.
-
Click Apply.
The Standard Gateway installation is fully complete. You can now refresh the report and dataset.
-
Download the Power BI Gateway - personal mode.
-
Sign in with your Microsoft credentials.
-
Click Connectors in the left panel.
-
Ensure that the path matches the path for the Power BI Desktop installation.
The Samsara connector will not appear if the path is incorrect.
-
Click Close.
Your Power BI Gateway is ready to use.
-
Set up a schedule refresh.
-
Verify the credentials are connected in the Data source credentials section.
-
If the credentials are not connected, click Edit credentials. Then enter the same API token that you used to install the Power BI Desktop under Account key and select the privacy level settings you prefer.
-
To schedule a data refresh, click Refresh and fill out the required information.
To manually trigger a refresh, you can also click the refresh icon for the connection.
-
Refer to the Microsoft Power BI documentation for more information.
For issues related to the integration, contact Samsara Support.
Comments
0 comments
Article is closed for comments.