Forum Discussion

gkumara1's avatar
gkumara1
New Member
3 years ago

Extracting calculated columns and custom SQL queries from Power BI Service reports

Hello,

I'm currently working on a project where I need to extract calculated columns and custom SQL queries from Power BI Service using Python script. I've explored the Power BI API and the Python SDK, but I couldn't find a direct method or function to achieve this.

Is there any way to programmatically extract calculated columns and custom SQL queries from Power BI Service reports using Python? Are there any specific APIs or libraries I should be using? Any sample code or guidance would be greatly appreciated.

I have already tried 1)exporting .pbit and .pbix report files, 2)using dax_extract library from python . However, I haven't been successful so far.

Thank you in advance for your help!

1 Reply

  • Hi. I'm not sure what you want to build with this, but do you know dax studio or tabular editor? those are external tools that will let you connect to a PowerBi Desktop file or a Power Bi Service models under dedicated capacity. Once connected you can explore every DAX code at the model, or even the power query. You can also use Model Documenter external tool from data-marc that will document all those things in a new report.

    I don't think you can do that with python. You can query the model with DAX using python and power bi rest API. But just to query data.

    I hope that helps,