<?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: Looking for help to resolve the error in the Qliksense Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Looking-for-help-to-resolve-the-error-in-the-Qliksense-Script/m-p/1287408#M621002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;Finally got the solution to myself.,&lt;/P&gt;&lt;P&gt;i.e. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;EXIT FAIL SCRIPT;&lt;/SPAN&gt; is purposefully added for error msg&lt;/P&gt;&lt;P&gt;but there is no reply from anyone QlikCommunity Member.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Feb 2017 07:58:20 GMT</pubDate>
    <dc:creator>kakaderanjit53</dc:creator>
    <dc:date>2017-02-03T07:58:20Z</dc:date>
    <item>
      <title>Looking for help to resolve the error in the Qliksense Script</title>
      <link>https://community.qlik.com/t5/QlikView/Looking-for-help-to-resolve-the-error-in-the-Qliksense-Script/m-p/1287407#M621001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Qlik Community,&lt;/P&gt;&lt;P&gt;I am creating one reconcillation script for the data evaluation i.e. Qvd_Data and SQL_data,&lt;/P&gt;&lt;P&gt;but there is an error occuring in the debugging script,PFA the Below code and help me to solve it.&lt;/P&gt;&lt;P&gt;for more details of error,PFA i.e. Screenshot of the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Qlik_Data_Scrip&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;t&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$(Must_Include=&lt;SPAN style="color: #003300;"&gt;'lib://xxxxxxxxxxPathFile.txt&lt;/SPAN&gt;');&lt;/P&gt;&lt;P&gt;LET vQVD_Path = '$(vQvd_path_ODS_Transactions)';&lt;/P&gt;&lt;P&gt;LET vQVD_Name = 'PLFMWISE_BRKG_TURNOVR';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//ENTER EITHER vNoOfYears OR vFrom_Fiscal_Yr;&lt;/P&gt;&lt;P&gt;LET vNoOfYears = 1;&amp;nbsp; //INPUT SHOULD BE &amp;gt; 0 eg: 3 TO GET LAST 3 FISCAL YRS + 1 CURRENT FISCAL YR&lt;/P&gt;&lt;P&gt;LET vFrom_Fiscal_Yr = 'NONE'; // INPUT FORMAT eg: 'FY 2013' GETS DATA FROM FISCAL YR 2013 TO TILL NOW[2017 FISCAL YR]&lt;/P&gt;&lt;P&gt;LET vTable_Name = 'Brokerage';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Must_Include='lib://D xxxxxxxGeneric_Load_Financial_year_data.qvs');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//brokerage summary for min date, max date &amp;amp; total brokerage&lt;/P&gt;&lt;P&gt;BrokerageSummary:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Min(trade_date) as Min_Date,&lt;/P&gt;&lt;P&gt;Max(trade_date) as Max_Date,&lt;/P&gt;&lt;P&gt;Sum(brokerage) as Total_Brokerage&lt;/P&gt;&lt;P&gt;Resident Brokerage;&lt;/P&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;&lt;P&gt;//store the summary data into variables&lt;/P&gt;&lt;P&gt;LET vFrom_Date = Peek('Min_Date',0,'BrokerageSummary');&lt;/P&gt;&lt;P&gt;LET vTo_Date = Peek('Max_Date',0,'BrokerageSummary');&lt;/P&gt;&lt;P&gt;Let vTotal_Brokerage= Peek('Total_Brokerage',0,'BrokerageSummary');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//drop the summary table&lt;/P&gt;&lt;P&gt;drop table BrokerageSummary;&lt;/P&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;&lt;P&gt;//compute the month-wise brokerage&lt;/P&gt;&lt;P&gt;Brokerage_QLIK:&lt;/P&gt;&lt;P&gt;LOAD Left(trade_date,6) as fiscal_month,&lt;/P&gt;&lt;P&gt;sum(brokerage) as Total_Brokerage&lt;/P&gt;&lt;P&gt;Resident Brokerage&lt;/P&gt;&lt;P&gt;Group by&amp;nbsp; Left(trade_date,6)&lt;/P&gt;&lt;P&gt;Order by 1;&lt;/P&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;&lt;P&gt;//drop unwanted tables&lt;/P&gt;&lt;P&gt;drop table Brokerage;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;SQL_Data_Script&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIB CONNECT TO 'xxxxxxxxx';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vSP_FLAG_RECO = 'PLFMWISE_BRKG_TURNOVR_RECO'; //Reconcilation SP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brokerage_SQL:&lt;/P&gt;&lt;P&gt;Load *;&lt;/P&gt;&lt;P&gt;SQL exec qlik_ods_data $(vSP_FLAG_RECO),$(vFrom_Date),$(vTo_Date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Reconcillation_Script&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="CodeMirror-line" style="padding: 0 4px; background: transparent; font-family: inherit; font-size: inherit; color: inherit;"&gt;
&lt;P&gt;//count the no of errors&lt;/P&gt;
&lt;P&gt;Set vErrorCount=0;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//print the header row&lt;/P&gt;
&lt;P&gt;TRACE Brokerage Mismatch Details;&lt;/P&gt;
&lt;P&gt;TRACE Month_SQL Month_Qlik Brokerage_SQL Brokerage_Qlik&amp;nbsp; Brokerge_Difference;&lt;/P&gt;
&lt;P&gt;TRACE ------------------------------------------------------------------------------------;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Looping over the all the months data&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For vLoop = 0 to NoOfRows('Brokerage_QLIK')-1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //extract the current month&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vMonthSQL= Peek('Month_Name',vLoop,'Brokerage_SQL');;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vMonthQlik= Peek('fiscal_month',vLoop,'Brokerage_QLIK');&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //extract the current month brokerage figures&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET vBrokerageSQL = fabs(Peek('brokerage',vLoop,'Brokerage_SQL'));&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET vBrokerageQlik = fabs(Peek('Total_Brokerage',vLoop,'Brokerage_QLIK'));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //compare the brokerage&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vBrokerageDiff=fabs($(vBrokerageSQL)-$(vBrokerageQlik));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if difference is more than 5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF($(vBrokerageDiff)&amp;gt;5 ) Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //log the error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRACE $(vMonthSQL) $(vMonthQlik) $(vBrokerageSQL) $(vBrokerageQlik) $(vBrokerageDiff);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //increase the error count&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vErrorCount=$(vErrorCount)+1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Next vLoop;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //if there is an error&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If $(vErrorCount)&amp;gt;0 THEN&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //fail the script through syntax error&lt;/P&gt;
&lt;P&gt;&amp;nbsp; EXIT FAIL SCRIPT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit Script;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; End If;&lt;/P&gt;




&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2017 06:02:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looking-for-help-to-resolve-the-error-in-the-Qliksense-Script/m-p/1287407#M621001</guid>
      <dc:creator>kakaderanjit53</dc:creator>
      <dc:date>2017-02-03T06:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help to resolve the error in the Qliksense Script</title>
      <link>https://community.qlik.com/t5/QlikView/Looking-for-help-to-resolve-the-error-in-the-Qliksense-Script/m-p/1287408#M621002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;Finally got the solution to myself.,&lt;/P&gt;&lt;P&gt;i.e. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;EXIT FAIL SCRIPT;&lt;/SPAN&gt; is purposefully added for error msg&lt;/P&gt;&lt;P&gt;but there is no reply from anyone QlikCommunity Member.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2017 07:58:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looking-for-help-to-resolve-the-error-in-the-Qliksense-Script/m-p/1287408#M621002</guid>
      <dc:creator>kakaderanjit53</dc:creator>
      <dc:date>2017-02-03T07:58:20Z</dc:date>
    </item>
  </channel>
</rss>

