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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Count rows in Power Query

Hi 

I want to add a new column in Power Query and count the number of PN in the new column.

I made a result in Excel table. could you teach me how to do it in power Query?

 

Thanks 

 

PeterWu_1-1653958190258.png

PeterWu_2-1653958228232.png

 

 

 

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

There should be different ways to do it, List.Count or Groupby then join, file attached for your reference

Vera_33_0-1653961275546.png

 

Vera_33_1-1653961287999.png

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Vera_33 

 

Sorry, One more question. If I want to get a percentage of the new column, for example it should be 33% in both AA1 and BB1. how should I do on the coding

Hi @Anonymous 

 

You mean you don't need count = 3, but percent instead? Buffer the list as well

Vera_33_0-1653974082939.png

 

Anonymous
Not applicable

Hi

 

Which way is more efficiency if I have huge data set?

Hi @Anonymous 

 

List, buffer the list first

Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

There should be different ways to do it, List.Count or Groupby then join, file attached for your reference

Vera_33_0-1653961275546.png

 

Vera_33_1-1653961287999.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors