How to Use API to get Hawkin Dynamics Data into Microsoft Power BI

Your guide to importing Hawkin Dynamics data into Power BI automatically with the Hawkin API

Check the GitHub repository for the most up to date information and Power Query Scripts

https://github.com/HawkinDynamics/power-query

Select Data Source 

  • Find and Select ‘Get Data’ button in the ‘Home’ tab of the window ribbon.
  • Find and select ‘Blank Query’ from the options to open the query window.

A screenshot of a computer

Description automatically generated

Open Script Editor 

  • Select ‘Advanced Editor’ in the ‘Query’ section at the top of the window, in the ‘Home’ tab, to open the advanced editor window.

A screenshot of a computer

Description automatically generated

Replace Script and Key 

  • Copy and paste the desired script into the script editor.
  • Scripts can be downloaded here: SCRIPTS

A screenshot of a computer

Description automatically generated

  • Replace the “SecretKey” variable in the new script (on line 5) with your unique integration key. Then press the ‘Done’ button.

A screenshot of a computer

Description automatically generated

Review 

  • You might be prompted to answer some specific questions about security. If you are asked to select an authentication method, you should choose “Anonymous”. You might also be asked to which level of the URL this should be applied. Selecting the base ‘https://cloud.hawkindynamics.com/api’ would work best, as it will apply to all queries above it (token and organization)

A screen shot of a computer

Description automatically generated

Repeat Steps 

This sequence shows the steps you need to create a data call for an individual query. It is recommended that that you use separate queries for each test type, and for other organizational specific identifiers such as teams, groups, and athletes. You can repeat these same steps for each of the queries by the appropriate script.  

Notes 

Site URL 

The scripts being used in this example are written for organizations in the Americas. Ensure that you have entered/replaced the correct URL in the script if you are outside of the Americas. Check your cloud site URL to verify the URL prefix used for your organization. 

Data formatting 

Ensure to check the format of the columns after running the scripts. Particularly the columns including numerical values. After running the scripts, the values in those columns are not assigned a format and will assumed as text. Be sure to check the returned data tables and assign the appropriate formats.