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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Alirezam
Helper V
Helper V

How to count number of columns in Power Query Editor

Hey,

This might be a rather boring (read stupid) question, I am dealing with a large file coming in more than 100 columns but I want to know exactly how many columns I am importing into the Power Bi. How can I count them as the Max. showing on the bottom left of the page is frozen at 60.

Thanks

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Alirezam 

In Power Query you can use the Table.ColumnCount function. So if you load your main data into a table called Table, create a blank query called ColumnCount and use this code in it

let
    Source = Table.ColumnCount(Table)
in
    Source

ccount.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

This is what I was looking for . Thank you for the solution.

PhilipTreacy
Super User
Super User

Hi @Alirezam 

In Power Query you can use the Table.ColumnCount function. So if you load your main data into a table called Table, create a blank query called ColumnCount and use this code in it

let
    Source = Table.ColumnCount(Table)
in
    Source

ccount.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.