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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
PPStar
Helper V
Helper V

How to do a row count before any ETL is applied

Hello. 

I have a table which has lotw of merges. I want do a row count BEFORE all the merges.  How can i acheve this ?
Ideally, if we could do a row count on an applied step, then i could just do a row Count on a step, but i dont think this is possible. 

 

I tried to add a step BEFORE all the merges steps, this worked, but then when i clicked on the merge step after, I  got an error about unable to convert value to a table or something. 

2 ACCEPTED SOLUTIONS
danextian
Super User
Super User

hi @PPStar 

It depends on the kind of row count you want - count by summarizing the table or count by creating a custom column.
Custom column:

danextian_0-1737372392400.png

Summarized Table

danextian_1-1737372472134.png

Grouping all rows as a table without aggregation and then counting the rows of each table in the Grouped column

danextian_2-1737372585131.png

Please see the attached sample pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

Anonymous
Not applicable

Hi @PPStar 

 

As a alternative workaround, maybe you can try to use the COUNTROWS() function to store this value as a measure:

COUNTROWS function (DAX) - DAX | Microsoft Learn

 

By the way, if this result is incorrect in the next steps, you can duplicate the table, then delete the subsequent steps and use measure to count.

vzhengdxumsft_0-1737440723573.png

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

hi @PPStar 

It depends on the kind of row count you want - count by summarizing the table or count by creating a custom column.
Custom column:

danextian_0-1737372392400.png

Summarized Table

danextian_1-1737372472134.png

Grouping all rows as a table without aggregation and then counting the rows of each table in the Grouped column

danextian_2-1737372585131.png

Please see the attached sample pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ilya_K
Frequent Visitor

Maybe this will help.

Select Column Profile in View Section.

Make Column profiling based on entire dataset

Select any column and make sure you are on desired step.

Ilya_K_0-1737367854771.png

 

 

Thanks. 

I need to store this value as a measure..  Is that possible?

Anonymous
Not applicable

Hi @PPStar 

 

As a alternative workaround, maybe you can try to use the COUNTROWS() function to store this value as a measure:

COUNTROWS function (DAX) - DAX | Microsoft Learn

 

By the way, if this result is incorrect in the next steps, you can duplicate the table, then delete the subsequent steps and use measure to count.

vzhengdxumsft_0-1737440723573.png

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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