<?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: Error line scripting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-line-scripting/m-p/1253181#M620281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;As you are using Aggregation functions you should have to use a Group by statement within your script.&lt;/P&gt;&lt;P&gt;Here you can write script with out SUM() as well ,&lt;/P&gt;&lt;P&gt;try this,&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;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='creditcard'or Payment_line_method='recurrent'or Payment_line_method='nopay' ,( (Import_Brut)*1.17)*0.006,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='paypal',0.3+( (Import_Brut)*1.17)*0.017,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='reposition',0))) as Finance_Cost,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;* from $(VStore)Salesline.qvd (qvd);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE Salesline_P INTO $(VStore)Salesline.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In front end you can use like&amp;nbsp; SUM(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Finance_Cost&lt;/SPAN&gt;) which is same as your expression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else try this....&lt;/P&gt;&lt;P&gt;&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;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='creditcard'or Payment_line_method='recurrent'or Payment_line_method='nopay' ,(sum(Import_Brut)*1.17)*0.006,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='paypal',0.3+(sum(Import_Brut)*1.17)*0.017,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='reposition',0))) as Finance_Cost,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;* from $(VStore)Salesline.qvd (qvd)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Group by &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Payment_line_method&lt;/STRONG&gt;&lt;/SPAN&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Assumed that only &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Payment_line_method&lt;/SPAN&gt; field is available)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE Salesline_P INTO $(VStore)Salesline.qvd (qvd);&lt;/P&gt;&lt;P&gt;************************************************************************************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Feb 2017 12:49:32 GMT</pubDate>
    <dc:creator>sasikanth</dc:creator>
    <dc:date>2017-02-23T12:49:32Z</dc:date>
    <item>
      <title>Error line scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Error-line-scripting/m-p/1253180#M620280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm doing a calculation when I load the scrip, and gives me an error, does anybody knows why did not work? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Salesline:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;if(Payment_line_method='creditcard'or Payment_line_method='recurrent'or Payment_line_method='nopay' ,(sum(Import_Brut)*1.17)*0.006,&lt;/P&gt;&lt;P&gt;if(Payment_line_method='paypal',0.3+(sum(Import_Brut)*1.17)*0.017,&lt;/P&gt;&lt;P&gt;if(Payment_line_method='reposition',0))) as Finance_Cost,&lt;/P&gt;&lt;P&gt;* from $(VStore)Salesline.qvd (qvd);&lt;/P&gt;&lt;P&gt;STORE Salesline_P INTO $(VStore)Salesline.qvd (qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 11:50:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-line-scripting/m-p/1253180#M620280</guid>
      <dc:creator>ecabanas</dc:creator>
      <dc:date>2017-02-23T11:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error line scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Error-line-scripting/m-p/1253181#M620281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;As you are using Aggregation functions you should have to use a Group by statement within your script.&lt;/P&gt;&lt;P&gt;Here you can write script with out SUM() as well ,&lt;/P&gt;&lt;P&gt;try this,&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;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='creditcard'or Payment_line_method='recurrent'or Payment_line_method='nopay' ,( (Import_Brut)*1.17)*0.006,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='paypal',0.3+( (Import_Brut)*1.17)*0.017,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='reposition',0))) as Finance_Cost,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;* from $(VStore)Salesline.qvd (qvd);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE Salesline_P INTO $(VStore)Salesline.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In front end you can use like&amp;nbsp; SUM(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Finance_Cost&lt;/SPAN&gt;) which is same as your expression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else try this....&lt;/P&gt;&lt;P&gt;&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;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='creditcard'or Payment_line_method='recurrent'or Payment_line_method='nopay' ,(sum(Import_Brut)*1.17)*0.006,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='paypal',0.3+(sum(Import_Brut)*1.17)*0.017,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Payment_line_method='reposition',0))) as Finance_Cost,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;* from $(VStore)Salesline.qvd (qvd)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Group by &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Payment_line_method&lt;/STRONG&gt;&lt;/SPAN&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Assumed that only &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Payment_line_method&lt;/SPAN&gt; field is available)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE Salesline_P INTO $(VStore)Salesline.qvd (qvd);&lt;/P&gt;&lt;P&gt;************************************************************************************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 12:49:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-line-scripting/m-p/1253181#M620281</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2017-02-23T12:49:32Z</dc:date>
    </item>
  </channel>
</rss>

