- Open Power BI Desktop:
• Start Power BI Desktop on your computer.
- Open the Power Query Editor:
• Click on the Home tab.
• Select Transform Data to open the Power Query Editor.
- Enter the M Script:
• In the Power Query Editor, click on Home > Advanced Editor.
• Delete any existing code and paste your M script into the Advanced Editor.
- Adjust the Script (if necessary):
• Replace {yourToken} with your actual API token in the Authorization header.
- Run the Script:
• Click Done to close the Advanced Editor.
• Power Query will run the script and fetch data from the API.
• You should see the data loaded into the Power Query Editor.
- Load the Data:
• After verifying and transforming the data as needed in the Power Query Editor, click on Close & Load to load the data into Power BI.