Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Is it possible to create queries, relationships, measures and visuals programatically in PBI Desktop through code, and/or modify/create a PBIX file?
I'm trying to parametrize the creation process of PBIX files.
Solved! Go to Solution.
Hi @FelipeGualberto,
I would suggest you create an idea here.
Best Regards,
Dale
Hi @FelipeGualberto,
I would suggest you create an idea here.
Best Regards,
Dale
Thanks for the confirmation, I'll create.
For those interested in this idea, please vote in: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13535403-create-a-report-dashboar...
You can not even print reports in Power BI, so what do you expect?
Just kidding 🙂 but it is planned for the next updates
Back to the topic: I tried to modify the PBIX by unpacking it and reading the code. But you can't decently work with this anymore.
For e.g. if i convert a custom visual into a PBIX file (the project folder involves typescript, json, less code etc.) the code will change completely.
Every variable/function has a letter now and all comments are gone, it is just bad to work with and hard to understand the code.
So after creating a PBIX package is not possible the retrieve the source code in good shape or make it undone because the process of the packaging simplifies the code which is not irreversibel.
This means: you can not modify the PBIX but you can create one by using Power BI CLI. I would suggest to take a look in custom visuals. It is actually possible in there to create queries, relationships, measures and visuals.
Here is a great tutorial for the beginning: https://tsmatz.wordpress.com/2016/09/27/power-bi-custom-visuals-programming/
Greetings,
Berat
I simply unpacked the PBIX file, changed the timestamp of a file by saving, packed it again and the PBIX didn't open anymore.
That is developer proof.
Maybe it has a good reason so no one can easily read the source code 🙂
#Copyright
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
6 | |
4 | |
2 | |
2 |
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
3 |