<?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 with two conditions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958284#M967518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally solved the problem the following way: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a variable vTestTeamName with the following definition: =EmployeeTeamName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I modified the Set Analysis to this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({1&amp;lt;Calendar_Date={"&amp;gt;=$(=weekstart(Date(Max(Calendar_Date)+7)))&amp;lt;=$(=Date(weekstart(Date(Max(Calendar_Date)+7))+6))"}, Employee_TeamName={"$(vTestTeamName)"}&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;M_ForecastHours&lt;/SPAN&gt;) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help and inspiration. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Sep 2015 12:13:28 GMT</pubDate>
    <dc:creator>alexbjorlig</dc:creator>
    <dc:date>2015-09-30T12:13:28Z</dc:date>
    <item>
      <title>Set analysis with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958279#M967513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Qlik Community. I am very new to Qlik, so I don't hope this question is already answered. I searched a lot, but cannot get it to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My sheet contains a "date picker" and a "Team picker". My objective is to present the forecast for next week, based on the users selection. I.e. if the user selects week 15, it should show the forecast for week 16. This part works. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the forecast is presented for all teams, and not limited by the selected teams. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({1&amp;lt;Calendar_Date={"&amp;gt;=$(=weekstart(Date(Max(Calendar_Date)+7)))&amp;lt;=$(=Date(weekstart(Date(Max(Calendar_Date)+7))+6))"}&amp;gt;}M_ForecastHours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can get it to work by doing this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({1&amp;lt;Calendar_Date={"&amp;gt;=$(=weekstart(Date(Max(Calendar_Date)+7)))&amp;lt;=$(=Date(weekstart(Date(Max(Calendar_Date)+7))+6))"}&amp;gt;}{$&amp;lt;Employee_TeamName={"Team ABC"}&amp;gt;}M_ForecastHours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that is not very dynamic &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really hope you can help me out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 11:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958279#M967513</guid>
      <dc:creator>alexbjorlig</dc:creator>
      <dc:date>2015-09-29T11:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958280#M967514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&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;sum({&lt;STRONG&gt;1&lt;/STRONG&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;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;The 1 in your set analysis is telling QV to ignore all user selection and calculate on the whole data set. Change this to &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if you want user selections of team etc to be regarded in the result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 15:24:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958280#M967514</guid>
      <dc:creator />
      <dc:date>2015-09-29T15:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958281#M967515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi JoeSimmons. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for taking your time to answer. Unfortunately if I change $ to 1 in the date part of the expression, I only get the dates the user selected. Let me explain it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) The user selects week 37&lt;/P&gt;&lt;P&gt;2) I wan't to present him with the forecast for next week. But that is not possible if I change $ to 1, because that is not part of the users selection...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas to solve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 19:09:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958281#M967515</guid>
      <dc:creator>alexbjorlig</dc:creator>
      <dc:date>2015-09-29T19:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958282#M967516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if the week field is Week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Week=,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Calendar_Date&lt;/SPAN&gt;={"&amp;gt;=$(=WeekStart(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Calendar_Date&lt;/SPAN&gt;)+7))&amp;lt;=$(=WeekEnd(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Calendar_Date&lt;/SPAN&gt;)+7))"}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;M_ForecastHours&lt;/SPAN&gt;)&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 19:36:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958282#M967516</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-09-29T19:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958283#M967517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maxgro. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dimension called Calendar_Week, and when I use your expression I get the right dates, but no measures &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Calendar_Week=,Calendar_Date={"&amp;gt;=$(=WeekStart(max(Calendar_Date)+7))&amp;lt;=$(=WeekEnd(max(Calendar_Date)+7))"}&amp;gt;} M_ForecastHours) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 08:21:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958283#M967517</guid>
      <dc:creator>alexbjorlig</dc:creator>
      <dc:date>2015-09-30T08:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958284#M967518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally solved the problem the following way: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a variable vTestTeamName with the following definition: =EmployeeTeamName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I modified the Set Analysis to this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({1&amp;lt;Calendar_Date={"&amp;gt;=$(=weekstart(Date(Max(Calendar_Date)+7)))&amp;lt;=$(=Date(weekstart(Date(Max(Calendar_Date)+7))+6))"}, Employee_TeamName={"$(vTestTeamName)"}&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;M_ForecastHours&lt;/SPAN&gt;) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help and inspiration. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 12:13:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958284#M967518</guid>
      <dc:creator>alexbjorlig</dc:creator>
      <dc:date>2015-09-30T12:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with two conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958285#M967519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a small application to demonstrate the problem.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/ybhvh37tq2epv37/Question.qvw?dl=0"&gt;https://www.dropbox.com/s/ybhvh37tq2epv37/Question.qvw?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see in this qlikview file, everything works as intended besides the Employee Name filter for the previous week column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brgds, Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 08:16:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-two-conditions/m-p/958285#M967519</guid>
      <dc:creator>alexbjorlig</dc:creator>
      <dc:date>2015-10-01T08:16:06Z</dc:date>
    </item>
  </channel>
</rss>

