<?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 Mapping Load doesn't work within a loop? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557755#M208214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I've got a mapping load within a loop in order to pick the customer name for&amp;nbsp; transactions made in a range of dates. So, in that loop I've got a mapping load for the customer_id and after that a load with an Applymap. The problem is that the mapping doesn't work properly. I gues the problem is that a mapping whitin a loop concatenates the data gathered from each loop. But since it is not possible to drop a mapping table I don't know how to go over this problem.&amp;nbsp; I've already tried adding a numeric value to the customer_id in each loop, but the tables are so large that performance is no acceptable. Any clues?&lt;/P&gt;&lt;P&gt;Tanks to all of you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Sep 2013 08:58:05 GMT</pubDate>
    <dc:creator>mrooney</dc:creator>
    <dc:date>2013-09-01T08:58:05Z</dc:date>
    <item>
      <title>Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557755#M208214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I've got a mapping load within a loop in order to pick the customer name for&amp;nbsp; transactions made in a range of dates. So, in that loop I've got a mapping load for the customer_id and after that a load with an Applymap. The problem is that the mapping doesn't work properly. I gues the problem is that a mapping whitin a loop concatenates the data gathered from each loop. But since it is not possible to drop a mapping table I don't know how to go over this problem.&amp;nbsp; I've already tried adding a numeric value to the customer_id in each loop, but the tables are so large that performance is no acceptable. Any clues?&lt;/P&gt;&lt;P&gt;Tanks to all of you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 08:58:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557755#M208214</guid>
      <dc:creator>mrooney</dc:creator>
      <dc:date>2013-09-01T08:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557756#M208215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you send us the script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 09:28:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557756#M208215</guid>
      <dc:creator>ariel_klien</dc:creator>
      <dc:date>2013-09-01T09:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557757#M208216</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;maybe it's better to use a join instead?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 10:27:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557757#M208216</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-01T10:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557758#M208217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you have something like this:&lt;/P&gt;&lt;P&gt;FOR n = 1 to 100&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Map&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;MAPPING LOAD&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;applymap(&lt;STRONG&gt;'Map'&lt;/STRONG&gt;...)...&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect that QlikView is creating maps 'Map-1', 'Map-2', etc.&amp;nbsp; Try this, so you explicitly create map names, and refer to them in the applymap:&lt;/P&gt;&lt;P&gt;FOR n = 1 to 100&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Map$(n)&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;MAPPING LOAD&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;applymap&lt;STRONG&gt;('Map$(n)'&lt;/STRONG&gt;...)...&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 12:27:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557758#M208217</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-01T12:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557759#M208218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very clever solution, @Michael! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think that QlikView creates Map-1, Map-2, etc... It continues to build up the same mapping table. I see 2 possible issues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If the mapping values aren't changing from one iteration of the loop to another, then the issue is in duplicate values. I'd recommend to simply add DISTINCT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If the mapping values should change from one iteration to another, then the old values need to be discarded, and Michael's solution with numbering the Map is perfect!&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;Oleg Troyansky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 16:46:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557759#M208218</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2013-09-01T16:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557760#M208219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;..then you would need a dynamical nesting ApplyMap(), not a very realistic approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 17:07:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557760#M208219</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-01T17:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557761#M208220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;I agree with Oleg. Your solutions works fine. I tried it before. But I just see a slight problem (or its seems to me it could be), I've got a huge amount of records, so worried about loading so many tables in memory. In case I have to make a loop for a whole Year I would be creating 365 table of more than 2 millions records each. My problem is performance in load time (every 12 hours).&lt;/P&gt;&lt;P&gt;I've been thinking about partial (incremental) reloads in order to release memory after, lets say, 50 loops each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm still trying to find a work-around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 20:11:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557761#M208220</guid>
      <dc:creator>mrooney</dc:creator>
      <dc:date>2013-09-01T20:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557762#M208221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;I've already tried with a join. But no luck. Poor performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 20:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557762#M208221</guid>
      <dc:creator>mrooney</dc:creator>
      <dc:date>2013-09-01T20:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557763#M208222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ariel, the code is pretty much like the one Michael wrote.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 20:20:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557763#M208222</guid>
      <dc:creator>mrooney</dc:creator>
      <dc:date>2013-09-01T20:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557764#M208223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"I'd recommend to simply add DISTINCT"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;Good point, thanks.&amp;nbsp; In fact, I always use "distinct" with mapping load, unless it is inline.&amp;nbsp; Somehow skipped it in the example above...&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 01:53:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557764#M208223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-02T01:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557765#M208224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;was the join made in QlikView or in database? Why you're doing a loop at all? Typically you would load the customers (maybe only the id and name field) into an associated separate table (star schema)..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 05:40:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557765#M208224</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-02T05:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557766#M208225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralph,&lt;/P&gt;&lt;P&gt;I need a loop because I also need, any given day of some selected period, some information about frequency of buying, avg. amount of purchas, avg. time beetween purchases, etc. There is no other way than a loop for calculations:&amp;nbsp; I need information about customer's behaviour in a defined period of time (mainly one year) from any actual date. I've not mentioned it before because I was trying to keep the issue as simpe as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 07:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557766#M208225</guid>
      <dc:creator>mrooney</dc:creator>
      <dc:date>2013-09-03T07:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557767#M208226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, but why you do not load the customers in a separate table (or mapping table) outside / before the loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 08:16:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557767#M208226</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-03T08:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557768#M208227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralph.&lt;/P&gt;&lt;P&gt;You are right. I do that and then the loop only makes the calculations over a period of time. I think there is not clear solution to this issue other than making&amp;nbsp; calculations into an specific object at execution time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 08:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557768#M208227</guid>
      <dc:creator>mrooney</dc:creator>
      <dc:date>2013-09-03T08:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557769#M208228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't understand why there would be an issue with the mapping if the mapping table was created once and complete outside the loop..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 08:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557769#M208228</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-03T08:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557770#M208229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I don't think I've explained myself correctly. The loop is not an easy one. Here is a reduced version of it.&lt;/P&gt;&lt;P&gt;......................................&lt;/P&gt;&lt;P&gt;let vEndDate = Today()-1;&lt;/P&gt;&lt;P&gt;LET vLoopDate = $(vEndDate)-365;&lt;/P&gt;&lt;P&gt;.....................&lt;/P&gt;&lt;P&gt;................&lt;/P&gt;&lt;P&gt;do while vLoopDate&amp;lt;=vEndDate&lt;/P&gt;&lt;P&gt;........................&lt;/P&gt;&lt;P&gt;&amp;nbsp; RestaurantSegmentationGlobal:&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; ........&amp;nbsp;&amp;nbsp; // Loading new situation information to compare with prior situation&lt;/P&gt;&lt;P&gt;&amp;nbsp; ......&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM ------- (QVD);&lt;/P&gt;&lt;P&gt;&amp;nbsp; ........................&lt;/P&gt;&lt;P&gt;&amp;nbsp; MAP_REST_RFM_STATE:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //That is Frequency - Recency - Monetary State&lt;/P&gt;&lt;P&gt;&amp;nbsp; Mapping LOAD [Restaurant Id]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Restaurant RFM Global Segment]&lt;/P&gt;&lt;P&gt;&amp;nbsp; From QVDs\TMP\RestaurantSegmentationPriorState.qvd (QVD);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; MAP_REST_VALORATION_STATE:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Mapping LOAD [Restaurant Id],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Restaurant Valoration]&lt;/P&gt;&lt;P&gt;&amp;nbsp; From QVDs\TMP\RestaurantSegmentationPriorState.qvd (QVD);&lt;/P&gt;&lt;P&gt;......................&lt;/P&gt;&lt;P&gt;......................&lt;/P&gt;&lt;P&gt; // ACTUAL STATE CALCULATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; M_REST_ACTUAL_STATE: // That is Activity State (Silver, Gold,....)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load [Restaurant Segmentation Country],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Restaurant Segmentation Location],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Restaurant Id],&lt;/P&gt;&lt;P&gt;...............................&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(if(ApplyMap('MAP_REST_RFM_STATE',[Restaurant Id])=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and ApplyMap('MAP_REST_VALORATION_STATE',[Restaurant Id])&amp;gt; 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; and [Actual State]=0,1,0)) as [KPI Restaurant Bronze to Silver],&lt;/P&gt;&lt;P&gt;..............................&lt;/P&gt;&lt;P&gt;..............................&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident RestaurantSegmentationGlobal&lt;/P&gt;&lt;P&gt;&amp;nbsp; Group by [Restaurant Segmentation Country],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Restaurant Segmentation Location],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Restaurant Id],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; store M_REST_ACTUAL_STATE into QVDs\TMP\RestaurantSegmentationPriorState.qvd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ......................&lt;/P&gt;&lt;P&gt;&amp;nbsp; ...................&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; let vLoopDate=$(vLoopDate)+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; loop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 09:22:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557770#M208229</guid>
      <dc:creator>mrooney</dc:creator>
      <dc:date>2013-09-03T09:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557771#M208230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still presume a join would be better...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 10:03:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557771#M208230</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-03T10:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load doesn't work within a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557772#M208231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ideally such data should be prepared and kept in the data warehouse, you should be reading the data from warehouse then from the reporting layer. This is just a suggestion. Would help if your design permits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Rajesh Vaswani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 10:07:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-doesn-t-work-within-a-loop/m-p/557772#M208231</guid>
      <dc:creator>rajeshvaswani77</dc:creator>
      <dc:date>2013-09-03T10:07:09Z</dc:date>
    </item>
  </channel>
</rss>

