<?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: Create a flag to show the orders placed by the same customer for the same product within 8 days of their first order in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Create-a-flag-to-show-the-orders-placed-by-the-same-customer-for/m-p/2124648#M91525</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;might this solve your issue:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;aggr(Count&lt;/SPAN&gt;&lt;SPAN&gt;(Distinct &lt;/SPAN&gt;&lt;SPAN&gt;If&lt;/SPAN&gt;&lt;SPAN&gt;(order date &amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;Today()-8 ,ProductID&lt;SPAN&gt;)), Customer ID)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;OrderIDCountPerCustomer&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 03 Oct 2023 09:51:11 GMT</pubDate>
    <dc:creator>Cascader</dc:creator>
    <dc:date>2023-10-03T09:51:11Z</dc:date>
    <item>
      <title>Create a flag to show the orders placed by the same customer for the same product within 8 days of their first order</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-flag-to-show-the-orders-placed-by-the-same-customer-for/m-p/2124621#M91519</link>
      <description>&lt;P&gt;I am new to Qlik Sense.&amp;nbsp; I need to add a flag to flag the orders where the same customer has ordered the same product within 8 days from the previous order. I tried using previous in the script like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(previous("Customer ID")="Customer ID" and previous("Product ID") = "Product ID" and "Order Date"-previous("Order Date") &amp;lt;=8,1,0) as DuplicateFlag&lt;/P&gt;
&lt;P&gt;which doesn't seem to work. What I intend to accomplish is that the flag should loop through the dates column to check if any two days fall within the interval of 8 days.&lt;/P&gt;
&lt;P&gt;Tried using fabs(interval(date#("Order Date", DD/MM/YYYY)-(previous(date#("Order Date",DD/MM/YYYY))), 'd')) as nDays which also did not work.&lt;/P&gt;
&lt;P&gt;Any help would be really appreciated.&lt;/P&gt;
&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:22:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-flag-to-show-the-orders-placed-by-the-same-customer-for/m-p/2124621#M91519</guid>
      <dc:creator>Qlikhat</dc:creator>
      <dc:date>2024-11-15T21:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create a flag to show the orders placed by the same customer for the same product within 8 days of their first order</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-flag-to-show-the-orders-placed-by-the-same-customer-for/m-p/2124648#M91525</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;might this solve your issue:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;aggr(Count&lt;/SPAN&gt;&lt;SPAN&gt;(Distinct &lt;/SPAN&gt;&lt;SPAN&gt;If&lt;/SPAN&gt;&lt;SPAN&gt;(order date &amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&amp;nbsp;Today()-8 ,ProductID&lt;SPAN&gt;)), Customer ID)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;OrderIDCountPerCustomer&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Oct 2023 09:51:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-flag-to-show-the-orders-placed-by-the-same-customer-for/m-p/2124648#M91525</guid>
      <dc:creator>Cascader</dc:creator>
      <dc:date>2023-10-03T09:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create a flag to show the orders placed by the same customer for the same product within 8 days of their first order</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-flag-to-show-the-orders-placed-by-the-same-customer-for/m-p/2124649#M91526</link>
      <description>&lt;P&gt;Is your data sorted by Customer, Product, and Order Date ascending (in that order)? That would be necessary for the Previous() approach to work.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 09:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-flag-to-show-the-orders-placed-by-the-same-customer-for/m-p/2124649#M91526</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-10-03T09:52:46Z</dc:date>
    </item>
  </channel>
</rss>

