• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

A way to know how many rows are there in a Power Query spreadsheet.|Power Query|Excel Forum|My Online Training Hub

You are here: Home / A way to know how many rows are there in a Power Query spreadsheet.|Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower QueryA way to know how many rows are the…
sp_PrintTopic sp_TopicIcon
A way to know how many rows are there in a Power Query spreadsheet.
Avatar
Caio Oliveira

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
November 1, 2021
sp_UserOfflineSmall Offline
1
November 1, 2021 - 5:31 am
sp_Permalink sp_Print

Hello people. I'm new at using Power Query and I'm having a problem. As I need to work with a huge spreadsheet - more than 2 million rows - I wish to know how many of rows there are. Dou you know how can I do that? Thanks.

sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4448
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
November 1, 2021 - 9:49 am
sp_Permalink sp_Print

Power Query only shows you a preview of the first 1000 rows of the data. It does this so that it can be responsive when working in the query editor. If you want to get a row count, you can choose any column that doesn't contain blanks or nulls, and on the Transform tab choose Statistics > Count Values. This will give you the row count. You can then delete the step to revert back to the previous view.

Mynda

sp_AnswersTopicAnswer
Answers Post
Avatar
k s
Member
Members
Level 0
Forum Posts: 12
Member Since:
December 8, 2020
sp_UserOfflineSmall Offline
3
March 10, 2023 - 5:34 am
sp_Permalink sp_Print

I just discovered you can also see the total without inserting a step by changing the profile to operate over the entire dataset: In the lower-left corner of your editor, select either "Column profiling based based on entire data set".  

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4448
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
March 10, 2023 - 11:46 am
sp_Permalink sp_Print

This is ok for small tables, but I wouldn't do that on tables with upwards of hundreds of thousands of rows.

Avatar
k s
Member
Members
Level 0
Forum Posts: 12
Member Since:
December 8, 2020
sp_UserOfflineSmall Offline
5
March 10, 2023 - 11:17 pm
sp_Permalink sp_Print

Why would that be?  Isn't it essentially doing the same thing with the profile as with the count step?

(I've never been able to use power query for very tables anyway. The power queries I've managed to construct with unpivoting/pivoting are unusably slow for anything over ~2-10,000 rows)

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4448
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
6
March 11, 2023 - 9:31 am
sp_Permalink sp_Print

The Power Query editor gives you a 1000 row snapshot of the data. It does this to enable it to remain agile when you perform steps on the data in the editor. If you force it to reference the entire dataset while building your queries, it has to process each step on the entire dataset as you're working in the editor. Whereas, in the default setting of showing just 1000 rows, it only processes the steps on the entire dataset upon Close & Load.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: RAQUEL ACION, Dana Friedt, Shawn Barwick, Nada Perovic, Uwe von Gostomski
Guest(s) 11
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
terimeri dooriyan
Jack Aston
AndyC
Denise Lloyd
michael serna
mashal sana
Tiffany Kang
Leah Gillmore
Sopi Yuniarti
LAFONSO HERNANDEZ
Forum Stats:
Groups: 3
Forums: 24
Topics: 6218
Posts: 27266

 

Member Stats:
Guest Posters: 49
Members: 31901
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.