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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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