<?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 WTD with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374287#M139287</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;Is there someone that have any solution to calculate WTD (week to date) with a set analysis expression? My datefields format is YYYYMMDD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jun 2012 10:10:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-29T10:10:00Z</dc:date>
    <item>
      <title>WTD with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374287#M139287</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;Is there someone that have any solution to calculate WTD (week to date) with a set analysis expression? My datefields format is YYYYMMDD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2012 10:10:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374287#M139287</guid>
      <dc:creator />
      <dc:date>2012-06-29T10:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: WTD with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374288#M139288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming that you have a calendar with a year and a week field available in data model, the following Set Analysis should give you a week to date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$&amp;lt;Year= {$(=max(Year))}, Week= {"&amp;lt;=$(=max({&amp;lt;Year={$(=max(Year))}&amp;gt;} Week))"}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not have Year and Week as fields in your data model, simply add them in your script:&lt;/P&gt;&lt;P&gt;year(&amp;lt;&lt;EM&gt;yourdatefieldhere&amp;gt;) &lt;/EM&gt;as Year&lt;/P&gt;&lt;P&gt;week(&amp;lt;&lt;EM&gt;yourdatefieldhere&amp;gt;&lt;/EM&gt;&lt;EM&gt;) &lt;/EM&gt;as Week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jakob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2012 11:52:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374288#M139288</guid>
      <dc:creator>jjfabian</dc:creator>
      <dc:date>2012-06-29T11:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: WTD with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374289#M139289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply. Yes I have a calender in my data model but I don't really get it to work properly. My set analysis looks like:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={"$(=max(Year))"}, Week={"$(=max({&amp;lt;Year={$(=max(Year))}&amp;gt;} Week))"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 13:50:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374289#M139289</guid>
      <dc:creator />
      <dc:date>2012-07-02T13:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: WTD with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374290#M139290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, set analysis an dates can give you trouble. Dates have very different formats depending on what region code you use and so on. Your data in your calendar may look entirely different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest that you "test" your set analysis somewhere else first: Use a text object here and look for what the individual parts [=max(Year) and =max(Week)] of the set analysis give when you have a year an a week selected.&lt;/P&gt;&lt;P&gt;In most cases this is where you can find the error in your set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 13:59:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374290#M139290</guid>
      <dc:creator>jjfabian</dc:creator>
      <dc:date>2012-07-02T13:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: WTD with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374291#M139291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I understand. The date format I use looks like 'YYYYMMDD'. Could I use the date function in the set analysis, if so where? &lt;/P&gt;&lt;P&gt;It works fine when I test my individual parts max(Year) and max(Week).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 07:10:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WTD-with-set-analysis/m-p/374291#M139291</guid>
      <dc:creator />
      <dc:date>2012-07-03T07:10:40Z</dc:date>
    </item>
  </channel>
</rss>

