Google-sheets – How to use FLATTEN function in query function

formulasgoogle sheetsgoogle-sheets-arrayformulagoogle-sheets-query

Below in my query result:

Snapshot of Google Sheets

In the above table "Form Response" table is the response received in Google Sheets from Google Form.
I want to convert "Form Response" table to "Desired Result" Table.
I used FLATTEN & SPLIT functions to convert column Card data with one name in one cell.
I manually entered Timestamp date in Desired Result Table.

I need the Timestamp information automatically in Desired Table

Best Answer

You can use

={"Timestamp","Card"; 
  INDEX(FLATTEN(SPLIT(REPT(QUERY(A2:A," where A is not null ",0)&"@",3),"@"))),
  INDEX(FLATTEN(SPLIT(QUERY(B2:B," where B is not null ",0),",")))}

enter image description here

Functions used: