<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Multiplying/Dividing fields within QlikView script editor (Beginner Question) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiplying-Dividing-fields-within-QlikView-script-editor/m-p/244802#M1206037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sam,&lt;/P&gt;&lt;P&gt;To join both table you have to have an identical field, I design a sample of your code as fellow,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;[Ledger_Balances]:&lt;BR /&gt;SQL SELECT&lt;BR /&gt; [nb_accode],&lt;BR /&gt; [nb_openbal],&lt;BR /&gt; [nb_period1],&lt;BR /&gt; [nb_period2],&lt;BR /&gt; [nb_period3]&lt;BR /&gt;FROM Berlin.dbo.ledbals;&lt;BR /&gt;LEFT JOIN (Ledger_Balances)&lt;BR /&gt;LOAD&lt;BR /&gt; [nb_accode],&lt;BR /&gt; MAY As FXrate[MAY],&lt;BR /&gt; JUN As FXrate[JUN],&lt;BR /&gt; JUL As FXrate[JUL],&lt;BR /&gt; AUG As FXrate[AUG]&lt;BR /&gt;FROM &lt;C&gt; (biff, embedded labels, table is Sheet1$);&lt;BR /&gt;&lt;BR /&gt;LedBal:&lt;BR /&gt;LOAD&lt;BR /&gt;nb_accode,&lt;BR /&gt;(nb_openbal / FXrate[MAY]) +&lt;BR /&gt;(nb_period1 / FXrate[MAY]) +&lt;BR /&gt;(nb_period2 / FXrate[JUN]) +&lt;BR /&gt;(nb_period3 / FXrate[JUL]) +&lt;BR /&gt;(nb_period4 / FXrate[AUG]) as [Berlin Ledger Bals YTD]&lt;BR /&gt;RESIDENT Ledger_Balances;&lt;BR /&gt;&lt;BR /&gt;drop table Ledger_Balances;&lt;BR /&gt;&lt;/C&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;BR /&gt;Shumail Hussain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Feb 2010 14:34:20 GMT</pubDate>
    <dc:creator>shumailh</dc:creator>
    <dc:date>2010-02-25T14:34:20Z</dc:date>
    <item>
      <title>Multiplying/Dividing fields within QlikView script editor (Beginner Question)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiplying-Dividing-fields-within-QlikView-script-editor/m-p/244801#M1206036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Hi All&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;I'm new to this forum and to QlikView, I've searched for a similar post to my query but am unable to find one. This a simple question so hopefully someone can help.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;I'm currently pulling in one table from one of our overseas office's database that contains the following fields, which are all of the ledger balances at each period month end:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;[Ledger Balances]:&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;SQL SELECT&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;"nb_accode",&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;"nb_openbal",&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;"nb_period1",&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;"nb_period2",&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;"nb_period3",&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;"nb_period4",&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;etc…&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;The other data I'm pulling in is the € to £ Exchange rate for each of the Periods (standard excel table format):&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;[FX Rates]:&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;LOAD&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;MAY As FXrate[MAY],&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;JUN As FXrate[JUN],&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;JUL As FXrate[JUL],&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;AUG As FXrate[AUG],&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;etc...&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;What I want to do is divide each month end balance by the exchange rate and then sum the total for the year to date value in £. I know it's possible to do the calculations within the QlikView front end desktop, but I would rather do it within the script, as we have several overseas offices all running a separate database so I would just want 1 field called [*Office* Ledger Bals YTD] for each office. I'm sure the script will look something like this but I can't be sure as I'm very new to the QlikView scripting:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;[Ledger Balances]:&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;SQL SELECT&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;"nb_accode",&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_openbal" / "FXrate[MAY]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period1" / "FXrate[MAY]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period2" / "FXrate[JUN]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period3" / "FXrate[JUL]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period4" / "FXrate[AUG]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period5" / "FXrate[SEP]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period6" / "FXrate[OCT]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period7" / "FXrate[NOV]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period8" / "FXrate[DEC]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period9" / "FXrate[JAN]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period10" / "FXrate[FEB]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period11" / "FXrate[MAR]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period12" / "FXrate[APR]") +&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;("nb_period13" / "FXrate[APR]") As [Berlin Ledger Bals YTD],&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;FROM Berlin.bdo.ledbals&lt;BR style="margin: 0cm 0cm 0pt;" /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2010 14:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiplying-Dividing-fields-within-QlikView-script-editor/m-p/244801#M1206036</guid>
      <dc:creator />
      <dc:date>2010-02-25T14:03:33Z</dc:date>
    </item>
    <item>
      <title>Multiplying/Dividing fields within QlikView script editor (Beginner Question)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiplying-Dividing-fields-within-QlikView-script-editor/m-p/244802#M1206037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sam,&lt;/P&gt;&lt;P&gt;To join both table you have to have an identical field, I design a sample of your code as fellow,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;[Ledger_Balances]:&lt;BR /&gt;SQL SELECT&lt;BR /&gt; [nb_accode],&lt;BR /&gt; [nb_openbal],&lt;BR /&gt; [nb_period1],&lt;BR /&gt; [nb_period2],&lt;BR /&gt; [nb_period3]&lt;BR /&gt;FROM Berlin.dbo.ledbals;&lt;BR /&gt;LEFT JOIN (Ledger_Balances)&lt;BR /&gt;LOAD&lt;BR /&gt; [nb_accode],&lt;BR /&gt; MAY As FXrate[MAY],&lt;BR /&gt; JUN As FXrate[JUN],&lt;BR /&gt; JUL As FXrate[JUL],&lt;BR /&gt; AUG As FXrate[AUG]&lt;BR /&gt;FROM &lt;C&gt; (biff, embedded labels, table is Sheet1$);&lt;BR /&gt;&lt;BR /&gt;LedBal:&lt;BR /&gt;LOAD&lt;BR /&gt;nb_accode,&lt;BR /&gt;(nb_openbal / FXrate[MAY]) +&lt;BR /&gt;(nb_period1 / FXrate[MAY]) +&lt;BR /&gt;(nb_period2 / FXrate[JUN]) +&lt;BR /&gt;(nb_period3 / FXrate[JUL]) +&lt;BR /&gt;(nb_period4 / FXrate[AUG]) as [Berlin Ledger Bals YTD]&lt;BR /&gt;RESIDENT Ledger_Balances;&lt;BR /&gt;&lt;BR /&gt;drop table Ledger_Balances;&lt;BR /&gt;&lt;/C&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;BR /&gt;Shumail Hussain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2010 14:34:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiplying-Dividing-fields-within-QlikView-script-editor/m-p/244802#M1206037</guid>
      <dc:creator>shumailh</dc:creator>
      <dc:date>2010-02-25T14:34:20Z</dc:date>
    </item>
    <item>
      <title>Multiplying/Dividing fields within QlikView script editor (Beginner Question)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiplying-Dividing-fields-within-QlikView-script-editor/m-p/244803#M1206038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Shumail&lt;/P&gt;&lt;P&gt;Your answer worked first time, thank you again for the quick response.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2010 15:34:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiplying-Dividing-fields-within-QlikView-script-editor/m-p/244803#M1206038</guid>
      <dc:creator />
      <dc:date>2010-02-25T15:34:36Z</dc:date>
    </item>
  </channel>
</rss>

