<?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 Set Analysis between dates using another fiel in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196893#M505266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="background-color: #ffffff; margin: 8px; font-family: Arial, Helvetica, sans-serif; color: #000000; font-size: 12px; -webkit-background-clip: initial; -webkit-background-origin: initial;"&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to calculate the impact of a new product launch. A new product is only new for so long so need to use set analysis to restrict the date range.&lt;/P&gt;&lt;P&gt;Alongside each sales line I have the launch date for the product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in theory the set analysis should look something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;/P&gt;&lt;P&gt;[ShipDate]={"&amp;gt;=LaunchDate &amp;lt;([LaunchDate]+35)"}&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Quantity) however if I use this I get no results if I discreetly enter the dates I get the correct answer as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;/P&gt;&lt;P&gt;[ShipDate]={"&amp;gt;=LaunchDate &amp;lt;([LaunchDate]+35)"}&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Quantity)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached an example - am I just doing something wrong with the syntax for using the launchdate or am I trying to do something that is not possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2009 19:37:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-23T19:37:24Z</dc:date>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196893#M505266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="background-color: #ffffff; margin: 8px; font-family: Arial, Helvetica, sans-serif; color: #000000; font-size: 12px; -webkit-background-clip: initial; -webkit-background-origin: initial;"&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to calculate the impact of a new product launch. A new product is only new for so long so need to use set analysis to restrict the date range.&lt;/P&gt;&lt;P&gt;Alongside each sales line I have the launch date for the product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in theory the set analysis should look something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;/P&gt;&lt;P&gt;[ShipDate]={"&amp;gt;=LaunchDate &amp;lt;([LaunchDate]+35)"}&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Quantity) however if I use this I get no results if I discreetly enter the dates I get the correct answer as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;/P&gt;&lt;P&gt;[ShipDate]={"&amp;gt;=LaunchDate &amp;lt;([LaunchDate]+35)"}&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Quantity)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached an example - am I just doing something wrong with the syntax for using the launchdate or am I trying to do something that is not possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 19:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196893#M505266</guid>
      <dc:creator />
      <dc:date>2009-09-23T19:37:24Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196894#M505267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;what you need is to define what we call an AdHoc Variable&lt;/P&gt;&lt;P&gt;$(=&lt;/P&gt;&lt;P&gt;see your file for more information.&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 20:00:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196894#M505267</guid>
      <dc:creator />
      <dc:date>2009-09-23T20:00:29Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196895#M505268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why? This expression dont work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;({&amp;lt;&lt;STRONG&gt;[LaunchDate]&lt;/STRONG&gt;={&lt;STRONG&gt;"&amp;gt;=$(=ShipDate) &amp;lt;$(=Date(([ShipDate]+35)))"&lt;/STRONG&gt;}&amp;gt;}&lt;STRONG&gt;Quantity&lt;/STRONG&gt;)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 21:02:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196895#M505268</guid>
      <dc:creator />
      <dc:date>2009-10-14T21:02:02Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196896#M505269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does in the attached example, yours is the wrong way around?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 18:26:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196896#M505269</guid>
      <dc:creator />
      <dc:date>2009-10-23T18:26:33Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196897#M505270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gah! I didn't notice this post was so very very old. And it doesn't look like I can delete posts any more.&lt;/P&gt;&lt;P&gt;Anyway, a trick for debugging set analysis expressions is to make it the first expression in your chart, and to NOT give it a label, or to give the chart itself a title. At that point, your set analysis expression will show as the chart title, and how QlikView is INTERPRETING it will show as the column heading. So in your case, the column heading SHOULD have dates in it, but instead still has LaunchDate. That then tells you that QlikView isn't reading what you wrote like you want it to.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Oct 2009 06:09:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196897#M505270</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-24T06:09:51Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196898#M505271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've formatted your second condition in the Set.&lt;BR /&gt;it looks like this and it works:&lt;BR /&gt;SUM( { $ &amp;lt; ShipDate = {"&amp;gt;=LaunchDate &amp;lt;$(=DATE(LaunchDate+35,'DD/MM/YYYY'))"} &amp;gt; } Quantity)&lt;/P&gt;&lt;P&gt;Why? Because i saw in a ListBox the result of LaunchDate+35. It was 39858. Numeric.&lt;BR /&gt;And since the number formatting in the document for both dates was DD/MM/YYYY, i thought that should resolve the problem.&lt;BR /&gt;(practicaly, he compares 10/01/2009 with 39858).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;By the way. In Set Analysis i think the implicit conversion don't happen.&lt;BR /&gt;For example. Format the quantity like this:&lt;BR /&gt;- Number Format Settings = Integer,&lt;BR /&gt;- Format Pattern = 0.00&lt;BR /&gt;and make a chart with this formula:&lt;BR /&gt;SUM( { $ &amp;lt; Quantity = {10} &amp;gt; } Quantity )&lt;BR /&gt;and another one with this formula:&lt;BR /&gt;SUM( { $ &amp;lt; Quantity = {10.00} &amp;gt; } Quantity )&lt;BR /&gt;and see which works.&lt;/P&gt;&lt;P&gt;And bare in mind that you can use an If function as well.&lt;BR /&gt;SUM( IF(ShipDate&amp;gt;=LaunchDate AND ShipDate&amp;lt;LaunchDate+35, Quantity) )&lt;BR /&gt;(in if function, it takes place an implicit conversion, i think).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2009 20:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196898#M505271</guid>
      <dc:creator>mongolu</dc:creator>
      <dc:date>2009-10-25T20:30:12Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196899#M505272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you're right that in set analysis, the implicit conversion doesn't happen. If you're making a set for a field, you appear to have to format the values in the set so that they match the format of the field. If you don't, they won't match. And as you say, that is different than an IF statement, where the formats don't have to be the same as long as they have the same underlying value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 04:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196899#M505272</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-27T04:57:18Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196900#M505273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well John. Coming from you (a great person for the community) means a lot.&lt;/P&gt;&lt;P&gt;Thanks for your words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So... this is an undesirable headache.&lt;BR /&gt;(in the manual at page 813, says that a datatype has to representations:&lt;BR /&gt;- one text,&lt;BR /&gt;- one numeric (only when the data can be interpreted as a valid number)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Perhaps IF uses numeric representation and Set Analysis uses text representation.&lt;/P&gt;&lt;P&gt;And from Rob's Wunderlich post (&lt;A href="http://qlikviewnotes.blogspot.com/2008/05/memory-sizes-for-data-types.html"&gt;http://qlikviewnotes.blogspot.com/2008/05/memory-sizes-for-data-types.html&lt;/A&gt;) regarding memory sizes for data types, i presume that memory utilisation for a Set Analysis using text representation is bigger than one using numeric representation.&lt;/P&gt;&lt;P&gt;- numeric : 1-10 digits, 4 bytes&lt;/P&gt;&lt;P&gt;- string : "1" uses 11 bytes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should we ask QlikTech about that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 06:35:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196900#M505273</guid>
      <dc:creator>mongolu</dc:creator>
      <dc:date>2009-10-27T06:35:19Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196901#M505274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i tested the lauchtest.qvw and doesnt work, i'm using the 9.00.7119.4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 19:44:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196901#M505274</guid>
      <dc:creator />
      <dc:date>2009-10-27T19:44:47Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196902#M505275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My understanding was that QlikView is using IEEE double-precision binary floating point for numbers. That's 64 bits, or 8 bytes. If Rob is seeing 4 bytes or 13 bytes depending on the number of digits, that's very curious, and I should probably look into it. For one thing, 32 bits of storage simply isn't enough to represent all possible 10-digit numbers.&lt;/P&gt;&lt;P&gt;I believe you're right about IF using numeric representation of numbers, and set analysis using a text representation. I don't have any proof, but it is very consistent with what I've seen, so that's been my working assumption for quite some time now.&lt;/P&gt;&lt;P&gt;I highly doubt that this causes a memory or performance problem in most cases due to the way that QlikView seems to work. Say we have a million rows with 100 distinct values for some numeric field. Then we write a set analysis expression like sum({&amp;lt;MyNumber={5,20,100}&amp;gt;} SomeOtherNumber). The only wasted bytes are for the values 5, 20 and 100, which I suspect are stored as text instead of as numbers. That's trivial. When it comes time to execute this expression, set analysis essentially selects those values. To select those values, it would ideally convert them to numbers and then select the matching numbers from the list of 100. Instead, it appears to work the opposite direction, taking the list of 100 numbers, converting to text, and then selecting the matches. But it is a trivial operation to convert 100 numbers to text, so it won't cause any performance problems either. The only time I could see this being a problem is if you use set analysis to select values of a unique ID with millions of values. I suspect all of the conversion to text might then be a big and unnecessary performance headache. But all of these are just guesses on my part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 22:21:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196902#M505275</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-27T22:21:21Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196903#M505276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, glad I have managed to provoke some conversation &lt;IMG alt="Indifferent" src="http://community.qlik.com/emoticons/emotion-8.gif" /&gt;. I have got this working perfectly but have now added a second complication;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I actually want to see this for multiple products with different launch dates, ultimately trying to get a moving average over a 12 month period where a sale is included if it is within 12 months of the launch date&lt;/P&gt;&lt;P&gt;Such a scenario is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Product 1 is launched 01/02/2008 so it sales would be included in all months until 31/01/2009&lt;/P&gt;&lt;P&gt;Product 2 is launched 01/04/2008 so its sales would be included in all months until 31/03/2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we report on January 2009 both products sales should be included and if we report February 2009 only product 2 would be included even if there were sales for February 2009.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached an example using different dates as I'm not sure it is as clear as the above. But what happens basically is that the expression can't work out what the date should be. Am thinking I should be combing with an if function but not sure this would be any better? any help much appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2009 01:58:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196903#M505276</guid>
      <dc:creator />
      <dc:date>2009-10-30T01:58:35Z</dc:date>
    </item>
    <item>
      <title>Set Analysis between dates using another fiel</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196904#M505277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have you find a solution at the problem ?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 08:04:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-between-dates-using-another-fiel/m-p/196904#M505277</guid>
      <dc:creator />
      <dc:date>2010-07-12T08:04:16Z</dc:date>
    </item>
  </channel>
</rss>

