Hello
I have two data sources per customer:
1) sales data, where total per customer per month is positive
Customer | Total sales per month |
A | 200 |
B | 300 |
C | 100 |
2) sales data, where I have sales line items per customer, where data has negative value
Customer | Sales line items |
A | -250 |
B | -100 |
C | -90 |
C | -50 |
The rule is: I can add line items to the data no 1 only if the value of added itels is higher than 0 per customer.
So for:
Customer A, I cannot add data from source 2 as the total will be lower than 0
Customer B, I cann add data as total will not be less than 0
Customer C, I can add only the first line item as this will be making the total >0
Is there any way to have thnis logic implemented?
Solved! Go to Solution.
What's the meaning of "add line items to the data"? Could you show your expected output?
Hi @Kingazawora
As said above it's not too clear what you'd like but I've taken a stab that involves joining first and filtering out rows based on your condition afterwards, using the multi-row to evaluate rows one at a time when there are multiple.
When the total for the month (sales data 1) per customer is positive, I can add data from sales from the table 2 but only those that I add and the total of 1 sth table will not be >0.