Hi all,
I am trying to create a column that will sum two other columns based off a condition & cannot seem to get it correct. for example heres what the data looks like:
CustomerID Product Sales Sales2
1 fruit 500
2 veggi 100 200
3 veggi 50 200
4 fruit 150
the goal is create a column called sales3 that when the product = fruit it will return the Sales column and when the product = veggi it will only return sales2 column.
what is the best way to achieve this?
thank you
Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.