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 all,
I have a table with similar data structure as below. I'd like to add anothe column which tells me if only one of the values in columns Num1 or Num2 is negative (rows 3 & 4 in the table below). Is there any way to do this with operators? So something like OR combined with NOT AND?
| ID | Num1 | Num2 | 
| 1 | 10 | 0 | 
| 2 | -4 | -4 | 
| 3 | -2 | 8 | 
| 4 | 100 | -0.5 | 
Thanks,
PDG
Hi @amitchandak,
Unfortunatelly your answer is not correct as this will return 1 in case of the 2nd row where both of the values are nagtive. Again, I'm only curious in rows where ONLY 1 of the values is negative.
Please read the description more carefully before answering a question.
Thanks,
PDG
No worries, that's all right!
Your solution is correct and now it's my turn to apologise as I wasn't 100% clear with my question.
I'm looking for a more general solution because the above works fine in this specific case however gets complicated if you have not 2 but 3 or more columns to compare.
Any idea how to make this more simple/general/suitable for comapring more numbers?
Thanks
 
					
				
				
			
		
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 | 
|---|---|
| 84 | |
| 49 | |
| 36 | |
| 31 | |
| 30 |