Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
boldergree
New Member

How to Refresh data OR Replace it for my power bi file


My problem is right now when a report is uploaded/published to power bi web from desktop, and when the api is called to update the dataset behind this report , the report WASNT REFRESHED with the new dataset, which is in excel or csv format behind the pbix file published. Therefore using the PowerBI API, what are the steps that has gone wrong/insufficient for me. I am listing the steps below:

$powerbi = new PowerBI($rd->biusername, $rd->bipassword);
$dataset = $powerbi->GetDatasetByName($name);
$tables = $this->GetTablesFromFile("stats_v1", "/tmp/Power1to8.xlsx");
$rows = $this->GetRowsFromFile($name, "/tmp/Power1to8.xlsx");
$this->UpdateTablesDataTypes($tables, $rows);
$powerbi->DeleteRows($dataset['id'], $table['name']);
$powerbi->PostRows($dataset['id'], $table['name'], $rows[$table['name']]);

$reports = $powerbi->GetReportsByDataset($dataset['id']);
$powerbi->UpdateReportContent($report['id'], $dataset['id']);

 

Therefore seeking kind souls to advise whats wrong above or anyting insufficient so as to be able to allow me to refresh my data for the power bi file 

Thanks

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.