Power BI Connector FAQs
Common questions and additional setup guidance for the Power BI Connector.
Use this guide to work through common setup and configuration questions when using the Power BI Connector. If you ever need additional support, don't hesitate to reach out to Samsara Support.
Common Questions
- How do you update your Samsara API access?
- How do you reset data permissions in Power BI?
- How do you set up data refresh?
- How do you retrieve more than six months of data using Power Query?
- How do you connect data for >1 organization in Power BI?
- How do you assign field relationships in Model View?
Update your Samsara API access
Follow our Marketplace app installation steps in the Samsara dashboard (Settings > Apps) to enable API access for Power BI.
- The API Token that is generated in the app install comes with the exact scopes required for Power BI
- If you ever need to regenerate the API token or revoke access, select the more actions menu under Settings > Apps > Enabled (additional guidance here)
When new tables are added to the Power BI Connector you may need to update what data scopes you've granted to the Power BI app in Samsara.
In your Samsara dashboard, navigate to Settings > Apps > Enabled and find “Power BI”. If you see the option to “Update”, click through to grant the additional scope access. More about updating Samsara Marketplace apps here.
Reset data permissions in Power BI
If you need to update the Samsara API token for the Power BI Connector, navigate to File > Options and settings then select Data sources settings.
Select "Samsara". You have the option to edit or clear permissions for this data source.
Note: you can also access "Data source settings" from Home > "Transform data".
Setting up Data Refresh
Recommend consulting Microsoft's comprehensive guide on data refresh in Power BI.
Samsara's certified connector is compatible with dataflows, which offers one of the simplest ways to set up data refresh.
- Note that you can also set up refresh with the Power BI Service gateway connection options and using a direct connection in Power BI Desktop. Please review Microsoft's guidance on their site.
Dataflows also support incremental refresh if using a Microsoft workspace in Premium
capacity . Incremental refresh keeps tables current without loading the entire data set every time (unlike how manual or scheduled refreshes work) and can aggregate a dataset over multiple years.
- You will need a DateTime column for incremental refresh. If your table as a timestamp value, you can easily add a custom column for DateTame using the formula
=DateTime.From([column_name])
Retrieve more than six months of data using Power Query
The connector is designed to return up to 6 months of data at a time. This limit is designed to ensure table load performance. However, there is no limit to what window of data you can query. In other words, you can request data as far back as you've been a customer of Samsara.
Example: retrieve 12 months of Safety Event data
-
Using Power BI Desktop and a direct connection, select Get data, select Samsara and the desired table.
- To get data for 12 months I will repeat this process twice, first selecting January 1 to June 30, then July 1 to December 31.
- Once the second table has loaded you will see two instances in your Data panel on the right side of the report builder: "Safety Events" and "Safety Events (2)".
-
Select Transform data from the tools bar.
-
Power Query Editor will open. Now select Combine from the tools bar, then Append Queries as New.
-
Select the tables you want to append.
-
Name the combined table, then select Close & Apply
Your combined table will have all datapoints from the two original tables, returning data for the total 12 month period.
Using M Code
Instead of using the Power Query Editor UI to combine tables you can simply use the table.combine function in M Code. [Notice in the screenshot for Step 5, the output of the UI workflow is a table.combine function.]
Connect data for >1 organization
If you manage >1 Samsara organization but want to consolidate analysis in a single Power BI dashboard, we recommend connecting to each organization using PowerQuery Dataflows. Guidance on how to connect to your Samsara data via dataflows is provided in the Product Guide.
- Create a dataflow connection for your first organization, giving it a unique name (e.g. include Samsara org ID)
- Create another dataflow for Samsara with a unique name, with the API token generated for the second organization
- In your Power BI report, select each dataflow as your datasources. Data from the same tables can be combined in your report. (If needed, use Power Query editor to combine tables.)
Assign field relationships in Model View
- To view the relationship between entities in each table, open "Model View" in Power BI (follow Microsoft’s guidance here). While tables are in beta, some relationships may need to be manually assigned.
- Click "Manage relationships" under "Home" to review existing relationships and add new ones.
- For fields like "Tags" and "Attributes" you may want to revisit default cardinality settings, depending on your modeling goals.
Updated about 1 month ago