Showing results for 
Search instead for 
Did you mean: 
New Member

Power BI - Create and Build DataSet Programaticaly



I Would like to create new dataSet (build from the ground) but without Power BI Desktop

Those dataset are full based on SQL Server Views.


I would like to : 

  • Générate DataSet
  • Add DataSource
  • Change type of all colones (Decimale place, Date format, etc...)
  • Rename / change / hide columns
  • Add calculated Measures and Columns
  • Link the DataSource
  • Publish Dataset
  • etc...


Responsive Resident
Responsive Resident

Some of the visual constructs you do on power bi you are not capable to do in the API.   Creating datasets,  updating data sources,  refreshing,  etc are all things you do in the API.  Building visuals and some of those finer points are doable in and powerbi desktops.

New Member

Hi luisrh,


Thank you for the answer,

So i can do anything i do for dataset in Power BI Desktop but with the API ?

Or is there any feature that are not available ?

Responsive Resident
Responsive Resident

If you want to do this in power BI service ( then you need to leverage the API -  Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn  to do that. 

If you are using PBI RS, there is also an API but it doesn't have all the capabilities of the service API - 

PBIRS | 2.0 | microsoft-rs | SwaggerHub


good luck.

Helpful resources

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.