8 Replies Latest reply: Mar 3, 2010 6:31 AM by Artjoms Tukums RSS

    Seript Variables issue

      I have the following sameple LOAD script, where I am loading amounts in 3 currencies. I want to allow the user to select the currency being reported by selecting the ReportCurrency value in a list box (with Always One Selected Value set).

      Currency:
      LOAD * INLINE [
      DisplayCurrency,ReportCurrency
      EUR, eur
      USD, usd
      GBP, gbp
      ];

      Deals:
      LOAD * INLINE [
      amount_gbp, amount_usd, amount_eur
      100,150,110
      200,300,220
      ];

      SET Vol = '=SUM(amount_$(ReportCurrency))';

       

       

       

       

       

       

       

       

       



       

       

       

       

      The YTDVol script variable seems to evaluate at script run time and does not recognise $(ReportCurrency). If I create a Document Variable as:

       

      =

      SUM(amount_$(=ReportCurrency))





      this works OK in chart expressions, but not if I use the Vol variable set in the load script.

       

      I've tried various syntaxes without luck yet. Can anyone help?

       

      Thanks

      Dan