BI machine users: your Agromigo data in Power BI
Connect Power BI to your Agromigo data with a key file, for the sites you choose, and chart paid hours and the days that stood out.
Your management team already works in Power BI. The hours, absences, labor plans, production and issues are in Agromigo. Exporting a spreadsheet every week means the report is out of date the moment it is shared, and someone spends their Monday rebuilding it.
A BI machine user lets Power BI read your Agromigo data directly, up to date as your crew records, for exactly the sites you choose. It is a machine user of the BI kind, and that is all it is: no API key, no API permissions, nothing that can change a record. Power BI is the example here: any BI tool with a Google BigQuery connector, such as Tableau or Qlik, connects the same way.
In this video
Migo shows you how to connect a BI tool to your Agromigo data, with Power BI as the example, read an activity’s name in the language you report in, filter a report by day, and chart the days that stood out.
- The BI machine user. On the Machine Users screen, Power BI is a Machine user (BI), the kind you create with New. Its Details card shows its type and that it reads every site.
- API or warehouse, never both. In the edit sheet there is no What it can do card, because a BI machine user holds no API permission, and its type was chosen when it was created. Cancel leaves it as it was.
- What your BI tool asks for. The Connect your BI tool card lists what Power BI, Tableau, Qlik or any other tool with a BigQuery connector asks for: the project ID and the service account’s email address, each with a copy button. Download key file issues the file Power BI signs in with, the password of this connection. Any earlier key file stops working. Anyone with the new one can read your data, so store it safely, like a password.
- What the views hold. The book icon opens the manual beside the page. The Machine users chapter links to the chapter on Power BI and other BI tools, whose section What the views contain describes every BI view and its columns.
- Google BigQuery in Power BI. Get Data, search for BigQuery, and choose Google BigQuery.
- The billing project. Under Advanced options, type the project ID from the card,
agromigo-workforce-bi-prod, in Billing Project ID: the project your queries run in. It holds no data of its own. - Sign in with the key file. Refresh the connections, name the new one, choose Service Account Login, type the service account’s email address from the card and paste the key file’s contents. Other BI tools ask for the same project, service account and key file.
- Only your BI views. The data project,
agromigo-workforce-prod-2, holds one dataset, workforce_bi, with your BI views. Tick vw_bi_day_checks, whoseunusual_dayscolumn is 1 for a day that stands out from colleagues’ days and 0 for a usual one, and vw_bi_timesheet_entries: one row per recorded entry, with its date, site, activity and paid time. Beside them are the views for absences, issues, labor plans and production. - The name out of the JSON. activity_name holds each name in every language. In Power Query, Add column, Custom column, with the formula
Json.Document([activity_name])[en], reads the English name into a column of its own. - Hours, ready to add up. The view gives paid and unpaid time in hours as well, as
paid_hoursandunpaid_hours, beside the exact milliseconds. No conversion of your own. - A report. Create a report saves a semantic model with both views. Tick Activity and
paid_hoursin the Data pane and choose the clustered bar chart: paid hours per activity. - One week at a time. With nothing selected, tick
shift_dateand choose the slicer. Type the first and last day of last week, and the bars show that week’s paid hours only. In the Format pane’s General tab, each visual gets its size and place: the slicer as a band across the top, the chart large below it. - The days that stood out. A new page, with
shift_dateandunusual_daysof vw_bi_day_checks in a clustered column chart, shows how many days stood out on each date. With its X axis set to Categorical, only days with entries show, and Focus mode shows them across the whole page.
Your reports now read the same hours and day checks as Agromigo, limited to the sites of this machine user, whether you build them in Power BI or another BI tool.
Tips
- Pick your language in the formula.
[en]reads the English name,[nl]the Dutch one. Any language your activities are named in works the same way. - Add up unusual days without a formula.
unusual_daysis 1, 0 or empty while a day is not finished. Its sum counts the unusual days, its count the days compared, and its average is the share that stood out. - From the chart to the person. The day checks name each person. Open their day on the time entries screen to see what stood out. In the Netherlands, the works council may need to consent before staff are compared this way. The views hold the last 8 days, so refresh daily to keep a longer history.
- A slicer filters what is loaded. To read less per refresh, filter
shift_datein Power Query instead. - One system, one machine user. A tool that also writes through the API gets a second machine user for that. A BI machine user never holds API access.
- Choose the sites on purpose. Every site is the default. A connection limited to one site gets no rows at all from another, enforced in the warehouse itself.
- A daily limit on reading. Each BI machine user may read up to 50 GiB from the warehouse a day. Past it, a refresh fails until the limit resets at 09:00 Dutch time (08:00 for a few weeks in spring and autumn). No data is lost, and nothing is charged extra.
- Withdraw it in one step. Set the machine user inactive, and the key file stops working within a minute or two. The next refresh in your BI tool fails, which is the signal.
Read more
Connecting Power BI and other BI tools explains the key file, the views and what each one contains. Access and scope covers the two kinds of machine user and the site scope.
Want to see more? Watch the other stories.
More stories
-
No repair forgotten, from the first photo to the fix
Your workers see damage first. With Agromigo they report it in a WhatsApp chat, and you see every open repair on one list and one map.
-
4 min Issues: from a WhatsApp photo to a finished repair
A worker reports torn netting with one photo on WhatsApp. The technician is notified, takes the repair on, finds it on the map and resolves it, and you see every repair that is still open.
-
1 min Read Tag Content: see which crops stood on a row, and when
Read a row's tag with the Agromigo Admin app and see every crop that stood on that row, with its dates, right where you stand.