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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Countif in PowerBI

Hi all,

 

I see that there is no countif in PowerBI.

Is there an alternative?

In excel I have applied the formula '=COUNTIF(B6:CN6,">0")'

In PowerBI I am not sure on how to do it.

Can I know how to implement that?

 

Any help is appreciated!

 

Thank you!

Megha

1 ACCEPTED SOLUTION
jaideepnema
Solution Sage
Solution Sage

Hi @Anonymous ,
Create a measure like this 

Count = CALCULATE(COUNT(TableName[ColumnName]),TableName[ColumnName]>0)
 
Replace tablename and columnname accordingly
 

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

Connect with me on LinkedIn: https://www.linkedin.com/in/jaideepnema/

View solution in original post

2 REPLIES 2
Whitewater100
Solution Sage
Solution Sage

Hello:

The COUNTIF in DAX can be done several ways. It depends on how you set up your model and what tables relate to eachother.

 

If you only have a single table it can also be handled with this:

 

Confirmed = COUNTROWS(
Filter(
TableName,
TableName[Column that has the info you are counting] = "What you are counting in that column")
 
If it's a number field than you don't need the "   ".
)
jaideepnema
Solution Sage
Solution Sage

Hi @Anonymous ,
Create a measure like this 

Count = CALCULATE(COUNT(TableName[ColumnName]),TableName[ColumnName]>0)
 
Replace tablename and columnname accordingly
 

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

Connect with me on LinkedIn: https://www.linkedin.com/in/jaideepnema/

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.