Disaggregating a table within Make

Hi,

I have a table on Google Sheets in this format (start date, end date, sales 1, sales 2)

The Search GSheet module on that table outputs two bundles (please ignore the “Jour (A)” and “Horaire (B)” keys).

After the Search Gsheet module I would like to perform a transformation so that the module(s) used in the transformation outputs 4 bundles in this way (e.g, disaggregating the data that is currently grouped by start date) :

How can I do this?

1 Like

Hi @Bennaim, After that you get those 2 bundles :

x Repeater module with starting at 1 and repeating 2 times.

There’s 2 methods : with text aggregator and split(), or array aggregator and merge().

Array aggregator method : use Router just after repeater with 2 branches, filter i=1 and i=2. Then put an array aggregator on both branches with source ‘sheet get range’, referencing columns a b c in one branch and a b d in second branch. in one of the branches, use ‘set variable’ module and declare the array from array aggregate. in second branch, call this variable with ‘get variable’. wherever you want to use this big array, write merge(array1,array2).


(ignore parse json and declare variable just before)

Text aggregator method : just after repeater, use text aggregator with
date1,date2,if(i=1;sales1;sales2) *
And then if you want to iterate over rows use iterator with split(value;*) and use get() function to get 1st 2nd or 3rd index of each row.

Hi @kudracha

thanks so much for your reply! this is amazing.

I still have a few more questions if you don’t mind. I opted for the Text aggregator method.

here is the input of the text agg.

And here’s the output:

Then in the iterator this is my input:

And here is the output:


I’m not so clear about what I should do next with the variable? Again my end goal is to have 4 bundles containing keys: Date1, Date 2 and Sales name
Also is there a way to have everything in one operation instead of two of them?

thanks you SO MUCH you are a life saver and you dont’ know it!