<?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 over year end in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158039#M505105</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'Thanks for the reply but that did not work either ...&lt;/P&gt;&lt;P&gt;I guess what I am actually asking is can I select one field in a table and use Set analysis on a separate field in that table to determine what information to display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2009 15:38:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-17T15:38:56Z</dc:date>
    <item>
      <title>Set analysis over year end</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158035#M505101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been trying to write a chart that lets the user select a week and then displays the previous 8 weeks sales, I have managed to this by using&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Cal_Week={$(=Only(Cal_Week))}&amp;gt;} [Sales Value])&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Cal_Week={$(=Only(Cal_Week)-1)}&amp;gt;} [Sales Value]) and so on,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately this does not work if you want to cross over years, I thought I could solve this by counting the weeks I have data for and using this to go back&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Cal_WeekCount={$(=Only(Cal_WeekCount))}&amp;gt;} [Sales Value])&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Cal_WeekCount={$(=Only(Cal_WeekCount)-1)}&amp;gt;} [Sales Value]) and so on,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately I did not fully understand Set Analysis and did not realise it only worked on the selected field and not any related fields (both Cal_Week &amp;amp; Cal_WeekCount are in my calendar table).&lt;/P&gt;&lt;P&gt;Any advice on how to do this would be helpful since almost all of our data is stored in weeks and I could see this as being a regular problem for me&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gavin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 17:27:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158035#M505101</guid>
      <dc:creator />
      <dc:date>2009-08-14T17:27:07Z</dc:date>
    </item>
    <item>
      <title>Set analysis over year end</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158036#M505102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gavin,&lt;/P&gt;&lt;P&gt;You could create a new field in your calendar table that is a combination of week and year. ie 200852. You could then use this new field in your set analysis expression.&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Footsie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 18:52:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158036#M505102</guid>
      <dc:creator />
      <dc:date>2009-08-14T18:52:42Z</dc:date>
    </item>
    <item>
      <title>Set analysis over year end</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158037#M505103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I could create this new field but I cant see how this would help me, the user would still need to be able to select a week not a value on this new field so I would be in the same position as I am now trying to use Cal_WeekCount, unless I am misunderstanding what you are saying .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 19:52:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158037#M505103</guid>
      <dc:creator />
      <dc:date>2009-08-14T19:52:36Z</dc:date>
    </item>
    <item>
      <title>Set analysis over year end</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158038#M505104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a fiscal year field? You can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;" /&gt;sum({&amp;lt;Cal_WeekCount={$(=Only(Cal_WeekCount))},FiscalYear={'$(=GetFieldSelections(FiscalYear))'} &amp;gt;} [Sales Value])&lt;BR style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;" /&gt;sum({&amp;lt;Cal_WeekCount={$(=Only(Cal_WeekCount))}, FiscalYear={'$(=GetFieldSelections(FiscalYear)-1)'} &amp;gt;} [Sales Value])&lt;BR style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;" /&gt;&lt;BR style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;" /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 20:04:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158038#M505104</guid>
      <dc:creator />
      <dc:date>2009-08-14T20:04:12Z</dc:date>
    </item>
    <item>
      <title>Set analysis over year end</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158039#M505105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'Thanks for the reply but that did not work either ...&lt;/P&gt;&lt;P&gt;I guess what I am actually asking is can I select one field in a table and use Set analysis on a separate field in that table to determine what information to display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 15:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158039#M505105</guid>
      <dc:creator />
      <dc:date>2009-08-17T15:38:56Z</dc:date>
    </item>
    <item>
      <title>Set analysis over year end</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158040#M505106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can list all the fields you want to ignore in the expression, then handle the weeks as a range instead of as individual weeks. Also add a Cal_Year_Week field as Footsie suggested, and make it an actual date field, such as weekname(Cal_Date) as Cal_Year_Week. Then do something like this (untested):&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum({&amp;lt;Cal_Date=,Cal_Week,Cal_WeekCount=, // and so on for all related date fields&lt;BR /&gt; ,Cal_Year_Week={"&amp;gt;$(=weekname(max(Cal_Year_Week)-8*7) &amp;lt;=$(=max(Cal_Year_Week))"}&amp;gt;} "Sales Value")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2009 04:23:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158040#M505106</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-08-18T04:23:11Z</dc:date>
    </item>
    <item>
      <title>Set analysis over year end</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158041#M505107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;Thanks for the reply, this is well out of my experience of QlikView , I was hoping that it was a simple process of counting backwards using the week count that was created in the script, I will try to understand your suggestion and give it a go.&lt;/P&gt;&lt;P&gt;Am using&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;sum({1&amp;lt;Cal_WeekCount={$(=Only(Cal_WeekCount)-1)}&amp;gt;} [Sales Value])&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;for now and will have to manage without further selection until I understand it better !!&lt;/P&gt;&lt;P&gt;Ta,&lt;/P&gt;&lt;P&gt;Gavin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2009 20:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158041#M505107</guid>
      <dc:creator />
      <dc:date>2009-08-18T20:42:37Z</dc:date>
    </item>
    <item>
      <title>Set analysis over year end</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158042#M505108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe I'm not understanding your data. I assumed that Cal_WeekCount restarted at 1 at the beginning of each year. If it instead starts at 1 with the first week of data you have, and counts up from there without rolling back to 1 for each new year, yes, you can use that instead of a date field. Your sum({1..) says that you want to ignore ALL fields, which simplifies things as well, as you don't then have to list which fields you want to ignore. That leaves us with something like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum({1&amp;lt;Cal_WeekCount={"&amp;gt;$(=max(Cal_WeekCount)-8) &amp;lt;=$(=max(Cal_WeekCount))"}&amp;gt;} "Sales Value")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 03:02:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158042#M505108</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-08-19T03:02:48Z</dc:date>
    </item>
    <item>
      <title>Set analysis over year end</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158043#M505109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;Thanks to everyone who replied,&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;By taking sections from each proposed solution I was able to achieved my desired result. Once again thank you for taking the time to help, from your examples I feel that I now have a slightly better (still lots to learn though !!) understanding of the set analysis functions that QlikView has to offer.&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;Gavin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 21:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-over-year-end/m-p/158043#M505109</guid>
      <dc:creator />
      <dc:date>2009-08-19T21:00:52Z</dc:date>
    </item>
  </channel>
</rss>

