4 Replies Latest reply: Dec 1, 2017 9:57 AM by Simone Trabattoni RSS

    For loop and crosstable() ?

    Simone Trabattoni

      Hi community!

      Hi have some data whom are in this way:

       

      load*inline

      [product, from, to, label, place

      a,2015,2016,alfa, x

      b,2014,2017,beta, y

      ]

      ;

       

      I need a result like this and I suppose I need a crosstable() in a for loop:

       

      product label place  date

      a           alfa   x        2015

      a           alfa   x        2016

      b           beta  y       2014

      b           beta  y       2015

      b           beta  y       2016

      b           beta  y      2017

       

      As you can see the span of the date is variable, so I'm not able to do a proper for loop mixed a crosstable I suppose.

      Thanks in advance