<?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: Set analysis question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761664#M1034530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alessandro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns the right answer - but it's not great for when I want to get last year's, last months and last week's and we end up straddling months and years:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Sales history'}, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Day No]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {1},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date Abbr Month]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {Jan},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {2015}&lt;BR /&gt; &amp;gt;}&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess it does prove that these three selected fields could be another approach though?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess I'd need to use the 'only' keyword somewhere to ensure only one month, day and year is ever selected?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if this helps?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jan 2015 09:41:44 GMT</pubDate>
    <dc:creator>jag7777777</dc:creator>
    <dc:date>2015-01-09T09:41:44Z</dc:date>
    <item>
      <title>Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761654#M1034520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping someone can help with the syntax on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to create some historic comparisons of old orders to compare against my new order book in graphs, charts etc..&lt;/P&gt;&lt;P&gt;As the user&amp;nbsp; is going to choose the day, month and year for the current order book (which is tomorrow's order) we have no history for this selection. Add to that the fact I want to render last week's, last month's and last year's data - I know I definitely want set analysis for my expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not getting the expected result from my expression when I start to add the date logic. I've proved it works when just using the transaction type modifier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Things to note are the user doesn't actually select [order date]. Instead, they choose a day no, month and year from three list boxes (arranged as horizontal controls). Not sure if this is the issue - but I have tried using this approach in my set analysis too (i.e. using modifiers for all three variables).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Key fields are:&lt;/P&gt;&lt;P&gt;Transaction Type = tag for each type of data row. I only want history records&lt;/P&gt;&lt;P&gt;Order date = the order date of both sales history and order book records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current syntax is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Sales history'},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=DATE([Order date]-7)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&lt;BR /&gt; &lt;BR /&gt; &amp;gt;}&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;=DATE([Order date]-7)&amp;nbsp; &lt;SPAN style="color: #575757; font-size: 10pt;"&gt; in a standard text box it works fine - so I'm guessing it's something to do with scope or evaluation order?&lt;/SPAN&gt;&lt;/SPAN&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As said above, the order date isn't actually selected by the user - but there is a selection on three other fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Order Day No&lt;/P&gt;&lt;P&gt;Order Year&lt;/P&gt;&lt;P&gt;Order Date Abbr Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I've also tried setting these all to empty in my expression, but this has just summed the entire tonnage of my data set....?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Sales history'},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=DATE([Order date]-7)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Day No]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date Abbr Month]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;BR /&gt; &lt;BR /&gt; &amp;gt;}&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&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;/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;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;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2020 18:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761654#M1034520</guid>
      <dc:creator>jag7777777</dc:creator>
      <dc:date>2020-11-20T18:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761655#M1034521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that correct syntax should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Sales history'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'$(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;=DATE([Order date]-7))'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Let me know&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 08:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761655#M1034521</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-01-09T08:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761656#M1034522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use makedate() to create a date from year, month &amp;amp; day fields and include this in your set expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. makedate(year, month,day)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substituting your actual fields for year, month &amp;amp; day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Sales history'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'$(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;=&lt;SPAN style="color: #575757; font-size: 10pt;"&gt;makedate(year, month, day)- &lt;/SPAN&gt;7) '&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 08:58:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761656#M1034522</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-01-09T08:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761657#M1034523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Alessandro. Unfortunately, this still returns a 0. I've tried adding to your suggestion clearing the three selected fields - but this then gives me the entire tonnage again....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:02:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761657#M1034523</guid>
      <dc:creator>jag7777777</dc:creator>
      <dc:date>2015-01-09T09:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761658#M1034524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Colin. I'm tempted to try this - but I also want to create expressions for last month and last year figures - and I already have my expressions on standby with AddMonths and AddYears.....?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I subtract months and years using make date do you know?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:04:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761658#M1034524</guid>
      <dc:creator>jag7777777</dc:creator>
      <dc:date>2015-01-09T09:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761659#M1034525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Surely the problem comes from the date format and /or transformation, try your set analysis replacing&lt;/P&gt;&lt;P&gt;'$(&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;=DATE([Order date]-7))' with a fixex date (like 2014/12/31 or 31/12/2014 ...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;let me know&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:11:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761659#M1034525</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-01-09T09:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761660#M1034526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alessandro - I think we're getting closer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the below, I just get the sum of sales history tonnes - i.e. it seems to be ignoring the order date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Sales history'}, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'$(=DATE(2014/01/08))'} &amp;gt;} &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:19:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761660#M1034526</guid>
      <dc:creator>jag7777777</dc:creator>
      <dc:date>2015-01-09T09:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761661#M1034527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using only [order date] without using the function date ,...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761661#M1034527</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-01-09T09:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761662#M1034528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IS my date format correct - sorry, but I'm used to TSQL and don't have any experience of explicitly entering dates...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Sales history'}, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'2015/01/01'} &amp;gt;} &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run the above next to another text box which just has =sum(Tonnes]) in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference between the two is just the transaction type - i.e. one is the sum of just sales history tonnes and the other is the sum of all tonnes. The date is being completely ignored?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:36:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761662#M1034528</guid>
      <dc:creator>jag7777777</dc:creator>
      <dc:date>2015-01-09T09:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761663#M1034529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check Orderdate format&amp;nbsp; and then put in bracket &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; its YYYY/DD/MM then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&amp;lt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={'Sales history'}, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Order Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; = {'2015/01/01'} &amp;gt;} &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;i will suggets you could use YYYY-MM-DD or DD-MM-YYYY format &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:39:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761663#M1034529</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2015-01-09T09:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761664#M1034530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alessandro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns the right answer - but it's not great for when I want to get last year's, last months and last week's and we end up straddling months and years:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Sales history'}, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Day No]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {1},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date Abbr Month]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {Jan},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {2015}&lt;BR /&gt; &amp;gt;}&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess it does prove that these three selected fields could be another approach though?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess I'd need to use the 'only' keyword somewhere to ensure only one month, day and year is ever selected?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if this helps?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761664#M1034530</guid>
      <dc:creator>jag7777777</dc:creator>
      <dc:date>2015-01-09T09:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761665#M1034531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've seen again your expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=DATE([Order date]-7)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} as you said (and I agree) the problem is here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Set analysis symtax work in this way: Field = Value(s) but these values cannot be explicited by the same or another field that is you cannot write Field = Field+1, it doesn't work. Field = Max(field) for example works because on the right side you are expliciting only one value (a fixed value)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;So the mistake is this, you should try to replace the right side with the getfieldselection([order date]) for example or you could compute a new field in the script and use it as a flag.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hope it helps you, do not hesitate to ask more.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:43:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761665#M1034531</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-01-09T09:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761666#M1034532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hence create DateID&amp;nbsp; in your calender for best practice &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In calender script&lt;/P&gt;&lt;P&gt;Autogeneate128(Monthend(OrderDate)) as DateID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;later use DateID in Expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&amp;lt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={'Sales history'},&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DateID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; = {$(=Max(DateID)-7)}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Order Day No]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Order Date Abbr Month]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Order Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=&lt;BR /&gt;&lt;BR /&gt;&amp;gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 10:22:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761666#M1034532</guid>
      <dc:creator>sunilkumarqv</dc:creator>
      <dc:date>2015-01-09T10:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761667#M1034533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our QlikView partners, Ometis, pointed us in the right direction in the end. They suggested using the FLOOR function on our timestamp field to create a date field in our dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I did this, I was able to use the following set analysis script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Transaction type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Sales history'}, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=$(vLastWeek))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Day No]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = ,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order Date Abbr Month]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;BR /&gt; &amp;gt;}&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Tonnes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where vLastWeek can be interchanged with vLastYear, vLastMonth etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variables are declared as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vLastWeek - &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;only&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-7&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vLastMonth -&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;only&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),-1,0)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vLastYear -&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AddYears&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;only&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Order date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),-1)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thought I'd post the solution in case it helped anyone else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 11:57:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-question/m-p/761667#M1034533</guid>
      <dc:creator>jag7777777</dc:creator>
      <dc:date>2015-01-13T11:57:25Z</dc:date>
    </item>
  </channel>
</rss>

