<?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: Two different date_fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33290#M5611</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kamal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't quite understand: I have a set_expression -. the issue is, in a set_expression, I have to use something like &amp;gt;&amp;gt; P(Month) &amp;lt;&amp;lt; (selectable values as dictated by user selection) or &amp;gt;&amp;gt; max(month) &amp;lt;&amp;lt; - but I'd need something to make the limitation on my CreationMonth dynamic - actually several different limitations would have to be active at the same time, one for every month shown (when none is selected).&lt;/P&gt;&lt;P&gt;Maybe I could do something with the AGGR() function? That one "simulates" a dimension, no?&lt;/P&gt;&lt;P&gt;I'm not proficient enough to tell by heart whether that might be feasible, I'll give it a think.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Apr 2018 11:11:49 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2018-04-30T11:11:49Z</dc:date>
    <item>
      <title>Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33288#M5609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is actually a follow-up on an earlier post by myself, but in some way it's new, so I'll make it a new thread to keep things nice and orderly:&lt;/P&gt;&lt;P&gt;- The visualization I'm dealing with is the nr. of orders (eCommerce orders, that is) in a given month.&lt;/P&gt;&lt;P&gt;- The issue is, every order is connected to the regular calendar via a date PLUS it has a creationDate which may not be identical - an order can be created "in advance" with a later validity_date.´&lt;/P&gt;&lt;P&gt;- What I wanted there was to show only the tickets for a given month (say January 2018) which were created in January 2018, not those which had been created earlier.&lt;/P&gt;&lt;P&gt;- As long as exactly one month is selected, that works fine now. I have included another generated field, the &amp;gt;&amp;gt; CreationYear &amp;lt;&amp;lt; and &amp;gt;&amp;gt; CreationMonth &amp;lt;&amp;lt; into a set_expression to sum up the nr. of orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is, when no month is selected, of course this set_expression cannot do its work. So, if I select 2018 now, figures for Jan through March are displayed, but in March I see tickets that were created in either of those three months. When I select March, of course it's fine, but there is a significant difference - which will get "worse" for later months.&lt;/P&gt;&lt;P&gt;=&amp;gt; Until now, I cannot think of any way that could be solved in one chart - I think I'd actually need a second dimension "CreationMonth" whereby I'd have to specify that in March (I'd have three "sub-dimensions" in the "regular calendar month" of March), I want only the third one (subdimension March) and in June (there'd be six sub-dimensions), I want only the sub-dimension of June ... I cannot think of any way that would work.&lt;/P&gt;&lt;P&gt;As I see it, I'd need twelve individual small charts, one for each month, where I can use the set_expression I have, each with a visibility_condition.&lt;/P&gt;&lt;P&gt;Can any of you think of another solution?&lt;/P&gt;&lt;P&gt;We'll have a meeting on this and talk about how to do this - the fact being, the figures are not wrong either way, just different ... I'd just like to have one or two possibilities in my hat.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 10:22:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33288#M5609</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-04-30T10:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33289#M5610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you want to create different date fields (make them island) and then use the values selected in those filter in set exression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 10:32:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33289#M5610</guid>
      <dc:creator>kamal_sanguri</dc:creator>
      <dc:date>2018-04-30T10:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33290#M5611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kamal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't quite understand: I have a set_expression -. the issue is, in a set_expression, I have to use something like &amp;gt;&amp;gt; P(Month) &amp;lt;&amp;lt; (selectable values as dictated by user selection) or &amp;gt;&amp;gt; max(month) &amp;lt;&amp;lt; - but I'd need something to make the limitation on my CreationMonth dynamic - actually several different limitations would have to be active at the same time, one for every month shown (when none is selected).&lt;/P&gt;&lt;P&gt;Maybe I could do something with the AGGR() function? That one "simulates" a dimension, no?&lt;/P&gt;&lt;P&gt;I'm not proficient enough to tell by heart whether that might be feasible, I'll give it a think.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 11:11:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33290#M5611</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-04-30T11:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33291#M5612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I could understand is the problem may be with the selection.. Pls see the attached snippet to clearly understand what I am saying..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/201101_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created another table with just the Date. I have renamed it just to avoid making any association. Although these two are separate but you can use the value selected in the [Creation Date] in your set expression. Something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Date = {'&amp;lt;=[Creation Date]'}&amp;gt;}Col1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Certainly you have to modify it per your needs. I assume you may want to create two such tables and may be some more columns like month or year alongside date aswell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;-Kamal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 12:47:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33291#M5612</guid>
      <dc:creator>kamal_sanguri</dc:creator>
      <dc:date>2018-04-30T12:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33292#M5613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm ... sorry, I still don't see how that would be applicable to my scenario:&lt;/P&gt;&lt;P&gt;- My dimension is month&lt;/P&gt;&lt;P&gt;- I have a barchart&lt;/P&gt;&lt;P&gt;For a set_expression to work (afaIk) I need something to compare my field (which would be CreationMonth) to - I cannot make that field match "whatever dimension_value (month) that order is for", can I?&lt;/P&gt;&lt;P&gt;But I just remember something - when working for another company, I created a "bogus barchart" which looked like a barchart, but in fact it displayed, on a bogus dimension, two completely unrelated, constructed figures - one for the last month and one for the last week. That might be a way, I'd only have to make that appear if the user selects a year, but no month.&lt;/P&gt;&lt;P&gt;I'll try.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, sorry, that was bogus - the chart I want to display these figures is a table.&lt;/P&gt;&lt;P&gt;However, the &amp;gt;&amp;gt; Col(1) &amp;lt;&amp;lt; functionality (building one expression on top of another) is a possibility - but I'd have to turn it around: I'd need two columns for every month (dimension) - the second having a set_expression for "CreationMonth = [current_month]&lt;/P&gt;&lt;P&gt;Well - I think I could somehow do it with 12 expressions, each one being displayed for just one dimension_value - then I'd just have to do some hiding and display one "summary_expression" with the 12, to look as if it was just one ...&lt;/P&gt;&lt;P&gt;Well, it is doable ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No - it is a pivot_table which does not have quite the same possibilities as a straight_table ... but I can edit the text_colour of that expression, making it black (visible) for one particular month and white (invisible) for all others. I don't yet know how to finally collapse all those into one row, but it is a first step ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 14:26:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33292#M5613</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-04-30T14:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33293#M5614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm ... was there a general issue with the webSite yesterday or was that just me? I could not log on here, I always got a message about an SSO error - all day ...&lt;/P&gt;&lt;P&gt;Well, I can display the first day of a month in that chart (for the dimension "month") - so I guess I could maybe incorporate that into my set_expression - I only have to specify that &amp;gt;&amp;gt;CreationDate &amp;gt;= FirstDayOfMonth &amp;lt;&amp;lt; - no point in specifying the last day of the month since an order cannot be valid before its CreationDate ... should not ...&lt;/P&gt;&lt;P&gt;I'm curious to see if that works ...&lt;/P&gt;&lt;P&gt;If not, I could create another pivot_table with a bogus_dimension (inline) and twelve expressions, with each one being displayed for only one dimension_value - that's similar to something I did for an earlier employer - there I displayed two completely unrelated figures in what looked like a columnchart ... Then I'd just have to adapt the size of that "pivot_table" so that it positions seamlessly underneath another one.&lt;/P&gt;&lt;P&gt;Well, I guess I'll come up with some possibility ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2018 11:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33293#M5614</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-05-03T11:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33294#M5615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as expected, it doesn't work yet - the issue is, I don't know whether it is because I cannot use the dimension in a set_expression or whether it is because I'm doing it wrong - I am not very proficient in the use of set_analysis. Maybe I'll get some training sometime ...&lt;/P&gt;&lt;P&gt;So I have a straight_table (it's going to be a pivot later, but I just use a straight table for testing) with the dimension "Month" (from my calendar). I can display the first day of the month. My idea was to use this in my set_expression to specify that &amp;gt;&amp;gt; the CreationDate (of an order) must be equal to or greater than the first day of the month".&lt;/P&gt;&lt;P&gt;My code currently looks like this:&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;{&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 10pt;"&gt;&lt;EM&gt;$(=max(Year))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;OrderSource&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={'SHOP'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;ProfitCenter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={'P10 - Spare Parts'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;CreationYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 10pt;"&gt;&lt;EM&gt;$(=max(Year))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;CreationDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 10pt;"&gt;&lt;EM&gt;$(=Makedate(Year,Month,'01'))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;DocumentNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The expression without that last part for the &amp;gt;&amp;gt; CreationDate &amp;lt;&amp;lt; works fine. I have a year (calendar) selected, but no month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Can somebody tell me whether there is a syntax error in there? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;P.S.: Of course this would specify for the CreationDate to be equal to the first day of the month - but currently even this doesn't work. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 07:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33294#M5615</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-05-04T07:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33295#M5616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe I need an extra field "first day of month" in my calendar to use in that set_expression?&lt;/P&gt;&lt;P&gt;Worth a shot ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 08:04:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33295#M5616</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-05-04T08:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33296#M5617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This part won't work&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;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;CreationDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; = {&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #808080;"&gt;&lt;EM style="font-weight: inherit; font-size: 13.3333px; font-family: inherit;"&gt;$(=Makedate(Year,Month,'01'))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;because Year and Month have no aggregation function. It looks like you are attempting a line by line comparison for creation dates in the same month as the document validity date. it may be possible to do this in a set expression, but I am not sure what date fields you have.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;Possibly something like&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Count(DISTINCT &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{&amp;lt;Year={$(=Max(Year))}, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderSource={'SHOP'},&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProfitCenter={'P10 - Spare Parts'}, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocumentNumber = {"$(=InMonth(ValidityDate, CreationDate, 0))"}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;} DocumentNumber)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;The alternative is a sum(if()) or create a flag field in your load script to flag documents with creation date and validity date in the same month.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 08:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33296#M5617</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-05-04T08:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33297#M5618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay - so I can specify &amp;gt;&amp;gt; CreationDate = P(FirstDayOfMonth) &amp;lt;&amp;lt; - that is a step. The figures are correct then - but for the month of April, I still see the Orders created on the 1st of February and the 1st of March (January 1 and April 1 were both holidays).&lt;/P&gt;&lt;P&gt;Now the only part missing is the "&amp;gt;="&lt;/P&gt;&lt;P&gt;Can somebody lend me a hand there, please? I will have a look myself in the meantime, too.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 08:35:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33297#M5618</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-05-04T08:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33298#M5619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks! I'm afraid I haven't fully understood from your post why this expression cannot work.&lt;/P&gt;&lt;P&gt;You're right about what I'm trying to do, though - the goal is to display for every month only the orders that were created in that month.&lt;/P&gt;&lt;P&gt;The DocumentNumber is in a linktable, so I have different fields to be used as the date - the date is the link to a calendar - but there is another date, the CreationDate, which is unrelated to the calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bearing in mind that using flags in the script which are calculated only once is usually more efficient than having complex expressions on the GUI that are executed multiple times, I will try whether I can create such a flag - then I could also set a flag for the other elements of the set_expression that I currently have and have just a very simple set_expression on the GUI. Or maybe I can even build a flag to only be 1 once for every document number and then do a sum() instead.&lt;/P&gt;&lt;P&gt;Let's see ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 08:49:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33298#M5619</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-05-04T08:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33299#M5620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks Jonathan!&lt;/P&gt;&lt;P&gt;The solution now was so much easier, it makes me wonder why I didn't think of it - using flags in the script instead of complex set_analysis is actually something I like to do wherever possible ... well, I still need some set_analysis, but only to specify for my flagfields to have the value 1. Instead of making just one flagfield for the entire formula, I created two to keep things more flexible - that way, they can be used for something else if the need arises.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 11:45:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33299#M5620</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-05-04T11:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33300#M5621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize again - as a number of times before - that I could use some real training in set_analysis. I'm not so proficient in that, I never had any training at all ... on the other hand, having complex set_expressions in charts (on the GUI) is generally not recommended from a performance point_of_view. It is very flexible and would allow anyone who has mastered this tool to get a lot of information out of a given dataset without editing the datamodel, thus in very short time (if you know how, writing the formula is supposedly quicker than editing the datamodel). Well, okay. I'll see if I can get some training.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One last thing - I think I read in some book on QlikView that instead of a COUNT(DISTINCT()) of something, it would c.p. be a lot more performant to use a sum() because sum() works on a deeper level close to CPU_level whereas COUNT(DISTINCT()) is executed on Software level - is that right? I'll try to find this in my books or here in the community, then I could insert that into my own "best practices" catalog.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Hmm - there is a document here from HIC saying that nowadays that is no more true and COUNT(DISTINCT()) is by no means slower than sum(). So I will focus on other possibilities of speeding up the GUI of our reports - I guess there are plenty, starting from the fact that many straight tables in our repórts have more than a dozen dimensions ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 May 2018 15:30:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33300#M5621</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-05-06T15:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33301#M5622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;gt;&amp;gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;CreationDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; = {&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #808080;"&gt;&lt;EM style="font-weight: inherit; font-size: 13.3333px; font-family: inherit;"&gt;$(=Makedate(Year,Month,'01'))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&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;&amp;gt;&amp;gt;I'm afraid I haven't fully understood from your post why this expression cannot work.&lt;/SPAN&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;&lt;BR /&gt;&lt;/SPAN&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;Set expressions are not evaluated on a row by row basis, they are evaluated once per chart. So the context of the set expression is actually the same as in a text box. in this context, fields like Year and Month have more than one possible value. When QV encounters more than one possible value, the expression cannot be evaluated so it returns null().&lt;/SPAN&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;&lt;BR /&gt;&lt;/SPAN&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;As is so often the case, HIC explains the issue well.&lt;/SPAN&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;&lt;A href="https://community.qlik.com/qlik-blogpost/3779"&gt;Use Aggregation Functions!&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 04:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33301#M5622</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-05-07T04:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Two different date_fields</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33302#M5623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will read that asap. I think I understand the issue now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 06:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-date-fields/m-p/33302#M5623</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-05-07T06:19:34Z</dc:date>
    </item>
  </channel>
</rss>

