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.
Hello Everyone,
1. I want to create a report and the visulasitation, and i have all the information like what table and columns to be used and what type of chart to be use. But I want to create from backend using powerbi api or manupulationg .pbix file. How can i do this process automate ?
2. And i have dax query as well and i want to create a new measure in powerbi from backend through api using these dax query.
Any one have any solution please guide me!
Hi,Poojara_D12,thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below.
Hello,@sidhharth_1996 .I am glad to help you.
I think using PBIP templates + Azure DevOps is also a good way to go.
You can save Power BI reports in PBIP format:
Enable the preview feature in Power BI Desktop: go to File > Options and Settings > Options > Preview feature, check Power BI Project (.pbip) and subsequently save the file in pbip format
When using PBIP templates, you can also manage mesaure in a unified way.
URL:
Solved: How to change source table of measures in TMDL Vi... - Microsoft Fabric Community
Power BI Desktop projects (PBIP) - Power BI | Microsoft Learn
Create a Git repository in Azure DevOps:
Creating a new Git repository in Azure DevOps
The created pbip file is pushed to this Git repository.
Create monitoring and automated deployments:
Configure an Azure DevOps pipeline to monitor changes in the Git repository. When a user creates a new measure in a .pbip file and saves it, the pipeline detects the change.
You can use the Power BI REST API and Azure DevOps pipelines to automatically deploy updates to the Power BI service workspace
Create a new Git repo in your project - Azure Repos | Microsoft Learn
What is Azure DevOps? - Azure DevOps | Microsoft Learn
The thing you need to do is create a new measure in Power BI Desktop, click Save, and the rest of the steps will be done automatically.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Poojara_D12 , @Anonymous ,
I understood the process, But could you please help with the process and tools to use to achive this process. That will be a great help.
Step by step guide, so any one can refer this and achive the same.
Thank you
Hi,@sidhharth_1996 .
Unfortunately, due to environmental constraints, I was unable to perform the relevant tests. You can try to browse related products, there should be some examples of articles on the web about automated deployment
URL:
So You Want to Deploy Power BI Project files (PBIPs)? – SQLSwimmer
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the kind words @Anonymous
If possible kindly check my Youtube channel, I upload very useful stuff regarding Power BI SQL and related around this. I have provided the link below.
Automating report creation and measure addition in Power BI can be achieved using the Power BI REST API and XMLA endpoints. To create reports dynamically, you first need a published dataset in a Power BI workspace. Using the REST API, you can clone existing reports, import .pbix files, or modify visualizations by defining JSON-based configurations. However, directly editing .pbix files is not feasible since they are binary. For adding measures programmatically, Power BI REST API does not provide direct support, but Tabular Editor and XMLA endpoints allow modifications. You can connect to a dataset, create a measure using DAX, and deploy changes using PowerShell or Analysis Services (TOM) scripts. Enabling XMLA read/write access in the workspace is crucial for this. Additionally, Power Automate can be used to schedule these automation tasks. By leveraging these tools, you can fully automate report generation and measure creation without manually working in Power BI Desktop.
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
1 |
User | Count |
---|---|
8 | |
4 | |
4 | |
3 | |
3 |