<?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: Nested For in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918831#M983724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahmad, look at the qvw attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like all customers are active in your data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Aug 2015 06:40:01 GMT</pubDate>
    <dc:creator>isorinrusu</dc:creator>
    <dc:date>2015-08-14T06:40:01Z</dc:date>
    <item>
      <title>Nested For</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918826#M983719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one help me in this:&lt;/P&gt;&lt;P&gt;i need to know how we can use the for loop in qlikview(load script) let's say i need to count the people or customer thy make Orders after March 2015 to the current day or in the previous 120 day before .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I imagine we should have for lope one of them to check the customer in this days and the second to store or count it and store it in another Variable; but i try to do it , unfortunately not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i need to know the Customer# in the previous 4 month from the current date selection @and if i need to know the&amp;nbsp; customer by check the &lt;STRONG&gt;New Customers, Old Customers further split into active inactive customers (definition of inactive anyone who has not been in system for 4 months) &lt;/STRONG&gt;and this i thing will happened by check the &lt;STRONG&gt;[Creation Date2]&amp;nbsp; and&amp;nbsp; [ Last Order Date2] &lt;/STRONG&gt;with the selection time period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any one had something like this before.&lt;/P&gt;&lt;P&gt;please find the attach sample data from my table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ahmad Kastero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 09:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918826#M983719</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2015-08-11T09:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Nested For</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918827#M983720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you post example of your script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 09:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918827#M983720</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-11T09:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Nested For</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918828#M983721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question is not very clear. You certainly do not need a loop to count something, but perhaps there is something about your source data. I suggest that you post some sample data and the output that you would like to see from that data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 09:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918828#M983721</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-11T09:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Nested For</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918829#M983722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I understand, you don't actually need a loop: what you need is to restrict the data to the last 4 months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, for example, you'd have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last4MonthsSales:&lt;/P&gt;&lt;P&gt;Load Customer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Transaction,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Company,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;From Sales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Where Date&amp;lt;(Today()-120)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That would create a Table where only data from the last 4 months is available. Is that what you need?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 10:36:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918829#M983722</guid>
      <dc:creator>isorinrusu</dc:creator>
      <dc:date>2015-08-11T10:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Nested For</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918830#M983723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for replay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is part of what i need to get a customer in -120 but also i need to know if these customer in last 4month is a new customer or old customer ; it will help to know the customer behavior if he was inactive customer and after the Campaigns he become active customer ; this what i need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 10:47:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918830#M983723</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2015-08-11T10:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Nested For</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918831#M983724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahmad, look at the qvw attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like all customers are active in your data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 06:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918831#M983724</guid>
      <dc:creator>isorinrusu</dc:creator>
      <dc:date>2015-08-14T06:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Nested For</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918832#M983725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="https://community.qlik.com/qlik-users/168598"&gt;isorinrusu&lt;/A&gt;‌ there is some customer active and the other inactive but can you explain the expression to see if i understand it&amp;nbsp; correctly :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Date(max([ Last Order Date2]))&amp;lt;=Date($(vCreationDateLast4Months)),'Inactive','Active') &lt;/P&gt;&lt;P&gt;the first part to get the max for last order date and check it with &lt;SPAN style="font-size: 13.3333330154419px;"&gt;($(vCreationDateLast4Months)) then it will get Inactive OR Active but i am sorry for this question (how it will compare it just compare date with date but we should compare or check the (customer id) or&amp;nbsp; (customer phone number) through our criteria if it is exist in that time period it will be Active else it will be Inactive) &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Aug 2015 16:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918832#M983725</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2015-08-16T16:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Nested For</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918833#M983726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahmad, can you give me two examples of customers, with all their fields that you use for the calculation, one being active and the other one inactive?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 11:31:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918833#M983726</guid>
      <dc:creator>isorinrusu</dc:creator>
      <dc:date>2015-08-17T11:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Nested For</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918834#M983727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is you did in the Help Qvw is perfect but when i try to count that field to get # of Customer Active and # of Customer Inactive in text box&amp;nbsp;&amp;nbsp; give me error in expression Nested aggregation not allowed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inactive==&amp;gt;&lt;/P&gt;&lt;P&gt;Customer ID=200229 // Branch ID=2 // Last_Order_Date =2014-03-28 // Creation_Date = 2013-09-27 // Cust_Phone_Numbr =&lt;SPAN style="font-size: 13.3333330154419px;"&gt;0533389466 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Active==&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Customer ID=200008 // Branch ID=2 // Last_Order_Date =2015-07-04 // Creation_Date = 2013-09-05 // &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Cust_Phone_Numbr =&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;0504736988&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 12:17:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-For/m-p/918834#M983727</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2015-08-17T12:17:12Z</dc:date>
    </item>
  </channel>
</rss>

