I am trying to calculate the sum of all sales for the week for each item however the aggregator just returns 1 as the result.
In the array aggregator module I grouped by the product name.
In the tool:numeric aggregator I grouped by the array and the value the quantity sold.
I have played around with different options but still cannot get it right.
I managed to group the different products but cannot seem to sum up their quantities sold
Any ideas???
You can remove the Array Aggregator if that is something that will not be used later in the module.
There are two ways to do this,
- Remove the Array Aggregraor and then directly do the sum in Numeric Aggregator
- Use sum function in conjunction with map function on the array aggregator output
1 Like
Please elaborate on the second option
1 Like
I have a follow up question if you don’t mind. I am trying to pull sales for just the current month. I set a filter for the order date and the datetime operator: later than and this is what i se “{{setDate(now; 0)}}”. It seems to be getting the right date as I was it to be everything after the last date of the previous month but no bundles are outputted. Im not sure if it has to do with the dates on my spreadsheet but I doubt it. What could be the issue?