<?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 based on date selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312243#M407751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that won't work with set analysis, because you have to compare &lt;STRONG&gt;row by row&lt;/STRONG&gt;...&lt;/P&gt;&lt;P&gt;Set Analysis are calculated once, outside the dimension hierarchy of your chart.&lt;/P&gt;&lt;P&gt;Also expression search won't work.&amp;nbsp; ( &lt;SPAN style="text-decoration: line-through;"&gt;(sum({&amp;lt;Date1={"=Date1&amp;lt;Date2"}&amp;gt;},Value) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think you'll have to create expressions like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(Date1&amp;lt;Date2),Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also use flags in the script but then you have to join the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 May 2017 17:47:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-22T17:47:44Z</dc:date>
    <item>
      <title>Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312242#M407750</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;I want to do calculations based on a date selection and I cant figure it out how to write the set analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate the sum of PickQty based on the date selection in the master calendar.&lt;/P&gt;&lt;P&gt;%DateKey is equal to ExpectedShipDate due to the point of view (what is due on the selected date) &lt;/P&gt;&lt;P&gt;Basically I want to see: (assuming selection on %DateKey is today)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. what have I done in the past that was actually due today&lt;/P&gt;&lt;P&gt;2. what have I done today that was due today&lt;/P&gt;&lt;P&gt;3. what have I done today that was due in the future&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;1. sum(PickQty) where PickEvent = WORKLOAD and "PickDate smaller than selected %Datekey"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2. sum(PickQty) where PickEvent = WORKLOAD and "PickDate equal to selected %Datekey"&lt;/P&gt;&lt;P&gt;3. sum(PickQty) where PickEvent = WORKLOAD and "ExpectedShipDate larger than selected %Datekey &lt;SPAN style="font-size: 13.3333px;"&gt;and PickDate equal to selected %Datekey"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;One issue is the date format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;%DateKey is a regular date format but the others, PickDate and ExpectedShipDate are YYYYMMDD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I tried using a variable to work around but this makes the syntax in the set analysis even harder for me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;any help is apreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;attached a sample QVW with what I have tried so far.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Lucas&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 16:09:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312242#M407750</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-22T16:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312243#M407751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that won't work with set analysis, because you have to compare &lt;STRONG&gt;row by row&lt;/STRONG&gt;...&lt;/P&gt;&lt;P&gt;Set Analysis are calculated once, outside the dimension hierarchy of your chart.&lt;/P&gt;&lt;P&gt;Also expression search won't work.&amp;nbsp; ( &lt;SPAN style="text-decoration: line-through;"&gt;(sum({&amp;lt;Date1={"=Date1&amp;lt;Date2"}&amp;gt;},Value) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think you'll have to create expressions like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(Date1&amp;lt;Date2),Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also use flags in the script but then you have to join the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 17:47:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312243#M407751</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-22T17:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312244#M407752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm slightly confused by your example, but does this get you what you need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 20:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312244#M407752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-22T20:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312245#M407753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought about using flags but I dont know why it should not work with the set analysis. You can do the set analysis based on something like '=GetFieldSelections()'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My workaround with a variable seems to work as well: PickDate={'&amp;lt;$(vShipDate)'}&amp;nbsp; (where vShipDate is defined with an =only(EDCDate) to get the suitable date format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only when placing TWO conditions for the third workload the approach does not work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;PickEvent={'WORKLOAD'},PickDate={'$(vShipDate)'},ExpectedShipDate={'&amp;gt;$(vShipDate)'}&amp;gt;}PickQty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just found out that the above formula works when selecting ExpectedShipDate directly. Only when selecting the date via the %DateKey in the MasterCalendar the calculation does not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 11:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312245#M407753</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-23T11:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312246#M407754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you got to the same point as I did. the first two calculations with one condition work but the thirst with two conditions fails.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 11:50:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312246#M407754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-23T11:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312247#M407755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What would you expect to see?&amp;nbsp; Can you mock it up?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 14:39:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312247#M407755</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-23T14:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312248#M407756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wollo,&lt;/P&gt;&lt;P&gt;@&lt;/P&gt;&lt;P&gt;I think I got to work what I wanted to see initially.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attached you see what I wanted to see. Volumes split into the three buckets depending on the selected date.&lt;/P&gt;&lt;P&gt;BUT, I found that the selection of the %DateKey in the MasterCalendar was the problem. When Im selecting the ExpectedShipDate directly it works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%DateKey is just the duplication of the ExpectedShipDate so I dont get why it does not work. Especially since my Set Analysis works with a vShipDate which is the same independent of selecting %DateKey or directly ExpectedShipDate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 07:49:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312248#M407756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T07:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312249#M407757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two suggestions (to get it to work):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Change your vShipDate variable formula from &lt;SPAN style="font-family: 'courier new', courier;"&gt;=Only(EDCDate)&lt;/SPAN&gt; to &lt;SPAN style="font-family: 'courier new', courier;"&gt;=Max(EDCDate)&lt;/SPAN&gt;. That way it will still work when multiple values are active in EDCDate.&lt;/LI&gt;&lt;LI&gt;Add the following field reset modifier to the set analysis expression in both &lt;SPAN style="font-family: 'courier new', courier;"&gt;vWLPrepFut&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'courier new', courier;"&gt;vPRPrepFut&lt;/SPAN&gt;:&lt;BR /&gt;&amp;nbsp; &lt;SPAN style="font-family: 'courier new', courier;"&gt;... %DateKey=, ...&lt;/SPAN&gt;&lt;BR /&gt;Otherwise active selections in &lt;SPAN style="font-family: 'courier new', courier;"&gt;%DateKey&lt;/SPAN&gt; will block the set analysis modifier that tries to set &lt;SPAN style="font-family: 'courier new', courier;"&gt;ExpectedShipDate&lt;/SPAN&gt; to a range of dates.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 09:14:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312249#M407757</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-05-24T09:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312250#M407758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But tbh I dont understand what ", %DateKey=, " does in the Set Analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why would my selection in %DateKey block set ExpectedShipDate&lt;/P&gt;&lt;P&gt;I mean 23.05.2017 as %DateKey sets ExpectedShipDate to 20170523 ?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate further explanation!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyways!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 09:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312250#M407758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T09:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312251#M407759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can easily find out what I mean by playing with just the selection fields in your master calendar. Imagine that you have a set expression that modifies the regular calendar selection to always include all data from the first of the year. If my only selection will be in an EDCDate listbox, and your set analysis will reset EDCDate to include everything from Jan 1st to the maximum EDCDate, then all will be ok. But if I dare making a selection in another listbox with for example field EDCMonth, my entire set analysis breaks down. Why? Because set analysis starts from the current data set (if you don't specify set {1} ) and nobody tells set analysis to ignore the Month selection. So that one will still apply...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One word of advice: if you want to create set analysis reductions that operate on a single field in your Master Calendar, and your document has other Master Calendar fields displayed in listboxes as well, take care to reset the others in your set analysis. End-users do unexpected things. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 10:03:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312251#M407759</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-05-24T10:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312252#M407760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll play a little with the MasterCalendar to find out what you mean.&lt;/P&gt;&lt;P&gt;Thanks for your effort!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 10:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1312252#M407760</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T10:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis based on date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1671871#M449475</link>
      <description>&lt;P&gt;I am simply trying to pull the quanity oh hand value on a past date for an item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying&amp;nbsp;&lt;SPAN&gt;sum({$&amp;lt;[ItemHistory.Txn Date]={"&amp;lt;=&lt;/SPAN&gt;&lt;A target="_blank"&gt;2020-01-31&lt;/A&gt;&lt;SPAN&gt;"}&amp;gt;}[ItemHistory.Quantity On Hand])&lt;/SPAN&gt; but it is not returning the correct quantity and does not change values with a change of date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have thoughts on a solution?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 18:16:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-based-on-date-selection/m-p/1671871#M449475</guid>
      <dc:creator>maryshea</dc:creator>
      <dc:date>2020-02-03T18:16:22Z</dc:date>
    </item>
  </channel>
</rss>

