This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
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?
Many thanks.
Solved! Go to Solution.
@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
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,
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
)
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 25 | |
| 24 | |
| 22 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 43 | |
| 42 | |
| 41 | |
| 21 | |
| 21 |