Sum Qty for each Due Date

Hey Guys,

I can’ seem to figure this out. Input is as follows:

BUNDLE 1
Product 1
Qty 10
DueDate A

BUNDLE 2
Product 2
Qty 20
DueDate A

BUNDLE 3
Product 3
Qty 5
DueDate B

I want to create the following output:

Total_Qty_DueDate A = 30
Total_Qty_DueDate B = 5

I have tried the Numeric Aggregator but it’s not Summing by DueDate. Any ideas? Thanks again!

You’ll need to aggregate the bundles into an array, before you can sum them using the map and sum functions:

Output

Screenshot_2023-11-10_151131

1 Like

Thank you so much for your reply. I have never used Map and Sum together!

However, to solve my problem, I needed to set the GroupBy field in the Aggregator correctly!! :slight_smile:
Now it groups all the qtys by Date and I can use the numeric agg on them!

Anyway all good now! Thanks

2 Likes

Hello there @Nick_B :wave:

I’m just stepping in to say congrats on getting this up and running :muscle:

Also, thanks a lot for remembering to circle back to the community and for sharing what did the trick for you. This is super valuable stuff and has the potential to help many folks looking for similar information in the future. :pray:

Just FYI: I marked your comment as a solution to keep the community organized and easy to search for answers

1 Like