Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi, I need to load an excel file to Power BI using Powershell and then get data also using Powershell. Then use them to create a relationship. Does anyone know how to do it?
Thank you in advanced.
HI @anonymous2,
AFAIK, the current power bi desktop does not support directly invoking PowerShell to get data.
In my opinion, I'd like to suggest you directly use the power bi desktop client 'get data' functions to get data from an excel sheet or try to use power query with integrated R/Python scripts and packages to interact with PowerShell.
Use R in Power Query Editor - Power BI | Microsoft Docs
Using Python in Power BI Power Query Editor - Power BI | Microsoft Docs
Perhaps you can take a look at the following link with similar requirements if help:
Solved: Power BI Get Data using Powershell - Microsoft Power BI Community
BTW, if you mean to use Powershell with rest API to push dataset to power bi service, that is possible. (power bi service has disabled these types of edit features so you can change relationships)
Regards,
Xiaoxin Sheng
Hi @v-shex-msft, thank you for your suggestions. I already imported an excel file in Power BI service then I want to create a relationship using rest API post method in Powershell using the data in the excel. But it didn't work. May I know is there a way of doing it? Are relationships can only be seen on Power Bi Desktop?
'BTW, if you mean to use Powershell with rest API to push dataset to power bi service, that is possible. (power bi service has disabled these types of edit features so you can change relationships)'
Yes, I managed to push dataset to power bi service and create relationship using PowerShell. My current problem is, using imported file(excel) to create relationship in powershell. Do you know how to do it?
Thank you.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
10 | |
3 | |
3 | |
3 | |
2 |