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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
dthompsonKairos
Helper II
Helper II

AI to analyze .pbix

My company has many older reports that make extensive use of measures to provide various KPIs. Most of them are complex and recursive in that they reference other measures....Measures in measures...all the way down.

 

Has anyone had success in using any of the existing AI tools to analyze a .pbix file and extract the formulas for measures, providing the hierarchy of calculations?

 

A Bonus would be to then be able to re-implement the measure as a SQL query.

1 ACCEPTED SOLUTION
v-dineshya
Community Support
Community Support

Hi @dthompsonKairos ,

Thank you for reaching out to the Microsoft Community Forum.

 

Hi @jgeddes , Thank you for your prompt response.

 

Hi @dthompsonKairos , In addition to @jgeddes response, I have added some additional points.

 

1. Extract measures + dependency lineage from a PBIX:

 

In Power bi desktop --> DAX Query View / INFO.CALCDEPENDENCY (measure)

 

Run below DAX query:

 

EVALUATE INFO.CALCDEPENDENCY()

 

Note: It returns every calculation object like measures, calc columns/tables, visual calcs with its DAX expression and the objects it depends on perfect input to generate a hierarchy or graph. You can also restrict to a specific measure.


DAX Studio DMVs: Query DMVs like TMSCHEMA_MEASURES (expressions) and DISCOVER_CALC_DEPENDENCY (precedent/dependent mapping).It is used to export a full measure catalog and the reference map.

 

Tabular Editor (2 or 3) scripting: TE exposes built‑in dependency tracking and a C# scripting surface. You can run a macro to dump measures + their dependencies to JSON.

 

pbi-tools : pbi-tools extract unpacks a PBIX/PBIT into a folder structure. With current versions you can serialize the semantic model to TMDL, which stores each table/measure as readable text, ideal for diffing and for LLM prompts.

 

Power BI Helper: It documents models and shows a DAX expressions, dependency tree, if you want a click‑through experience and a doc export.

 

Note: If your models are in the Service (Premium/Premium per User), you can also enumerate measures programmatically via the Tabular Object Model (TOM) over XMLA.


2. Turn the dependencies into a hierarchy/graph, Once you have the dependency table from INFO.CALCDEPENDENCY or DISCOVER_CALC_DEPENDENCY, you can visualize it. Mermaid flowcharts from Tabular Editor scripts, fast to render in Docs/Wikis, DevOps, GitHub. Fabric notebooks + Semantic Link (SemPy) to build a network graph. This pulls dependencies and highlights critical nodes via network analysis.

 

Please refer below links.

INFO.CALCDEPENDENCY function (DAX) - DAX | Microsoft Learn

Programming Power BI semantic models with the Tabular Object Model (TOM) | Microsoft Learn

 

I hope this information helps. Please do let us know if you have any further queries.

 

Regards,

Dinesh

 

 

View solution in original post

4 REPLIES 4
v-dineshya
Community Support
Community Support

Hi @dthompsonKairos ,

Thank you for reaching out to the Microsoft Community Forum.

 

Hi @jgeddes , Thank you for your prompt response.

 

Hi @dthompsonKairos , In addition to @jgeddes response, I have added some additional points.

 

1. Extract measures + dependency lineage from a PBIX:

 

In Power bi desktop --> DAX Query View / INFO.CALCDEPENDENCY (measure)

 

Run below DAX query:

 

EVALUATE INFO.CALCDEPENDENCY()

 

Note: It returns every calculation object like measures, calc columns/tables, visual calcs with its DAX expression and the objects it depends on perfect input to generate a hierarchy or graph. You can also restrict to a specific measure.


DAX Studio DMVs: Query DMVs like TMSCHEMA_MEASURES (expressions) and DISCOVER_CALC_DEPENDENCY (precedent/dependent mapping).It is used to export a full measure catalog and the reference map.

 

Tabular Editor (2 or 3) scripting: TE exposes built‑in dependency tracking and a C# scripting surface. You can run a macro to dump measures + their dependencies to JSON.

 

pbi-tools : pbi-tools extract unpacks a PBIX/PBIT into a folder structure. With current versions you can serialize the semantic model to TMDL, which stores each table/measure as readable text, ideal for diffing and for LLM prompts.

 

Power BI Helper: It documents models and shows a DAX expressions, dependency tree, if you want a click‑through experience and a doc export.

 

Note: If your models are in the Service (Premium/Premium per User), you can also enumerate measures programmatically via the Tabular Object Model (TOM) over XMLA.


2. Turn the dependencies into a hierarchy/graph, Once you have the dependency table from INFO.CALCDEPENDENCY or DISCOVER_CALC_DEPENDENCY, you can visualize it. Mermaid flowcharts from Tabular Editor scripts, fast to render in Docs/Wikis, DevOps, GitHub. Fabric notebooks + Semantic Link (SemPy) to build a network graph. This pulls dependencies and highlights critical nodes via network analysis.

 

Please refer below links.

INFO.CALCDEPENDENCY function (DAX) - DAX | Microsoft Learn

Programming Power BI semantic models with the Tabular Object Model (TOM) | Microsoft Learn

 

I hope this information helps. Please do let us know if you have any further queries.

 

Regards,

Dinesh

 

 

Hi @dthompsonKairos ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

 

Regards,

Dinesh

Hi @dthompsonKairos ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

 

Regards,

Dinesh

jgeddes
Super User
Super User

If you have not tried it, Measure Killer is a great tool to help with these types of tasks. It may not be the 100% answer but the data you get from it could be fed into AI for further disection.
Measure Killer Tool 
@Brunner_BI 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.