Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
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 = "https://app.powerbi.com/groups/{Workspace ID}/datasets/{Dataset ID}/executeQueries"
$requestBody = @"
{"queries" : [ {"query" : "MAXX('WaitTimes', 'WaitTimes'[UpdatedDate])"} ] , "serializerSettings" : {"includeNulls": true} }
"@
Connect-PowerBIServiceAccount
$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?
Thanks
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.
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |