<?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: Locate missing values automatically after recharging in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Locate-missing-values-automatically-after-recharging/m-p/931339#M952933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe,&lt;/P&gt;&lt;P&gt;I don't know how you reload data, but you can try to locate applymap errors using trace so you can log (if you activated logs) and see to the script execution monitor the errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;Directory;&lt;BR /&gt;CurrencyRate:&lt;BR /&gt;mapping LOAD &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; autonumber(FromCurrency &amp;amp; '|' &amp;amp; MonthName(Date)) as Key_CurrencyMonthYear, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; evaluate(Rate) as Rate&lt;BR /&gt;FROM&lt;BR /&gt;CURRENCY.csv&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq) where ToCurrency='USD';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each vFiles in filelist('CURRENCY_PRS*.csv')&lt;BR /&gt;People:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;LOAD *,ApplyMap('CurrencyRate',Key_CurrencyMonthYear,'Anomaly mapping' ) as Rate_USD;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;LOAD manager,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; autonumber(currency_code &amp;amp; '|' &amp;amp; MonthName(date(date#(date,'M/D/YYYY'),'DD/MM/YYYY'))) as Key_CurrencyMonthYear, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sales_amount, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date as Date_Orig,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(date#(date,'M/D/YYYY'),'DD/MM/YYYY') as date, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; currency_code&lt;BR /&gt;FROM&lt;BR /&gt;[$(vFiles)]&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;BR /&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;CheckTable:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt; sum(if(Rate_USD='Anomaly mapping',1,0)) as MappingError&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;resident People group by manager;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Let ExistError=peek('MappingError',-1,'CheckTable');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;if $(ExistError)&amp;gt;0 then&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp; trace 'Mapping Error';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;end if&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can improve the above script, for example, adding a loop on all the tables of your data model to look for 'Anomaly mapping' and trace the table name where the error occurred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Andrea&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Dec 2015 22:43:52 GMT</pubDate>
    <dc:creator>anlonghi2</dc:creator>
    <dc:date>2015-12-01T22:43:52Z</dc:date>
    <item>
      <title>Locate missing values automatically after recharging</title>
      <link>https://community.qlik.com/t5/QlikView/Locate-missing-values-automatically-after-recharging/m-p/931338#M952932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have several qvw which are reloaded one after the other or in parallel and I try to highlight automatically the presence of the value ' Anomaly mapping ' generated during applymap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish to make it most automatically possible, for example by scanning every qvw of a directory to find this value in the whole of the data. The objective is to locate quickly the anomaly to go back to the mapping in cause and update the data sources before reloading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an application to make it or a macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beforehand thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 16:13:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Locate-missing-values-automatically-after-recharging/m-p/931338#M952932</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-01T16:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Locate missing values automatically after recharging</title>
      <link>https://community.qlik.com/t5/QlikView/Locate-missing-values-automatically-after-recharging/m-p/931339#M952933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe,&lt;/P&gt;&lt;P&gt;I don't know how you reload data, but you can try to locate applymap errors using trace so you can log (if you activated logs) and see to the script execution monitor the errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;Directory;&lt;BR /&gt;CurrencyRate:&lt;BR /&gt;mapping LOAD &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; autonumber(FromCurrency &amp;amp; '|' &amp;amp; MonthName(Date)) as Key_CurrencyMonthYear, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; evaluate(Rate) as Rate&lt;BR /&gt;FROM&lt;BR /&gt;CURRENCY.csv&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq) where ToCurrency='USD';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each vFiles in filelist('CURRENCY_PRS*.csv')&lt;BR /&gt;People:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;LOAD *,ApplyMap('CurrencyRate',Key_CurrencyMonthYear,'Anomaly mapping' ) as Rate_USD;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;LOAD manager,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; autonumber(currency_code &amp;amp; '|' &amp;amp; MonthName(date(date#(date,'M/D/YYYY'),'DD/MM/YYYY'))) as Key_CurrencyMonthYear, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sales_amount, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date as Date_Orig,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(date#(date,'M/D/YYYY'),'DD/MM/YYYY') as date, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; currency_code&lt;BR /&gt;FROM&lt;BR /&gt;[$(vFiles)]&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;BR /&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;CheckTable:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt; sum(if(Rate_USD='Anomaly mapping',1,0)) as MappingError&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;resident People group by manager;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Let ExistError=peek('MappingError',-1,'CheckTable');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;if $(ExistError)&amp;gt;0 then&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp; trace 'Mapping Error';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;end if&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can improve the above script, for example, adding a loop on all the tables of your data model to look for 'Anomaly mapping' and trace the table name where the error occurred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Andrea&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 22:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Locate-missing-values-automatically-after-recharging/m-p/931339#M952933</guid>
      <dc:creator>anlonghi2</dc:creator>
      <dc:date>2015-12-01T22:43:52Z</dc:date>
    </item>
  </channel>
</rss>

