<?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 Customer Retention - error in Set Expression using p() to determine customers with jobs last year, but no jobs this year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Customer-Retention-error-in-Set-Expression-using-p-to-determine/m-p/2091186#M89445</link>
    <description>&lt;P&gt;Need help with my formula to compute Lost Jobs by Customer.&amp;nbsp; In the screenshot of my table below, I am trying to count the # of jobs performed in 2021 for customers&amp;nbsp; who had no jobs&amp;nbsp; performed in 2022 .&amp;nbsp; But instead of getting only 2021 jobs, the count is showing me all jobs performed in ALL years (where the customer had no jobs in 2022).&amp;nbsp; So like on the first row where there were 11 jobs in 2021, my Lost Jobs formula should return 11 and not 16.&lt;/P&gt;
&lt;P&gt;count({$&amp;lt;customer = p({$&amp;lt;JobDueDate={"&amp;gt;=01/01/2021&amp;lt;=12/31/2021"}&amp;gt;}) - p({$&amp;lt;JobDueDate={"&amp;gt;=01/01/2022&amp;lt;=12/31/2022"}&amp;gt;}customer)&amp;gt;} job_id)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Melissa5_0-1688657491127.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111697i81721DBA1E9EDEAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Melissa5_0-1688657491127.png" alt="Melissa5_0-1688657491127.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2023 15:43:42 GMT</pubDate>
    <dc:creator>Melissa5</dc:creator>
    <dc:date>2023-07-06T15:43:42Z</dc:date>
    <item>
      <title>Customer Retention - error in Set Expression using p() to determine customers with jobs last year, but no jobs this year</title>
      <link>https://community.qlik.com/t5/App-Development/Customer-Retention-error-in-Set-Expression-using-p-to-determine/m-p/2091186#M89445</link>
      <description>&lt;P&gt;Need help with my formula to compute Lost Jobs by Customer.&amp;nbsp; In the screenshot of my table below, I am trying to count the # of jobs performed in 2021 for customers&amp;nbsp; who had no jobs&amp;nbsp; performed in 2022 .&amp;nbsp; But instead of getting only 2021 jobs, the count is showing me all jobs performed in ALL years (where the customer had no jobs in 2022).&amp;nbsp; So like on the first row where there were 11 jobs in 2021, my Lost Jobs formula should return 11 and not 16.&lt;/P&gt;
&lt;P&gt;count({$&amp;lt;customer = p({$&amp;lt;JobDueDate={"&amp;gt;=01/01/2021&amp;lt;=12/31/2021"}&amp;gt;}) - p({$&amp;lt;JobDueDate={"&amp;gt;=01/01/2022&amp;lt;=12/31/2022"}&amp;gt;}customer)&amp;gt;} job_id)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Melissa5_0-1688657491127.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111697i81721DBA1E9EDEAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Melissa5_0-1688657491127.png" alt="Melissa5_0-1688657491127.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 15:43:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Customer-Retention-error-in-Set-Expression-using-p-to-determine/m-p/2091186#M89445</guid>
      <dc:creator>Melissa5</dc:creator>
      <dc:date>2023-07-06T15:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention - error in Set Expression using p() to determine customers with jobs last year, but no jobs this year</title>
      <link>https://community.qlik.com/t5/App-Development/Customer-Retention-error-in-Set-Expression-using-p-to-determine/m-p/2091192#M89446</link>
      <description>&lt;P&gt;Hi Melissa,&lt;/P&gt;
&lt;P&gt;Your formula is working as intended, even if it's not producing the results that you expected. Here is why.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your Set Analysis filter is selecting &lt;EM&gt;&lt;STRONG&gt;customers (not jobs)&lt;/STRONG&gt;&lt;/EM&gt;with Job dates in 2021 and not in 2022. These same customers may have other jobs in other years too, So, in order to only count #&amp;nbsp;jobs in 202&amp;nbsp;2, you should add one more filter on the filed date and limit the JobDates by 2021, outside of the function P().&lt;/P&gt;
&lt;P&gt;To learn more about using advanced Set Analysis, check out the agenda of the &lt;A href="https://masterssummit.com" target="_blank"&gt;Masters Summit for Qlik&lt;/A&gt; - coming soon to Orlando and to Dublin!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 16:01:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Customer-Retention-error-in-Set-Expression-using-p-to-determine/m-p/2091192#M89446</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2023-07-06T16:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention - error in Set Expression using p() to determine customers with jobs last year, but no jobs this year</title>
      <link>https://community.qlik.com/t5/App-Development/Customer-Retention-error-in-Set-Expression-using-p-to-determine/m-p/2091198#M89449</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; But I am so new to this, I don't understand how to modify my formula with this additional filter.&amp;nbsp; Can you please show me how to correct my&amp;nbsp; formula?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 16:08:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Customer-Retention-error-in-Set-Expression-using-p-to-determine/m-p/2091198#M89449</guid>
      <dc:creator>Melissa5</dc:creator>
      <dc:date>2023-07-06T16:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention - error in Set Expression using p() to determine customers with jobs last year, but no jobs this year</title>
      <link>https://community.qlik.com/t5/App-Development/Customer-Retention-error-in-Set-Expression-using-p-to-determine/m-p/2091211#M89450</link>
      <description>&lt;P&gt;Wait, I read your reply closer.&amp;nbsp; You are saying to add a filter to the table itself, not to add something to my formula.&amp;nbsp; I've now added a filter to my table and my formula works!&amp;nbsp; Thank you so much!!!!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 16:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Customer-Retention-error-in-Set-Expression-using-p-to-determine/m-p/2091211#M89450</guid>
      <dc:creator>Melissa5</dc:creator>
      <dc:date>2023-07-06T16:35:29Z</dc:date>
    </item>
  </channel>
</rss>

