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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

Is Row wise COUNTIF possible in powerBI?

 

Hey everyone,

 

I need a power BI equivalent of excel COUNTIF function, like in the image attached below DAX should be row wise.

 

Any ideas?

 

IsPossible.PNG

 

Many thanks.

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Anonymous

 

In your scenario, you need to check columns from Sales to Profit. There's no ":" to select multiple columns in DAX, you have to apply condition on all columns in your calculated column like below:

 

Column=
IF (
    Table[Sales] = 0
        || Table[Quantity] = 0
        || Table[Discount] = 0
        || Table[Profit] = 0,
    1,
    0
)

Regards,

 

View solution in original post

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Anonymous

 

In your scenario, you need to check columns from Sales to Profit. There's no ":" to select multiple columns in DAX, you have to apply condition on all columns in your calculated column like below:

 

Column=
IF (
    Table[Sales] = 0
        || Table[Quantity] = 0
        || Table[Discount] = 0
        || Table[Profit] = 0,
    1,
    0
)

Regards,

 

Anonymous
Not applicable

Yes, just you do it differently.  You would count each column separately.  Here is an example for you:

 

CountIFLike = CALCULATE(
	countrows('MyTable'),
	not 'Mytable'[MyField] = 0
)

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.