Search code examples
domo

Getting dates in one row


I am working on the data visualizer and have the data as below

order Model ord date rec date cur prm prm date -7D prm date -14 D prm date -28 D
B67189 mcx2134 9/24/2021 6/7/2022 6/9/2022 6/9/2022
B67189 mcx2134 9/24/2021 5/31/2022 6/2/2022
B67189 mcx2134 9/24/2021 5/17/2022 6/2/2022

The columns order,model, ord date, rec date,cur prm come from the DOMO workbench while the columns prm date -7D, prm date -14 D, prm date -28 D come from the beast mode...

I am trying to get the above data in the format below...Can you please help here.

order Model ord date rec date 1 rec date 2 rec date 3 cur prm prm date -7D prm date -14D prm date -28D
B67189 mcx2134 9/24/2021 5/17/2022 5/31/2022 6/7/2022 6/9/2022 6/9/2022 6/2/2022 6/2/2022

Solution

  • I think you are looking for the pivot and unpivot feature in Magic ETL. You will probably need to add your beast modes to the ETL as well before you use the pivot feature using the "Add Formula" tile:

    Pivot/Unpivot: https://domohelp.domo.com/hc/en-us/articles/360044951294-New-Magic-ETL-Tiles-Pivot

    Add Formula: https://domohelp.domo.com/hc/en-us/articles/360044258533-Writing-Formulas-in-the-New-Magic-ETL