Forum Discussion

wooand's avatar
wooand
Helper II
8 years ago
Solved

Aggregate alternate rows

OK, so this one has me totally stumped.   I have a list of swap transactions, where financial instruments are exchanged on day one, and are swapped back on day x at the end of the term.    For ea...
  • MarkS's avatar
    8 years ago

    Hi wooand,

     

    To get the second line of data you could try this pattern.

    1. Add a new index column starting at 1

    2. Add another new index column starting at 0

    3. Merge Query -  using the same table (left outer join)  merge on the index columns (first index column from the table shown on the top with the second index column from the table on the bottom.

    4. Transform one of the index columns with modulo 2 (from the standard math transformations)

    5. Filter out that column on 1

    6. Expand the table

     

    MarkS