Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

Error pulling data from the PowerBI API



I want to schedule a workflow that appends data to my PowerBI dataset, by first taking the max date in the dataset, and then appending the results for every day after that to my dataset.


I'm currently struggling to read the data in the PowerBI dataset.


I've tried following this guide:


but that wasn't working for me. What I'm currently trying is this (in PowerShell)


$requestUrl = "{Workspace ID}/datasets/{Dataset ID}/executeQueries"


$requestBody = @"
{"queries" : [ {"query" : "MAXX('WaitTimes', 'WaitTimes'[UpdatedDate])"} ] , "serializerSettings" : {"includeNulls": true} }

$result = Invoke-PowerBIRestMethod -Method Post -Url $requestUrl -Body $requestBody


This code doesn't error, but it is returning a HTML document and not what I need. Does anyone have any advice?



Super User
Super User

You need to return a table. Your code is missing the EVALUATE statement.


NOTE: Power BI has no memory. You cannot append data to a regular dataset. Either use a push dataset, or use incremental refresh on a regular dataset.

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.