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
rosscortb
Post Patron
Post Patron

Countrows based on number

Hello,

 

I have the following formula that works but the result is wrong

 

Total Blue Collar = COUNTROWS(FILTER('DB Headcount','DB Headcount'[Cost Center Number] = 100000))
 
Cost Center Number is a whole number not text so how do I count the rows based on this numerical value please?
Thanks
 
Ross
1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi rosscortb,

According to your description, you seems to count rows which number is 100000 in table, right? This should work(if it is text, you need to write like below="100000"). What is your problem or error information? If possible, could you please inform me in details(your sample data and your expecting output)? Then I will help you more correctly.

Best Regards,
Zoe Zhi

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

5 REPLIES 5
dax
Community Support
Community Support

Hi rosscortb,

According to your description, you seems to count rows which number is 100000 in table, right? This should work(if it is text, you need to write like below="100000"). What is your problem or error information? If possible, could you please inform me in details(your sample data and your expecting output)? Then I will help you more correctly.

Best Regards,
Zoe Zhi

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

KHorseman
Community Champion
Community Champion

Can you explain what is wrong about the results you're getting? What result do you expect and what result are you getting?





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

Proud to be a Super User!




Hi,

 

It produces a result that is 1000 more than the answer

 

Thanks


Ross

@rosscortb how you are comparing that it is giving 1000 more than answer? Can you take smaller dataset to see if that works and go from there. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Can you give any other details about the data model? Are there other things filtering the data? Are you expectnig a count of all separate rows with that Cost Center Number or just a count of some particular member of the table? What kind of data is on this table? There simply aren't enough details here to guess what the problem could be.





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

Proud to be a Super User!




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