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
anonymous2
Helper II
Helper II

create a relationship using rest api in powershell

Hi, I created a dataset by importing an excel file to Power BI service then I want to get the data and use it to create a relationship using rest api in powershell. I used the push method to push the dataset to the power bi service and managed to create the relationship between 2 tables but I do not know how to do it if the data isn't push to the power bi to create the relationship. Is it possible to do it?
Thank you.

@Anonymous @Burningsuit @Tutu_in_YYC @edhans @GilbertQ @ibarrau @amitchandak 

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @anonymous2 ,

 

I think you have got the answer for this question from Solved: Create Relationship by Importing File with Power B... - Microsoft Power BI Community. So I will attach an official document related to XMLA endpoint that might help you.

Dataset connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft Docs

Using XMLA endpoints to change data sources in a Power BI dataset | Microsoft Power BI Blog | Micros...

 

Normally, get/read data to a report and build a model is mainly completed in Power BI Desktop application. Operations in Power BI service is very limited. For Premium, PPU user, XMLA endpoint will provide additional dataset management, governance, advanced semantic modeling, debugging, and monitoring. You need to use with tools like SSMS.

 

Per you description, I think there are two REST API may help you as well. For more details, please refer to these official documents.

Imports - Post Import In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Push Datasets - Datasets PostRows - REST API (Power BI Power BI REST APIs) | Microsoft Doc

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

1 REPLY 1
v-cazheng-msft
Community Support
Community Support

Hi @anonymous2 ,

 

I think you have got the answer for this question from Solved: Create Relationship by Importing File with Power B... - Microsoft Power BI Community. So I will attach an official document related to XMLA endpoint that might help you.

Dataset connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft Docs

Using XMLA endpoints to change data sources in a Power BI dataset | Microsoft Power BI Blog | Micros...

 

Normally, get/read data to a report and build a model is mainly completed in Power BI Desktop application. Operations in Power BI service is very limited. For Premium, PPU user, XMLA endpoint will provide additional dataset management, governance, advanced semantic modeling, debugging, and monitoring. You need to use with tools like SSMS.

 

Per you description, I think there are two REST API may help you as well. For more details, please refer to these official documents.

Imports - Post Import In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Push Datasets - Datasets PostRows - REST API (Power BI Power BI REST APIs) | Microsoft Doc

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

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.