1 Reply Latest reply: Sep 7, 2011 1:29 PM by Fernando Obara Suzuki RSS

    Script reuse

      Hey people,


      I am trying to build a dashboard which could get the table from some database updated every month. So I have loaded the data of last three month like the chart below:

      My script is like



      LOAD Date,

           June AS M1,

           July AS M2,

           August AS M3



      (biff, embedded labels, table is Sheet1$);


      However, the Loading is hard coded. Thus if i want to reload the data table test1 this month, which is updated with information of July, August and Septmber, my reload will fail.


      Wondering if there is a way that I can make it work monthly?


      Thanks in advance!




        • Script reuse
          Fernando Obara Suzuki



          for the dynamic months, I think you can use something like this:


          let M3 = date(today(), 'MMMM');

          let M2 = date(addmonths(today(), -1), 'MMMM');

          let M1 = date(addmonths(today(), -2), 'MMMM');


          load Date,

                 $(M3) as M3,

                 $(M2) as M2,

                  $(M1) as M1

          FROM test1.xls (biff, embedded labels, table is Sheet1$);




          Hope this helps you.