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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
afarbod
Frequent Visitor

need help to write a formula to count a specific number that is repeated and showing up in a column

I have a table that looks like this, below, the column ORder shows numbers.  What I am interested in is to write a formula to look in the Order column and count the number of times the number "4" appears.   

CustomerDescriptionOrder
ALogs pulled7
BPartial logs4
C Partial at 8- %4
dNo Logs3
3 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @afarbod 

Try a measure :

count_4 = CALCULATE(COUNTROWS('Table'),'Table'[Order]=4)
Ritaf1983_0-1702310549300.png

pbix is attached 

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Thank you so much for your quick response.   for some reason, I keep getting 1 for the result, not sure if that has something to do with my table below

afarbod_0-1702316198397.png

my formula  : 

return new account value = CALCULATE(COUNTROWS('Table_enumLogStatus'), Table_enumLogStatus[Order]=4)
I keep getting 
afarbod_1-1702316269970.png

 

 

View solution in original post

Glad to help @afarbod ☺️

please consider Accepting my post as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

5 REPLIES 5
Ritaf1983
Super User
Super User

Hi @afarbod 

Try a measure :

count_4 = CALCULATE(COUNTROWS('Table'),'Table'[Order]=4)
Ritaf1983_0-1702310549300.png

pbix is attached 

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you so much for your quick response.   for some reason, I keep getting 1 for the result, not sure if that has something to do with my table below

afarbod_0-1702316198397.png

my formula  : 

return new account value = CALCULATE(COUNTROWS('Table_enumLogStatus'), Table_enumLogStatus[Order]=4)
I keep getting 
afarbod_1-1702316269970.png

 

 

Hi @afarbod 
Please share a link to dummy pbix and I'll try to help

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you again, I think I figured out what I was doing wrong, I used your formula and worked.   Thank you so much

Glad to help @afarbod ☺️

please consider Accepting my post as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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.

Top Solution Authors