<?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: Formula for new transactions for new customers (never ordered before) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783541#M277402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;for point 1) you can try&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333339691162px; font-family: arial, sans-serif; color: #222222;"&gt;count(&lt;SPAN style="font-size: 13.3333339691162px;"&gt;{&amp;lt;TRANDATE=e({&amp;lt;&lt;STRONG style="font-size: 13.3333339691162px; font-family: arial, sans-serif; color: #222222;"&gt;(Month(TRANDATE)&amp;lt;Month(AddMonths(Today(),-1))&lt;/STRONG&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;TRANDATE)&amp;gt;} &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333339691162px; font-family: arial, sans-serif; color: #222222;"&gt;DISTINCT if(MonthName(TRANDATE)=MonthName(AddMonths(Today(),-1)),CUSTOMER_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2015 19:43:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-13T19:43:22Z</dc:date>
    <item>
      <title>Formula for new transactions for new customers (never ordered before)</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783540#M277401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would be extremely happy if you could help us resolve a business problem we are trying to resolve in QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have two calculations we are looking to make:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Provide a customer count of any new customers last month who has NOT ordered before.&lt;/P&gt;&lt;P&gt;The following formula gives us the number of customers who ordered last month:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #222222; font-family: arial, sans-serif;"&gt;count(DISTINCT if(MonthName(TRANDATE)=MonthName(AddMonths(Today(),-1)),CUSTOMER_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which formula would you recommend for isolating the customers who has not ordered before, i.e. no previous TRANDATE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Provide a count of customers who has ordered in the past 6 months, as of end of last month (12/31), end of previous month (11/30), etc. for the past 12 months? I can certainly do that with 12 individual formulas, but for efficiency would like to use a variable to provide the rolling monthly customer count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any great ideas of how to do this effectively?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your assistance is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 19:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783540#M277401</guid>
      <dc:creator>klaus_feldam</dc:creator>
      <dc:date>2015-01-13T19:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for new transactions for new customers (never ordered before)</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783541#M277402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;for point 1) you can try&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333339691162px; font-family: arial, sans-serif; color: #222222;"&gt;count(&lt;SPAN style="font-size: 13.3333339691162px;"&gt;{&amp;lt;TRANDATE=e({&amp;lt;&lt;STRONG style="font-size: 13.3333339691162px; font-family: arial, sans-serif; color: #222222;"&gt;(Month(TRANDATE)&amp;lt;Month(AddMonths(Today(),-1))&lt;/STRONG&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;TRANDATE)&amp;gt;} &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333339691162px; font-family: arial, sans-serif; color: #222222;"&gt;DISTINCT if(MonthName(TRANDATE)=MonthName(AddMonths(Today(),-1)),CUSTOMER_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 19:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783541#M277402</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-13T19:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for new transactions for new customers (never ordered before)</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783542#M277403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could try it with InMonthToDate() and using a min(date) or Firstsortedvalue(date) as comparing-date to today and wrapped this in a count(aggr()).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 19:47:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783542#M277403</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-01-13T19:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for new transactions for new customers (never ordered before)</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783543#M277404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Elena.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like there is a formula error in what you are suggesting;&lt;/P&gt;&lt;P&gt;"Error in set modifier element function set"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error is in the following part of the formula:&lt;/P&gt;&lt;P&gt;"&lt;STRONG style="font-size: 13.3333339691162px; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333339691162px; font-family: inherit;"&gt;{&amp;lt;TRANDATE=e({&amp;lt;&lt;STRONG style="font-style: inherit; font-size: 13.3333339691162px;"&gt;(Month(TRANDATE)&amp;lt;Month(AddMonths(Today(),-1))&lt;/STRONG&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;TRANDATE)&amp;gt;}&lt;/SPAN&gt;&lt;/STRONG&gt;"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 20:19:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783543#M277404</guid>
      <dc:creator>klaus_feldam</dc:creator>
      <dc:date>2015-01-13T20:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for new transactions for new customers (never ordered before)</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783544#M277405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That sounds like a reasonable idea.&lt;/P&gt;&lt;P&gt;Do you have any suggestions for the formula based on my original formula?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;P&gt;aggr( min (&amp;nbsp; &amp;lt;[CUSTOMER_ID]&amp;gt; [TRANDATE] &amp;lt; Addmonths(Today(),-1), [TRANDATE], CUSTOMER_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't test my quick stab at a formula above - just trying to align with your suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 20:30:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783544#M277405</guid>
      <dc:creator>klaus_feldam</dc:creator>
      <dc:date>2015-01-13T20:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for new transactions for new customers (never ordered before)</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783545#M277406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, sorry...&lt;/P&gt;&lt;P&gt;It's not correct the set analysis syntax &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;If you had field Month (=Month(TRANDATE)), you could use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333339691162px; font-family: arial, sans-serif; color: #222222;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333339691162px; font-family: inherit;"&gt;{&amp;lt;TRANDATE=e({&amp;lt;&lt;SPAN style="font-style: inherit; font-size: 13.3333339691162px; font-family: inherit;"&gt;&lt;STRONG&gt;(Month={"&amp;lt;Month(AddMonths(Today(),-1))"}&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;TRANDATE)&amp;gt;}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 20:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783545#M277406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-13T20:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for new transactions for new customers (never ordered before)</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783546#M277407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(-inmonthtodate(min({1} TRANDATE), today(), 0), CUSTOMER_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression logic:&lt;/P&gt;&lt;P&gt;check if the min-date within your target-range, if true = -1, the - before inmonth … returned 1, if false it returned 0&lt;/P&gt;&lt;P&gt;this will be executed for each customer and then aggregated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstly - put the min() and the inmonthtodate() in separate expressions and check the results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 06:08:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-for-new-transactions-for-new-customers-never-ordered/m-p/783546#M277407</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-01-14T06:08:57Z</dc:date>
    </item>
  </channel>
</rss>

