IF/AND/OR Assistance Needed!
I'm trying to pull up the number of product sales by Region. Region is a multi select column. t works perfect when there's only once instance of MEA - SA or MEA - ME but there's one instance where I have both MEA - ME and MEA - SA in the same cell. I'm struggling on how to combine all three options together. Essentially if Region has MEA - ME or MEA - SA or MEA-ME and MEA-SA.
This works perfect when Region has either one or the other:
=SUMIFS({Target # Sales}, {Month}, "January", {Region}, OR(@cell = "MEA - ME", @cell = "MEA - SA"), {Focus Products}, HAS(@cell, $[Focus Product]@row)
I tried this for all three instances but it then comes up as 0:
SUMIFS({Target # Sales}, {Month}, "January", {Region}, OR(AND(@cell = "MEA - ME", @cell = "MEA - SA")), {Focus Products}, HAS(@cell, $[Focus Product]@row))
Best Answers
-
You can try this formula instead
=SUMIFS({Target # Sales}, {Month}, "January", {Region}, OR(CONTAINS("MEA - ME", @cel), CONTAINS("MEA - SA", @cell)), {Focus Products}, HAS(@cell, $[Focus Product]@row))
Thanks,
Aravind GP| Principal Consultant
Atturra Data & Integration
M: +61493337445
E:Aravind.GP@atturra.com
W: www.atturra.com
-
Hi @AravindGP that works a treat! Thanks so much!! 😁
Answers
-
If I understand you correctly, you would like to get the total sales for MEA when you have MEA - ME and/or MEA - SA. Do you have other MEA values in your multi-select dropdown that should not be part of the calculation?
If not, you can use this formula.
=SUMIFS({Target # Sales}, {Month}, "January", {Region}, CONTAINS("MEA", @cel), {Focus Products}, HAS(@cell, $[Focus Product]@row)
Thanks,
Aravind GP| Principal Consultant
Atturra Data & Integration
M: +61493337445
E:Aravind.GP@atturra.com
W: www.atturra.com
-
Hi @AravindGP thanks so much but we also have EMEA as a Region so this doesn't work
-
You can try this formula instead
=SUMIFS({Target # Sales}, {Month}, "January", {Region}, OR(CONTAINS("MEA - ME", @cel), CONTAINS("MEA - SA", @cell)), {Focus Products}, HAS(@cell, $[Focus Product]@row))
Thanks,
Aravind GP| Principal Consultant
Atturra Data & Integration
M: +61493337445
E:Aravind.GP@atturra.com
W: www.atturra.com
-
Hi @AravindGP that works a treat! Thanks so much!! 😁
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!