<?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: Help with debugging script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589170#M685428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;Thank you. Sorry, I have a very basic question!! How do I upload my script in response to your post? I am seeing 'Insert Video/Image/Link', but no 'Insert File' option?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jan 2014 06:06:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-31T06:06:14Z</dc:date>
    <item>
      <title>Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589166#M685424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following script snippet:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;[RefEngy1]:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Month,&lt;/P&gt;&lt;P&gt;ContractYr1Pctg,&lt;/P&gt;&lt;P&gt;Capacity&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;[RefEngy]:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Month,&lt;/P&gt;&lt;P&gt;if (Month = 'Jan', ContractYr1Pctg*Capacity, 'No Value') as [Ref Energy]&lt;/P&gt;&lt;P&gt;Resident RefEngy1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script&amp;nbsp; loads fine, and displays a value of 'Jan' for Month and has values for the other fields, but Ref Energy is showing as '-' in the TableBox. Even if the month is anything other than Jan, I should see 'No Value' in Ref Energy??&lt;/P&gt;&lt;P&gt;Appreciate any ideas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 12:08:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589166#M685424</guid>
      <dc:creator />
      <dc:date>2014-01-30T12:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589167#M685425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Hi&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens if you use numeric 0 instead of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'No Value' ?&amp;nbsp; A&lt;/SPAN&gt;s in :&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;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Month = 'Jan', ContractYr1Pctg*Capacity, 0 ) as [Ref Energy]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 12:14:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589167#M685425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-30T12:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589168#M685426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RefEngy&lt;/SPAN&gt; have the same number of rows as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RefEngy&lt;/SPAN&gt;1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 12:20:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589168#M685426</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-01-30T12:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589169#M685427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works for me (see below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some suggestions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Do your Month values have leading or trailing spaces? Use trim() to errr...trim.&lt;/LI&gt;&lt;LI&gt;Do both fields&amp;nbsp; ContractYr1Pctg &amp;amp; Capacity contain valid numbers? Open Table Viewer and check that their contents is aligned to the right&lt;/LI&gt;&lt;LI&gt;Package those two tables and the corresponding script part in a reduced document and post it here.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 12:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589169#M685427</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-01-30T12:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589170#M685428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;Thank you. Sorry, I have a very basic question!! How do I upload my script in response to your post? I am seeing 'Insert Video/Image/Link', but no 'Insert File' option?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 06:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589170#M685428</guid>
      <dc:creator />
      <dc:date>2014-01-31T06:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589171#M685432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Click on 'Use advanced editor' -&amp;gt; bottom right -&amp;gt; attach&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sss.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/52387_sss.png" style="width: 620px; height: 80px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 06:41:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589171#M685432</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-01-31T06:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589172#M685436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached my script. In [RefEngy1], I am getting the Date and constant values. In [REFENGY], I am trying to calculate the Reference Energy, based on what month it is , it should choose a different constant for Reference Insolation.&lt;/P&gt;&lt;P&gt;Even though it is showing the month correctly as 'Jan', it is not producing any values for the Ref Energy, showing up as '-'.&lt;/P&gt;&lt;P&gt;I tried trimming and the constants are numeric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 08:02:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589172#M685436</guid>
      <dc:creator />
      <dc:date>2014-01-31T08:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589173#M685440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I go with Bill Markham's track, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Ref Energy]&lt;/SPAN&gt;'s calculation mixes text and numeric result types so it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can make &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Ref Energy]&lt;/SPAN&gt; all numeric:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if (Month = 'Jan', ContractYr1Pctg*Capacity, 0) as [Ref Energy]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Or you can make it all text:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if (Month = 'Jan', Text(ContractYr1Pctg*Capacity), 'No Value') as [Ref Energy]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can have both types by using Dual() function:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if (Month = 'Jan', Dual(Text(ContractYr1Pctg*Capacity),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ContractYr1Pctg*Capacity&lt;/SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dual('No Value',0)) as [Ref Energy]&lt;/SPAN&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;"&gt;Hope this helps&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 08:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589173#M685440</guid>
      <dc:creator />
      <dc:date>2014-01-31T08:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589174#M685444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script you uploaded is quite different than what you posted. The script is calculating RefEnergy using pick(), not if(). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your pick, I think you may need to force the month to be numeric. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pick (num(Month(Date)),...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 13:10:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589174#M685444</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-01-31T13:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Help with debugging script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589175#M685447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem looks to be because the fields ContractYear1Pctg, Capacity are not integers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I say,&lt;/P&gt;&lt;P&gt;if (num(Month(Date))= 1, 23,0) as [RefEnergy], I get a value of 23 correctly for Jan, but&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If (num(Month(Date))=1,ContractYear1Pctg*Capacity,0) is giving '-' The values for ContractYear1Pctg is 0.794 and Capacity is 5.81. In the tablebox property, I had described these fields as number with precision of 10.&lt;/P&gt;&lt;P&gt;How do I force it to take decimal values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 15:39:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-debugging-script/m-p/589175#M685447</guid>
      <dc:creator />
      <dc:date>2014-01-31T15:39:59Z</dc:date>
    </item>
  </channel>
</rss>

