<?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: Using input fields to select date range in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-input-fields-to-select-date-range-in-set-analysis/m-p/551150#M205843</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Angad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Snapshot Date field did not have an impact in testing. Our charts with expression 1) were still blank... &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jan 2014 17:57:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-22T17:57:41Z</dc:date>
    <item>
      <title>Using input fields to select date range in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-input-fields-to-select-date-range-in-set-analysis/m-p/551148#M205841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello QlikCommunity,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having some issues setting a date range in the set analysis and could really use some help. We believe our issues are coming from the use of an input field(StartDate &amp;amp; EndDate) that is dynamically set by the user by location. We would like to analyze locations for different business divisions based upon the date range set by the user that typically corresponds to when a certain product mix was in stock. Each business division has it's own set of data so the date ranges/locations change and we reuse our .qvw for several business divisions and would like to expand to additional business divisions for which the locations and date ranges are currently unknown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what we have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Location&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;StartDate&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;EndDate&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3/20/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5/30/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5/30/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3/15/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6/15/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;E&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3/20/2013&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what we have tried. These expressions have worked when all the start/end dates are the same, but when they are different they do not: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;STRONG style="font-size: 12pt;"&gt;1)&lt;/STRONG&gt; =&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Money&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Sum(&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;{&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[Snapshot Date]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;={'$(=(max([Snapshot Date])))'}, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[Sales Date]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;"&amp;gt;=$(=date(StartDate,'MM/DD/YYYY')) &amp;lt;=$(=date(EndDate,'MM/DD/YYYY'))"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;}&amp;gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Sales), '$#,##0') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;STRONG&gt;2)&lt;/STRONG&gt;&lt;/SPAN&gt; =Money&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Snapshot Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=(max(ALL [Snapshot Date])))'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Sales Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;gt;=$(StartDate)'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Salex Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;lt;=$(EndDate)'}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sales), '$#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style=": ; color: #000000; font-size: 12pt;"&gt;3)&lt;/STRONG&gt; =Money&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Snapshot Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=(max([Snapshot Date])))'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Salex Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=([Salex Date]&amp;gt;=StartDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;*&lt;BR /&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Snapshot Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=(max([Snapshot Date])))'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Salex Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=([Discharge Date]&amp;lt;=EndDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sales), '$#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;We have purposefully avoided using if statements because of how we treat null values. Does anyone have any other ideas on how we could make this work in the set analysis?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Your thoughts are much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thanks, Alex&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 15:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-input-fields-to-select-date-range-in-set-analysis/m-p/551148#M205841</guid>
      <dc:creator />
      <dc:date>2014-01-22T15:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using input fields to select date range in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-input-fields-to-select-date-range-in-set-analysis/m-p/551149#M205842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 1) expression looks good to me. Can you remove the Snapshot Date filter and just keep the Sales Date filter for testing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 17:15:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-input-fields-to-select-date-range-in-set-analysis/m-p/551149#M205842</guid>
      <dc:creator />
      <dc:date>2014-01-22T17:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using input fields to select date range in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-input-fields-to-select-date-range-in-set-analysis/m-p/551150#M205843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Angad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Snapshot Date field did not have an impact in testing. Our charts with expression 1) were still blank... &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 17:57:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-input-fields-to-select-date-range-in-set-analysis/m-p/551150#M205843</guid>
      <dc:creator />
      <dc:date>2014-01-22T17:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using input fields to select date range in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-input-fields-to-select-date-range-in-set-analysis/m-p/551151#M205844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A set analysis expression creates one set for the entire chart, not a set per row. It sounds like you want a set for each location. That would mean you can't use set analysis expressions. You'll have to use if statements I'm afraid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 18:10:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-input-fields-to-select-date-range-in-set-analysis/m-p/551151#M205844</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-01-22T18:10:15Z</dc:date>
    </item>
  </channel>
</rss>

