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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Medmbchr
Helper IV
Helper IV

Detect used columns

Hi

 

I think my question is quite silly but I will post anyways.

 

I have 30+ tables with 100+ columns in each table, due to the nature of the project we had to get all columns at first and then since we didn't know which columns to use at first.

 

Now that the project is at an end, I would like to rewrite my SQL code in data source so I can import only used columns. The exercise is hard since I need to check all formulas etc to know which columns have been used.

 

However, I am wondering if there is a way to "detect" only columns that are used or the inverse (detect columns that are not used) in Power Query or such.

 

Regards

3 REPLIES 3
ppm1
Solution Sage
Solution Sage

You can also use DAX Studio to connect to your published dataset (if you have Premium), and "View Metrics" and look at the Temperature column to see how much it is used.

Model Metrics | DAX Studio

 

Pat

Microsoft Employee
Arul
Super User
Super User

@Medmbchr ,

try measure killer - https://en.brunner.bi/measurekiller

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


Adamboer
Responsive Resident
Responsive Resident

Yes, it is possible to detect the columns that are used or not used in Power Query. Here are the steps you can follow:

  1. Load all the tables into Power Query.
  2. Combine all the tables into a single table using the "Append Queries" function.
  3. Use the "Remove Columns" function to remove any columns that you know are not needed.
  4. Add a custom column that uses the "Expression Dependency" function to detect which columns are used in the formulas. For example, you can use the following expression to detect if the column "Column1" is used in any formula:

Expression.Dependency([Column2]) = {#"Column1"}

  1. Expand the custom column to see which columns are used in the formulas.
  2. Remove any columns that are not used in any formula.

Alternatively, you can use the "Formula Firewall" feature in Power Query to detect any formulas that reference columns that are not present in the data source. This can help you identify any columns that are not used.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors