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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ConnieMaldonado
Responsive Resident
Responsive Resident

Column or Measure used in a formula

I took over a report from a colleague laid off due to Covid.  The report is pretty extensive with over 100 columns and measures.  Is there anyway to determine if a measure or column is used in a formula anywhere in the report?  Is there a way to export all the formulas?  Thanks!

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @ConnieMaldonado ,

 

Export all formulas:

1) Get yourself DAX Studio from here: https://daxstudio.org/

2) Once you connect to a PBIX model using DAX Studio, you will be able to see your 'localhost' number at the bottom right of the app window.

3) Use this localhost number in the following M within a new query in your PBIX (where you can currently see 57131):

= OleDb.Query("Provider=MSOLAP.8;Data Source=localhost:57131;Update Isolation Level=2",
"SELECT * 
FROM $SYSTEM.MDSCHEMA_MEASURES
WHERE MEASURE_AGGREGATOR = 0")

This will give you the full measure output of your PBIX.

For just Table Name, Measure Name, Measure DAX output, use this M (remember to swap your localhost number):

= OleDb.Query("Provider=MSOLAP.8;Data Source=localhost:53931;Update Isolation Level=2",
"select 
   MEASUREGROUP_NAME, 
   MEASURE_NAME, 
   EXPRESSION
from $SYSTEM.MDSCHEMA_MEASURES
where MEASURE_AGGREGATOR = 0")

 

Find if/where measures/columns are used:

1) Get yourself a copy of @ImkeF 's PBI Cleaner Tool from here: https://www.thebiccountant.com/2020/01/01/tidy-up-power-bi-models-with-the-power-bi-cleaner-tool/

The download link is right at the bottom, but the page also includes super-useful instructions.

2) Follow setup instructions and enjoy!

 

Both the items I've recommended here (DAX Studio, PBI Cleaner) have far broader applications than your use-case, so I would recommend spending some time with them, but they are also the best things to quickly get done what you need to get done.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
ConnieMaldonado
Responsive Resident
Responsive Resident

Wow!  Awesome.  Thank you.

BA_Pete
Super User
Super User

Hi @ConnieMaldonado ,

 

Export all formulas:

1) Get yourself DAX Studio from here: https://daxstudio.org/

2) Once you connect to a PBIX model using DAX Studio, you will be able to see your 'localhost' number at the bottom right of the app window.

3) Use this localhost number in the following M within a new query in your PBIX (where you can currently see 57131):

= OleDb.Query("Provider=MSOLAP.8;Data Source=localhost:57131;Update Isolation Level=2",
"SELECT * 
FROM $SYSTEM.MDSCHEMA_MEASURES
WHERE MEASURE_AGGREGATOR = 0")

This will give you the full measure output of your PBIX.

For just Table Name, Measure Name, Measure DAX output, use this M (remember to swap your localhost number):

= OleDb.Query("Provider=MSOLAP.8;Data Source=localhost:53931;Update Isolation Level=2",
"select 
   MEASUREGROUP_NAME, 
   MEASURE_NAME, 
   EXPRESSION
from $SYSTEM.MDSCHEMA_MEASURES
where MEASURE_AGGREGATOR = 0")

 

Find if/where measures/columns are used:

1) Get yourself a copy of @ImkeF 's PBI Cleaner Tool from here: https://www.thebiccountant.com/2020/01/01/tidy-up-power-bi-models-with-the-power-bi-cleaner-tool/

The download link is right at the bottom, but the page also includes super-useful instructions.

2) Follow setup instructions and enjoy!

 

Both the items I've recommended here (DAX Studio, PBI Cleaner) have far broader applications than your use-case, so I would recommend spending some time with them, but they are also the best things to quickly get done what you need to get done.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 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.