⚠️ Important to note: You will need to have on hand the URL, Username and Password provided initially during the flow creation
How to connect to Power Platform to Power Query
1 . Open Microsoft Power Platform
2. Go to Data flows (If you don't have Data flows added, you can click into ‘..more’ to pin it to your left navigation)
3. Create a new Dataflow and give it a name
4. Select the Blank Query option
5. You will be brought to a script page. You'll need to overwrite the existing script with the script from below
let
// Define credentials
username = "INSERT",
password = "INSERT",
// Encode the credentials for Basic Authentication
authHeader = "Basic " & Binary.ToText(Text.ToBinary(username & ":" & password), BinaryEncoding.Base64),
// Make the authenticated web request
response = Web.Contents(
"INSERT",
[
Headers = [
Authorization = authHeader
]
]
),
// Parse the CSV response
csv = Csv.Document(response, [Delimiter = ",", Columns = 10, Encoding = 65001, QuoteStyle = QuoteStyle.Csv]),
// Promote headers if present in first row table = Table.PromoteHeaders(csv, [PromoteAllScalars = true])
in
table
6. Once the code snippet is added, click next
7. Once the new Query is added into Power Query, click ‘Configure Connection’
8. You will see a ‘Connect to data source’ pop up, click the 'Connect' button to finalise the connection
9. Once the connection is updated, the data should appear
10. Once the Data appears, click next
11. This will open a new popup to select the destination for your data, select either a pre-existing table or create a new table
12. Once you have selected the destination table, map the columns you want from the Dashpivot export to the columns in the destination table. Click Publish once you are done
13. Once it is published, the new Query should appear under Data flows
Note:
If you are having trouble creating a dataflow, please contact your System Administrator to verify that you have the correct permissions