<?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 depending on selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069906#M357451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you never want to use the max Date value then try something like the intersection of the possible values resulting from the selections with all Date values smaller than the max Date value:&lt;/P&gt;&lt;P&gt;sum({$*&amp;lt;Order_Date={'&amp;lt;$(=Date(max(Date)-1))'}&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 May 2016 15:58:45 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-05-04T15:58:45Z</dc:date>
    <item>
      <title>Set analysis depending on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069905#M357450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran in a problem with set analysis, which is not working like I want. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;But I guess you can help me pretty fast with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i wanted to do is sum the sales value depending on the selection I make in the Date field. The Order_Date and the Date are not linked so I wanted to do a set analysis to filter the field in my table accordingly. &lt;/P&gt;&lt;P&gt;The thing is that if I select only the max date value which would be today I have to display the sales from yesterday, thats why it is Date-1 in my function as I cannot display todays sales which I actually not have. If the user selects multiple date values the sales should be sumed up over the selected values, therefore $Order_Date=Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable vDateSelection:&lt;/P&gt;&lt;P&gt;=if(GetSelectedCount(Date)=1, 'Order_Date=Date-1', '$Order_Date=Date')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function in the table:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;$(vDateSelection)&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Especially the part with only one date selected isnt working properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you can help here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 08:44:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069905#M357450</guid>
      <dc:creator />
      <dc:date>2016-05-04T08:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis depending on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069906#M357451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you never want to use the max Date value then try something like the intersection of the possible values resulting from the selections with all Date values smaller than the max Date value:&lt;/P&gt;&lt;P&gt;sum({$*&amp;lt;Order_Date={'&amp;lt;$(=Date(max(Date)-1))'}&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 15:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069906#M357451</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-05-04T15:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis depending on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069907#M357452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not 100% sure what you are trying to do with your expression. Would you be able to share a sample with expected output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 15:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069907#M357452</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-04T15:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis depending on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069908#M357453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need a set modifier like this in your Set Analysis, which you can have a variable&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;= '&amp;gt;='&amp;amp; Min([Selected Date]) &amp;amp; '&amp;lt;=' &amp;amp; Max([Selected Date])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 16:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069908#M357453</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2016-05-04T16:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis depending on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069909#M357454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the answers so far.&lt;/P&gt;&lt;P&gt;But they didnt help me so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to explain what I need with an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I select the 09.05.2016 which is today (in field Date).&lt;/P&gt;&lt;P&gt;The selection for Order_Date must be the 08.05.2016 as I do not have Sales data for Today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I select the 08.05.2016, which is yesterday, it currently shows me the 07.05.2016 then. The ideal solution would be that it shows me then the data from 08.05.2016. So that Order_Date is also 08.05.2016. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I select multiple dates it should sum up the Sales for those values. E.g. I select 06.05 &amp;amp; 07.05, I want to select the same for Order_Date in the set analysis and sum accordingly. &lt;/P&gt;&lt;P&gt;On the other hand if I select 07.05, 08.05 &amp;amp; 09.05(Today), I only want to sum up values for 07.05 &amp;amp; 08.05 as I do not have values for the 09.05.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that clarifies how it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 12:00:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069909#M357454</guid>
      <dc:creator />
      <dc:date>2016-05-09T12:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis depending on selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069910#M357455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(GetFieldSelections(Date) = 0, S&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;um({&amp;lt;Date = {"$(=Date(Today() - 1, 'DD.MM.YYYY'))"}&amp;gt;}Sales), Sum(Sales))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 15:23:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-depending-on-selection/m-p/1069910#M357455</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-09T15:23:30Z</dc:date>
    </item>
  </channel>
</rss>

