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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PeterWu
Frequent Visitor

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 @PeterWu 

 

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
PeterWu
Frequent Visitor

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 @PeterWu 

 

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

Vera_33_0-1653974082939.png

 

PeterWu
Frequent Visitor

Hi

 

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

Hi @PeterWu 

 

List, buffer the list first

Vera_33
Resident Rockstar
Resident Rockstar

Hi @PeterWu 

 

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors