<?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: Best method to create a new conditional field using Data flow in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Best-method-to-create-a-new-conditional-field-using-Data-flow/m-p/2517129#M14873</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336524"&gt;@allydaniels&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would be super-simple in Qlik Load Script. Is there a reason that it must be done using Flow?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Customer:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; *,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; if([Is New Customer] = 'Yes', Customer, null()) as [New Customers]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; *,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; if([First Purchase] &amp;gt; AddMonths(Today(),-3), 'Yes', 'No;) as [Is New Customer]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; Customer,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; Date(min([Sale Date]), 'DD MMM YYYY') as [First Order],&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; Date(max([Sale Date]), 'DD MMM YYYY') as [Last Order],&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; sum(Value) as [Total Customer Sales]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;RESIDENT Orders&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;GROUP BY Customer&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As well as letting you have a separate dimension of new customers you might then also use this aggregated customer table to look at other things. You could look for customers with aggregated sales of over X in the past 12 months who have not placed an order in the past 3, for instance.&lt;/P&gt;&lt;P&gt;Hope that is useful.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
    <pubDate>Thu, 08 May 2025 12:56:25 GMT</pubDate>
    <dc:creator>stevedark</dc:creator>
    <dc:date>2025-05-08T12:56:25Z</dc:date>
    <item>
      <title>Best method to create a new conditional field using Data flow</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Best-method-to-create-a-new-conditional-field-using-Data-flow/m-p/2515848#M14847</link>
      <description>&lt;P&gt;Hello Qlik community&lt;/P&gt;
&lt;P&gt;I am hoping to use Data flow to create a new field to capture "&lt;STRONG&gt;New Customers"&lt;/STRONG&gt; as a column.&lt;/P&gt;
&lt;P&gt;For example , I would like to be able to filter customers who have only purchased products from the &lt;STRONG&gt;last 3 months&lt;/STRONG&gt; or only this year&amp;nbsp;&lt;STRONG&gt;2025&lt;/STRONG&gt;&amp;nbsp;as "new customers", and the rest as "previous customers".&lt;/P&gt;
&lt;P&gt;How might I design this new field using processors via Data flow (as I am joining this table with other datasets as well)?&lt;/P&gt;
&lt;P&gt;I've tried aggregation, but it seems I unable to restrict dates and sales. Is there a non-script way to go about this?&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-04-27 at 1.19.37 PM.png" style="width: 456px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/179953i1990518BB8D9B2DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-04-27 at 1.19.37 PM.png" alt="Screenshot 2025-04-27 at 1.19.37 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="ae_app" data-nosnippet=""&gt;&lt;!--
        Layout, Style or Voice Helpers
    --&gt;
&lt;DIV id="ae_helpers" class="ae-module" style="display: none;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;!--
        Compliance
    --&gt;
&lt;DIV id="ae_compliance" class="ae-module" style="display: none;"&gt;&lt;!-- For autoSmartRem addNewWindowWarnings div is referenced in an aria-describedby --&gt;
&lt;DIV id="audioeye_new_window_message" style="display: none;"&gt;Opens in new window&lt;/DIV&gt;
&lt;DIV id="audioeye_pdf_message" style="display: none;"&gt;PDF Download&lt;/DIV&gt;
&lt;DIV id="audioeye_word_message" style="display: none;"&gt;Word Download&lt;/DIV&gt;
&lt;DIV id="audioeye_excel_message" style="display: none;"&gt;Excel Download&lt;/DIV&gt;
&lt;DIV id="audioeye_powerpoint_message" style="display: none;"&gt;PowerPoint Download&lt;/DIV&gt;
&lt;DIV id="audioeye_document_message" style="display: none;"&gt;Document Download&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;!--
        Versioning Control Panel if versioning = true !
    --&gt; &lt;!--
        Launcher
    --&gt;  &lt;!-- Toolbar --&gt;
&lt;ASIDE id="ae_toolbar" tabindex="0" aria-label="Accessibility options"&gt;&lt;/ASIDE&gt;
&lt;!--
        Site Menu
    --&gt;  &lt;!--
        Generic Aria Live message container
    --&gt;
&lt;DIV id="ae_enabled_messages" class="ae-blurb-noaudio" aria-relevant="additions" aria-live="assertive"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;!-- Symbol definitions --&gt;    &lt;/DIV&gt;
&lt;!-- end #ae_app --&gt;</description>
      <pubDate>Sun, 27 Apr 2025 05:26:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Best-method-to-create-a-new-conditional-field-using-Data-flow/m-p/2515848#M14847</guid>
      <dc:creator>allydaniels</dc:creator>
      <dc:date>2025-04-27T05:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Best method to create a new conditional field using Data flow</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Best-method-to-create-a-new-conditional-field-using-Data-flow/m-p/2516685#M14860</link>
      <description>&lt;P&gt;You'd want to create a separate table/extract of just the records in the past 3 months.&amp;nbsp; Then join that new table/file to the original one on your Customer Name and create the column if there's a match.&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 13:33:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Best-method-to-create-a-new-conditional-field-using-Data-flow/m-p/2516685#M14860</guid>
      <dc:creator>mshann01</dc:creator>
      <dc:date>2025-05-05T13:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Best method to create a new conditional field using Data flow</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Best-method-to-create-a-new-conditional-field-using-Data-flow/m-p/2517129#M14873</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336524"&gt;@allydaniels&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would be super-simple in Qlik Load Script. Is there a reason that it must be done using Flow?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Customer:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; *,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; if([Is New Customer] = 'Yes', Customer, null()) as [New Customers]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; *,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; if([First Purchase] &amp;gt; AddMonths(Today(),-3), 'Yes', 'No;) as [Is New Customer]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; Customer,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; Date(min([Sale Date]), 'DD MMM YYYY') as [First Order],&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; Date(max([Sale Date]), 'DD MMM YYYY') as [Last Order],&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; sum(Value) as [Total Customer Sales]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;RESIDENT Orders&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;GROUP BY Customer&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As well as letting you have a separate dimension of new customers you might then also use this aggregated customer table to look at other things. You could look for customers with aggregated sales of over X in the past 12 months who have not placed an order in the past 3, for instance.&lt;/P&gt;&lt;P&gt;Hope that is useful.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 12:56:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Best-method-to-create-a-new-conditional-field-using-Data-flow/m-p/2517129#M14873</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2025-05-08T12:56:25Z</dc:date>
    </item>
  </channel>
</rss>

