Connect Xtract Universal to Power BI Desktop (M-Script)
This article shows how to use an M-script to connect Xtract Universal with Power BI Desktop. For information on how to connect using the Xtract Universal Custom Connector, refer to Connect Xtract Universal to Power BI Desktop (Custom Connector).
Connect Power BI Desktop with Xtract Universal
To set up the Power Query M-script in Power BI Desktop to connect with Xtract Universal:
- Create a new Power BI report using Home > Get Data > Blank Query as a data source.
- Open the [Advanced Editor].

- Copy the content of the loading_script.txt file into the editor.
- Change the values for ExtractionName and ServerURL to match the name of your Xtract Universal extraction name and server URL .

- Click [Done] to confirm the script .
- If prompted, provide an authentication method for the Power BI and Xtract Universal connection. For more information, see Single Sign On and SAP Authentication.
- Close the Power Query Editor and apply changes when prompted.
- Save the Report.
Your SAP data is now available for further processing.
Power BI Settings
To use the Xtract Universal data source efficiently, adjust the following settings in Power BI Desktop:
- Navigate to File > Options and settings > Options.
- Open the Security tab and activate the option (Not Recommended) Allow any extension to load without validation or warning.

- Optional: Increase the Power BI cache in the tab Load Data to prevent multiple calls from Power BI to Xtract Universal when extracting large data volumes. Multiple calls result in in multiple entries for the same extraction in the Xtract Universal extraction log.

Parameters
You can pass parameters to Xtract Universal using the Parameters entry inside the M-script:
let
ExtractionName = "mara",
ServerUrl = "http://localhost:8065",
// Record containing run parameters with corresponding values, can be empty
// Usage: <XU parameter name>= <value or Power BI parameter>
// MUST NOT use "name" as a record field here
Parameters = [ /*rows= "300", myparameter= SomePowerBIParameter*/ ],
For a complete list of possible parameters, see extraction parameters.
Pass Static Values
The example below passes a static value (300) to the Xtract Universal parameter row:
Pass Power BI Parameters
Using Power BI parameters allows changing values without editing the query logic. To create parameters in Power BI Desktop, go to Home > Manage Parameters > New Parameter:

The example below passes a Power BI parameter (p_myParameter) to the Xtract Universal parameter row:
Map Custom Runtime Parameters
Xtract Universal allows creating custom runtime parameter inside extractions that can be used to create custom data filters. You can find a list of all custom runtime parameters of an extraction in the Custom tab of the "Run Extraction" menu:

The example below maps a Power BI parameter (p_myParameter) to an Xtract Universal custom runtime parameter (MyParameter).
Related Links
- Documentation: Power BI Destination
- Documentation: Extraction Parameters
- Knowledge Base Article: Dynamic Table Extractions with Power BI
- Microsoft Documentation: Parameters in Power BI Desktop
Last update: January 16, 2026