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 dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |