Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
38 | |
31 | |
27 |
User | Count |
---|---|
91 | |
50 | |
44 | |
40 | |
35 |