<?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 date variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691180#M506897</link>
    <description>&lt;P&gt;I forgot to specify that&amp;nbsp;&lt;EM&gt;vDataFore&amp;nbsp;&lt;/EM&gt;has this value:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table2.png" style="width: 245px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/31322i89A7E3FAC6AD2392/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table2.png" alt="Table2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2020 10:24:02 GMT</pubDate>
    <dc:creator>frank1982</dc:creator>
    <dc:date>2020-04-06T10:24:02Z</dc:date>
    <item>
      <title>Set analysis with date variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691162#M506896</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I need help to build a set analysis. I have the following data:&lt;/P&gt;&lt;P&gt;1. A Field &lt;STRONG&gt;&lt;EM&gt;DATA&lt;/EM&gt; &lt;/STRONG&gt;(the reference date of my data);&lt;/P&gt;&lt;P&gt;2. A variabile &lt;STRONG&gt;&lt;EM&gt;vDataFore&lt;/EM&gt; &lt;/STRONG&gt;(a date -give from an input box- that I have to compare with field DATA);&lt;/P&gt;&lt;P&gt;3. A Field &lt;STRONG&gt;&lt;EM&gt;LOAD1&lt;/EM&gt; &lt;/STRONG&gt;(the data that I have to analyze).&lt;/P&gt;&lt;P&gt;The target of my analysis is to visualize, into a table, the difference between:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;LOAD_of_row_Date - LOAD_of_vDataFore_Date&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To obtain this, I wrote the set analysis (in column &lt;STRONG&gt;&lt;EM&gt;D-LOAD1&lt;/EM&gt;&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum(LOAD1)-Sum({&amp;lt;DATA={"=$(vDataFore)"}&amp;gt;}LOAD1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But the result is&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table.png" style="width: 296px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/31320i6B84ADDF718DFC4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table.png" alt="Table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Where is the mistake? Someone could help me?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 09:35:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691162#M506896</guid>
      <dc:creator>frank1982</dc:creator>
      <dc:date>2020-04-06T09:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with date variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691180#M506897</link>
      <description>&lt;P&gt;I forgot to specify that&amp;nbsp;&lt;EM&gt;vDataFore&amp;nbsp;&lt;/EM&gt;has this value:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table2.png" style="width: 245px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/31322i89A7E3FAC6AD2392/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table2.png" alt="Table2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 10:24:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691180#M506897</guid>
      <dc:creator>frank1982</dc:creator>
      <dc:date>2020-04-06T10:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with date variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691182#M506899</link>
      <description>&lt;P&gt;Try removing '=' in set modifier like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum(LOAD1)-Sum({&amp;lt;DATA={'$(vDataFore)'}&amp;gt;}LOAD1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Also, make sure that you variable date format is same as your date field DATA.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 10:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691182#M506899</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-04-06T10:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with date variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691189#M506900</link>
      <description>&lt;P&gt;Hi Tresesco,&lt;/P&gt;&lt;P&gt;thanks for your answer, I applied your suggestion to my table, but the result is the following&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table3.png" style="width: 389px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/31323i4E817690FF9508E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table3.png" alt="Table3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I added the column &lt;STRONG&gt;&lt;EM&gt;Test&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;=&amp;nbsp;&lt;EM&gt;if(DATA=vDataFore,'si','no') &lt;/EM&gt;to verify the format Date.&lt;/P&gt;&lt;P&gt;I though that the problem could be related to the format of Dates, but I don't have evidence of this.&lt;/P&gt;&lt;P&gt;Do you have any other suggestion?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 10:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691189#M506900</guid>
      <dc:creator>frank1982</dc:creator>
      <dc:date>2020-04-06T10:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with date variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691199#M506902</link>
      <description>&lt;P&gt;&lt;EM&gt;Comparison in IF and Set Analysis are not always similar.&lt;/EM&gt; Set analysis comparison is always based on literals/string unlike IF. So, though you can validate that if gets it right, it might not be same with set analysis that demands format match. Could you share your sample app? Otherwise try another variation like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum(LOAD1)-Sum({&amp;lt;DATA={"$(&lt;STRONG&gt;=Date&lt;/STRONG&gt;(vDataFore, '&lt;STRONG&gt;DD-MM-YYYY')&lt;/STRONG&gt;)"&amp;gt;}LOAD1)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 12:07:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691199#M506902</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-04-06T12:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with date variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691241#M506903</link>
      <description>&lt;P&gt;The actual result of my table is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table4.png" style="width: 391px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/31330iC2673149B4C93B0B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table4.png" alt="Table4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now the difference is done only for the row where &lt;EM&gt;DATA&lt;/EM&gt;=&lt;EM&gt;vDataFore&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I would like the difference for each row, instead.&lt;/P&gt;&lt;P&gt;I share a light version of my app and the data to upload (it is necessary to unzip the file and change the Path into the Load).&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 13:37:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691241#M506903</guid>
      <dc:creator>frank1982</dc:creator>
      <dc:date>2020-04-06T13:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with date variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691246#M506904</link>
      <description>&lt;P&gt;Add 'TOTAL' in your second sum(), like:&lt;/P&gt;&lt;P&gt;=Sum(LOAD1)-Sum(&lt;FONT color="#FF0000"&gt;total&lt;/FONT&gt; {&amp;lt;DATA={"$(=Date(vDataFore,'DD-MM-YYYY'))"}&amp;gt;}LOAD1)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 13:41:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691246#M506904</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-04-06T13:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with date variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691264#M506905</link>
      <description>&lt;P&gt;Ok, now it works!&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 14:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-date-variable/m-p/1691264#M506905</guid>
      <dc:creator>frank1982</dc:creator>
      <dc:date>2020-04-06T14:17:54Z</dc:date>
    </item>
  </channel>
</rss>

