<?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: Expression for new orders using set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215769#M389408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kelly, note that you are filtering ClientID, from that (or those) ClientID it counts all different OrderID (without checking dates).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use Concat (instead of Count or in another expression for debug) to see the different OrderID counted:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Concat({1&amp;lt;ClientID= p({1&amp;lt;Start={"$(='&amp;gt;='&amp;amp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;amp; '&amp;lt;=' &amp;amp; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_end&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)"}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ClientID&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;) &amp;gt;}&amp;nbsp; DISTINCT OrderID, '_')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Nov 2016 12:58:38 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2016-11-24T12:58:38Z</dc:date>
    <item>
      <title>Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215762#M389401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help to create an expression.&lt;/P&gt;&lt;P&gt;I have three tables, which i select from the database - Orders, Order_type and Clients.&lt;IMG alt="Capture2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/144646_Capture2.PNG" style="height: 133px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;1. First you have to insert right dates (I have calendars/sliders named &lt;STRONG&gt;date_range_start&lt;/STRONG&gt; and &lt;STRONG&gt;date_range_end&lt;/STRONG&gt;) &lt;IMG alt="new.PNG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/144651_new.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Now i want to know how many new orders i have for my order types (Starts in the date range and this client doesn't have any orders for two months ago) If client had an order for example three/four months ago then it's new order.&lt;/P&gt;&lt;P&gt;Result would be: &lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/144650_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;And I need to use EXPRESSIONS&lt;/P&gt;&lt;P&gt;So i tried to use set analysis but i don't know how to put it together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to get orders which start in the range, then subtract these (clients) who had orders in past two months AND NOW I HAVE TO SUBTRACT SOMETHING MORE OR CHANGE THE WHOLE COUNT, I don't know anymore &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;START={"$(='&amp;gt;='&amp;amp;&amp;nbsp; &lt;STRONG style="font-size: 13.3333px;"&gt;date_range_start&lt;/STRONG&gt;&amp;amp; '&amp;lt;=' &amp;amp; &lt;STRONG style="font-size: 13.3333px;"&gt;date_range_end&lt;/STRONG&gt;)"}&amp;gt;- &amp;lt;END={"$(='&amp;gt;='&amp;amp; MAKEDATE(year(&lt;STRONG style="font-size: 13.3333px;"&gt;date_range_start&lt;/STRONG&gt;),MONTH(&lt;STRONG style="font-size: 13.3333px;"&gt;date_range_start&lt;/STRONG&gt;)-2,day(&lt;STRONG style="font-size: 13.3333px;"&gt;date_range_start&lt;/STRONG&gt;)) &amp;amp; '&amp;lt;' &amp;amp; &lt;STRONG style="font-size: 13.3333px;"&gt;date_range_start&lt;/STRONG&gt;)"}&lt;SPAN style="font-size: 10pt;"&gt;&amp;gt;} OrderID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't even know if I'm close to my solution or not. I have tried this so long now and I still don't have a solution.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;/P&gt;&lt;P&gt;I'm happy if somebody could help or guide me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215762#M389401</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-23T13:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215763#M389402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kelly, dates are tricky and maybe formats are giving unexpected results, try removing the caption of the table and you will see the expression QV is constructing after expanding the $().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some tips to make it easier:&lt;/P&gt;&lt;P&gt;- You can use Addmonths(date_range_start, -2) to retrieve the same date two months ago.&lt;/P&gt;&lt;P&gt;- You can do a Sum(StartConditions)-Sum(EndConditions), I think it should give the same result and you can check separatedly the values returned.&lt;/P&gt;&lt;P&gt;- To avoid date formats try using them as number:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Count({&amp;lt;START={"$(='&amp;gt;='&amp;amp;&amp;nbsp; Num(&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start)&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;amp; '&amp;lt;=' &amp;amp; Num(&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_end)&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)"}&amp;gt;- &amp;lt;END={"$(='&amp;gt;='&amp;amp; Num(MAKEDATE(year(&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;),MONTH(&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)-2,day(&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;))) &amp;amp; '&amp;lt;' &amp;amp; Num(&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start)&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)"}&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;} OrderID)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 14:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215763#M389402</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-23T14:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215764#M389403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kelly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you probably need to be looking at the P() and E() functions in Set Analysis.&amp;nbsp; These allow you to use the results of one expression when looking at another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, you would end up with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Count({&amp;lt;START={"$(='&amp;gt;='&amp;amp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;amp; '&amp;lt;=' &amp;amp; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_end&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)"},ClientId-=P({1&amp;lt;END={"$(='&amp;lt;'&amp;amp; Date(AddMonths(&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;,-2), 'D.MM.YYYY'))}&amp;gt;}ClientId)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;} OrderID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So, that is where the START is in your date range, but the client is not one who has ever ordered anything (regardless of selection) before two months ago.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;A couple of important tweaks from what you had, if you were in Jan or Feb using your code the MAKEDATE would fail, AddMonths is better.&amp;nbsp; Also, set analysis is really picky about date formats, so the Date function is essential.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I would suggest breaking the code down into little bits to test (e.g. test what is inside the P() separately) and you should be able to get there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Good luck!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 14:11:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215764#M389403</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2016-11-23T14:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215765#M389404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that start/end ranges are variables and have the same format like your START field you could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Count({&amp;lt;START={"&amp;gt;=$(=addmonths('$(date_range_start)', -2)&amp;lt;='$(date_range_start)'"}&amp;gt;} OrderID) = 0, &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Count({&amp;lt;START={"&amp;gt;='$(date_range_start)'&amp;lt;='$(date_range_end)'"}&amp;gt;} OrderID))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;whereby the if-part simplified the excluding-logic from the past periods. To get the expressions right follow the suggestions from Ruben regarding the expression-caption and the formattings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;- Marcus&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 14:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215765#M389404</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-11-23T14:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215766#M389405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus, would this not only work if in some kind of AGGR statement, perhaps on OrderID?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2016 14:21:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215766#M389405</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2016-11-23T14:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215767#M389406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not a nesting of aggregation else only two counts within different parts of an if-loop and therefore should work.&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, 23 Nov 2016 14:36:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215767#M389406</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-11-23T14:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215768#M389407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;P&gt;Definitely going to use all yours tips in future. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this problem I found the P() function most useful. I hadn't heard about the p and e function before. &lt;/P&gt;&lt;P&gt;But it gives me wrong number of started orders. For example just to try and see what p() is doing i tried: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({1&amp;lt;ClientID= p({1&amp;lt;Start={"$(='&amp;gt;='&amp;amp;&amp;nbsp; &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start&lt;/STRONG&gt;&amp;amp; '&amp;lt;=' &amp;amp; &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_end&lt;/STRONG&gt;)"}&amp;gt;} &lt;SPAN style="font-size: 13.3333px;"&gt;ClientID&lt;/SPAN&gt;) &amp;gt;}&amp;nbsp; DISTINCT OrderID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should show 1 order, but it shows 3 &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; (Not using the same date ranges which are shown up)&lt;/P&gt;&lt;P&gt;But it is so close to my solution and I belive I can figure it out now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So thank you all. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2016 12:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215768#M389407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-24T12:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215769#M389408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kelly, note that you are filtering ClientID, from that (or those) ClientID it counts all different OrderID (without checking dates).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use Concat (instead of Count or in another expression for debug) to see the different OrderID counted:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Concat({1&amp;lt;ClientID= p({1&amp;lt;Start={"$(='&amp;gt;='&amp;amp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_start&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;amp; '&amp;lt;=' &amp;amp; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_range_end&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)"}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ClientID&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;) &amp;gt;}&amp;nbsp; DISTINCT OrderID, '_')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2016 12:58:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215769#M389408</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-24T12:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215770#M389409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, Thanks.&lt;/P&gt;&lt;P&gt;Going to try this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2016 13:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215770#M389409</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-24T13:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215771#M389410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, but what I said that only for debug, not the solution.. after a slow reading of your post I think you already know wich ones are the extra OrderIDs so my last post has no use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I tried to say is that you also need to set something that filters Orders (it can be done adding an Order field to set analysis like OrderID, START, END...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2016 14:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215771#M389410</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-24T14:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215772#M389411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your last post was very helpful, now i can see what orders it counts.&lt;/P&gt;&lt;P&gt;And it doesn't make sense, the function counts orders even from last year, it doesn't depend on my date range.&lt;/P&gt;&lt;P&gt;Yes, it shows only those clients orders who has END in the range but counts orders wrongly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2016 14:40:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215772#M389411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-24T14:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for new orders using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215773#M389412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I got something that works now. I tried to use somekind a intersection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({1&amp;lt;ClientID= p({1&amp;lt;Start={"$(='&amp;gt;='&amp;amp;&amp;nbsp; &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;date_range_start&lt;/STRONG&gt;&amp;amp; '&amp;lt;=' &amp;amp; &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;date_range_end&lt;/STRONG&gt;)"}&amp;gt;} &lt;SPAN style="font-size: 13.3333px;"&gt;ClientID&lt;/SPAN&gt;), &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;Start&lt;/SPAN&gt;={"$(='&amp;gt;='&amp;amp;&amp;nbsp; &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;date_range_start&lt;/STRONG&gt;&amp;amp; '&amp;lt;=' &amp;amp; &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;date_range_end&lt;/STRONG&gt;)"}&amp;gt;}&amp;nbsp; DISTINCT OrderID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2016 14:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-new-orders-using-set-analysis/m-p/1215773#M389412</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-24T14:42:08Z</dc:date>
    </item>
  </channel>
</rss>

