<?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 Re: Divide dimension by Variable in a script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427875#M612256</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No probs Vish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate any help I get, not at work today, but i'll be back on this on Monday... cheers...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Oct 2017 23:35:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-26T23:35:26Z</dc:date>
    <item>
      <title>Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427869#M612250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi all,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This question is a continuation of a previous thread: &lt;A href="https://community.qlik.com/message/1368238"&gt;Re: Variable in Script - Assign Value based on If Statement&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I have a variable v12WeekAverageCalc that has been defined as follows: (Thanks to Vish's help&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; )&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;= Pick(vReportCurrent_Period, 24, 24, 24, 15, 15, 15, 18, 18, 18, 21, 21, 21)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This picks up the current financial period (defined in vReportCurrent_Period) from my database and assigns a predefined numerical value based on the current financial period.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Period 1,2,3 = 24&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Period 4,5,6 = 15&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Period 7,8,9 = 18&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Period 10,11,12 = 21&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I need to use these numerical values to calculate average QTY sales based on a number of months...&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;IMG alt="variable settings.JPG" class="jive-image image-2" src="/legacyfs/online/180812_variable settings.JPG" style="height: 543px; width: 620px;" /&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vReportCurrent_Period is defined as follows in another part of my script:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Period:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD "fin_year" as FinancialYear,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;"Period" as FinancialPeriod;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;SQL SELECT "fin_year", "Period"&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FROM PUB.perlive&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;where Module ='iv';&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LET vReportCurrent_FinYear = FieldValue('FinancialYear',1);&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LET vReportCurrent_Period =&amp;nbsp; FieldValue('FinancialPeriod',1);&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;DROP TABLE Period;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Both &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;v12WeekAverageCalc and vReportCurrent_Period are giving the correct output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Now I need to use &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;v12WeekAverageCalc in a calculation as follows.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;QTYSalesValueX / &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;v12WeekAverageCalc = 12WeekAvgQTYSales &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;here's my actual script for that section:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ISHRB12WeekAverageQtySales:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ISHRBSKU,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(ISHRB12WeekAvgQTYSales_temp / $(v12WeekAverageCalc)) as ISHRB12WeekAvgQTYSales&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident ISHRB12WeekAverageQtySales_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I need to display &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;ISHRB12WeekAvgQTYSales in my pivot chart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: inherit; font-size: 13.3333px; font-style: inherit; font-weight: inherit;"&gt;I am getting this error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-1368244-180810/variable script error.jpg" style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #3778c7;"&gt;&lt;IMG alt="variable script error.jpg" class="jive-image image-1" height="260" src="/legacyfs/online/180813_variable script error.jpg" style="border-width: 0px; font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;" width="870" /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Can anyone help??&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks in advance...&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Cheers,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Fab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 03:03:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427869#M612250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-25T03:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427870#M612251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you upload the sample here i will see what i can do. I do not need to run the data from database. Or if you can load all your fields you are pulling from your database and use table box to add all fields and send that to excel. Then upload your excel file if possible. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 23:41:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427870#M612251</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-10-25T23:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427871#M612252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK Vish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give me some time and I will do that shortly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again for your help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 23:45:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427871#M612252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-25T23:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427872#M612253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 23:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427872#M612253</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-10-25T23:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427873#M612254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a sample QVW and the data exported to XLS from a table object within my qvw. Thanks for suggesting that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay, this is the first time i've created a sample qvw... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just for your info, the final calculation i'm trying to achieve is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(((ISHRBPreviousYTDSaleTotals + ISHRBCurrentYTDSaleTotals) * 3) / $(v12WeekAverageCalc))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can scroll down to the bottom of the script where i was trying to get this to work..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have replaced $(v12WeekAverageCalc) with 15 for testing purposes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the excerpt fom that part of the script...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////Calculate 12 Week Average//////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT KEEP (ISHRBYTDQTYSales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISHRB12WeekAverageQtySales_temp:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;ISHRBSKU,&lt;/P&gt;&lt;P&gt;((ISHRBPreviousYTDSaleTotals + ISHRBCurrentYTDSaleTotals) * 3) as ISHRB12WeekAvgQTYSales_temp&lt;/P&gt;&lt;P&gt;Resident ISHRBYTDQTYSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISHRB12WeekAverageQtySales:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ISHRBSKU,&lt;/P&gt;&lt;P&gt;(ISHRB12WeekAvgQTYSales_temp / 15) as ISHRB12WeekAvgQTYSales&lt;/P&gt;&lt;P&gt;//(ISHRB12WeekAvgQTYSales_temp / $(v12WeekAverageCalc)) as ISHRB12WeekAvgQTYSales&lt;/P&gt;&lt;P&gt;Resident ISHRB12WeekAverageQtySales_temp;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;//DROP TABLE ISHRB12WeekAverageQtySales_temp;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;//Left Join (ISHRBYTDQTYSales)&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;//Load &lt;/P&gt;&lt;P&gt;//ISHRBSKU,&lt;/P&gt;&lt;P&gt;//(Round)ISHRB12WeekAvgQTYSales&lt;/P&gt;&lt;P&gt;//Resident ISHRB12WeekAverageQtySales;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;//DROP TABLE ISHRB12WeekAverageQtySales;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2017 01:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427873#M612254</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-26T01:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427874#M612255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need sometime to look into this. Ok.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2017 19:00:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427874#M612255</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-10-26T19:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427875#M612256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No probs Vish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate any help I get, not at work today, but i'll be back on this on Monday... cheers...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2017 23:35:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427875#M612256</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-26T23:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427876#M612257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok try these two scripts.&lt;/P&gt;&lt;P&gt;After below left keep. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have to do some changes to the variables. Like Ctrl+Alt+V&lt;/P&gt;&lt;P&gt;In your variable overview just change exactly to what you can see in the screen shot below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pick(Match($(i), 1,2,3,4,5,6,7,8,9,10,11,12), 24, 24, 24, 15, 15, 15, 18, 18, 18, 21, 21, 21) &lt;/P&gt;&lt;P&gt;OR &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pick($(i), 24, 24, 24, 15, 15, 15, 18, 18, 18, 21, 21, 21) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/181166_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LEFT KEEP (ISHRBYTDQTYSales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FOR i = 1 to $(vReportCurrent_Period)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISHRB12WeekAverageQtySales_temp:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;ISHRBSKU,&lt;/P&gt;&lt;P&gt;((ISHRBPreviousYTDSaleTotals + ISHRBCurrentYTDSaleTotals) * 3)/$(v12WeekAverageCalc) as ISHRB12WeekAvgQTYSales_temp&lt;/P&gt;&lt;P&gt;FROM [HRB Sample data.xls]&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Sheet1$);;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 1 to $(vReportCurrent_Period)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISHRB12WeekAverageQtySales:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ISHRBSKU,&lt;/P&gt;&lt;P&gt;(ISHRB12WeekAvgQTYSales_temp /$(v12WeekAverageCalc) ) as ISHRB12WeekAvgQTYSales&lt;/P&gt;&lt;P&gt;//(ISHRB12WeekAvgQTYSales_temp / $(v12WeekAverageCalc)) as ISHRB12WeekAvgQTYSales&lt;/P&gt;&lt;P&gt;Resident ISHRB12WeekAverageQtySales_temp;&lt;/P&gt;&lt;P&gt;Next;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know how it goes. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 01:09:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427876#M612257</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-10-27T01:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427877#M612258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have taken your suggestions and tried a few things...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this seems to have worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've changed the &lt;SPAN style="font-size: 13.3333px;"&gt;v12WeekAverageCalc &lt;/SPAN&gt;variable value to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pick(Match($(vReportCurrent_Period), 1,2,3,4,5,6,7,8,9,10,11,12), 24, 24, 24, 15, 15, 15, 18, 18, 18, 21, 21, 21) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And amended the script as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT KEEP (ISHRBYTDQTYSales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISHRB12WeekAverageQtySales_temp:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;ISHRBSKU,&lt;/P&gt;&lt;P&gt;((ISHRBPreviousYTDSaleTotals + ISHRBCurrentYTDSaleTotals) * 3) as ISHRB12WeekAvgQTYSales_temp&lt;/P&gt;&lt;P&gt;Resident ISHRBYTDQTYSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISHRB12WeekAverageQtySales:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ISHRBSKU,&lt;/P&gt;&lt;P&gt;(ISHRB12WeekAvgQTYSales_temp /$(v12WeekAverageCalc) ) as ISHRB12WeekAvgQTYSales&lt;/P&gt;&lt;P&gt;Resident ISHRB12WeekAverageQtySales_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE ISHRB12WeekAverageQtySales_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like it's working correctly... (I even tested changing the results to make sure it is working) &lt;/P&gt;&lt;P&gt;We will be going into a new financial period on wednesday, so we'll be able to run more checks...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your invaluable input...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 01:53:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427877#M612258</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-30T01:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427878#M612259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool sounds good. Cos i was not sure your expected output and also cant run the scripts so just gave what i tried. Good you figured it out and &lt;SPAN style="font-size: 13.3333px;"&gt;I am glad it worked for your with little changes.&lt;/SPAN&gt; Please close the thread accordingly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 13:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427878#M612259</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-10-30T13:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Divide dimension by Variable in a script</title>
      <link>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427879#M612260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Vish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would have never got it to work without your input...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 21:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Divide-dimension-by-Variable-in-a-script/m-p/1427879#M612260</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-30T21:51:14Z</dc:date>
    </item>
  </channel>
</rss>

