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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
dd88
Post Patron
Post Patron

count rows with same value in the one column

I have a column Department, that contains all the organisation departments eg 


Deparment
Finance
Adminstration
Client Services
HR
Board
HR

HR
Finance
Finance
Finance
Technology


how can I count the total of each department in the 1 column

 

TIA

2 ACCEPTED SOLUTIONS

Hi,

In Power Query, create another tables with the unique departments.  Create a relationship (Many to One and Single) from your Fact tables to the new tables.  To a Table visual, drag Department from the new table.  Write this measure

Count = countrows(Data)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Hy @dd88 
You can get your desired output by this simple measure.

 

muhammad_786_1_0-1724470067723.png

 

Best Regards,
Muhammad Yousaf

 

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

 

Follow on LinkedIn

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @dd88 

 

Have you solved your problem? If so, could you please mark the helpful replies as Answered to close this topic and that can help other members find it faster?

If not, could you please share your data(exclude sensitive data), or create some sample data, and your target outcome, so that we can help you better.

Thank you very much for your kind cooperation.

 

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.

bhanu_gautam
Super User
Super User

@dd88 , You can create a measure using below 

 

DepartmentCount = COUNTROWS(VALUES(DepartmentsTable[Department]))



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






thank you @bhanu_gautam 

 

The result is a total departments ie 9

 

I would like to count the total of each department in the 1 column eg using the above data

Department column

Adminstration = 1

Board = 1
Client Services = 1

Finance = 4

HR = 2

Technology = 1

 

TIA

 

 

 

 

Hy @dd88 
You can get your desired output by this simple measure.

 

muhammad_786_1_0-1724470067723.png

 

Best Regards,
Muhammad Yousaf

 

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

 

Follow on LinkedIn

Hi,

In Power Query, create another tables with the unique departments.  Create a relationship (Many to One and Single) from your Fact tables to the new tables.  To a Table visual, drag Department from the new table.  Write this measure

Count = countrows(Data)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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