Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
emantzoo
New Member

No-click Power BI dashboards built from Python scripts - Code-first

I built an open-source repo that generates complete, multi-page Power BI dashboards from Python scripts — no dragging fields, no clicking through menus.

 

How it works: A Python script uses make_* helper functions (one line per visual) to write visual.json files directly into the PBIR folder structure of a .pbip project. Open the project in Power BI Desktop and all pages appear with data-bound visuals ready to polish.

 

One line of Python:

make_card("sc1_rev", 20, 10, 295, 110, "_Measures", "Total Revenue")

...generates the full PBIR JSON for a data-bound KPI card.

 

Optional: auto-generate everything with a Claude skill

The repo includes a Claude skill file that can generate both the data model spec and the Python script from your raw CSVs + a one-paragraph business brief. You drop your CSVs into Claude Code, describe what you want ("supply chain dashboard tracking fulfillment, inventory, and supplier performance with YoY comparisons"), and it produces both files. You review the DAX measures and relationships before executing anything — the spec file acts as a human-readable checkpoint. You can also use the skill to generate just one of the two files and write the other yourself. The skill is optional — everything works fully manually without it.

 

Why code-first over the UI?

  • Reproducible — rerun the script, same dashboard every time. Text-based, version-controllable, JSON diffs instead of binary .pbix blobs
  • Fast — 4 dashboards built in under an hour vs days of manual work
  • Scalable — change a table name, rerun, done. Same layout, different data

 

Pure Python, no dependencies (just stdlib). Requires Power BI Desktop with PBIR preview features enabled.

GitHub: [LINK]

 

1 ACCEPTED SOLUTION
v-karpurapud
Community Support
Community Support

Hi @emantzoo 


Thank you for providing the details. It would be helpful if you could share this in the Power BI Community Blog Power BI Community Blog - Microsoft Fabric Community, as it may assist others with similar issues. If you have any questions, please let me know. We will assist you further.
 

Regards,

Microsoft Fabric Community Support Team.
 

View solution in original post

2 REPLIES 2
v-karpurapud
Community Support
Community Support

Hi @emantzoo 


Thank you for providing the details. It would be helpful if you could share this in the Power BI Community Blog Power BI Community Blog - Microsoft Fabric Community, as it may assist others with similar issues. If you have any questions, please let me know. We will assist you further.
 

Regards,

Microsoft Fabric Community Support Team.
 

lbendlin
Super User
Super User

What is your question? Did you plan to post this in the Blogs section?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.