Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi, I have a table as below
| ProductCode | C_Alert | R_Alert | 
| 101 | 1 | 0 | 
| 102 | 7 | 0 | 
| 103 | 0 | 0 | 
| 104 | 0 | 5 | 
| 105 | 0 | 0 | 
| 106 | 0 | 8 | 
| 107 | 3 | 0 | 
| 108 | 0 | 0 | 
I need the count of ProductCode with below 2 condition 
- C_Alert >0 OR R_Alert>0
- C_Alert=0 AND R_Alert=0
So, the result I am expecting is Count as 5 with OR condition and Count as 3 with AND condition.
Can someone please help with a proper DAX for my requirement. I have tried to get the count by unable to use OR/AND conditions.  
something like:
@SivaMikkilineni 
Assuming ProductCode is a primary key in the table you can use
=
COUNTROWS ( FILTER ( 'Table', 'Table'[C_Alert] > 0 || 'Table'[R_Alert] > 0 ) )=
COUNTROWS ( FILTER ( 'Table', 'Table'[C_Alert] = 0 && 'Table'[R_Alert] = 0 ) )Please let me know if otherwize
Hi @tamerj1 
Thanks for the reply, but can I get the result within a single DAX ?
Result should give me the ProductCount according to OR/AND condition
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | 
| User | Count | 
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 10 | |
| 9 |