<?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: Use a field in set analysis comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-a-field-in-set-analysis-comparison/m-p/74806#M767572</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry sir, but looking at the expression doesn't give me too much information as to what you have and what you want. As I asked earlier, would be able to provide &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;few rows of data with the expected output to understand your issue better?&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;BR /&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;Best,&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;Sunny&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2018 13:34:56 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-06-25T13:34:56Z</dc:date>
    <item>
      <title>Use a field in set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Use-a-field-in-set-analysis-comparison/m-p/74803#M767569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this sum expression that I need to find all items that between 2 dates.&amp;nbsp; The issue is that different items have a different date that I need to look back. Here is the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({DateKey={"&amp;lt;=$(vMax_SO_Closed_GlobalDateNum)&amp;gt;$(=vMax_SO_Closed_GlobalDateNum-DaysTillDead)"}&amp;gt;}&amp;nbsp; [Actual Quantity])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMax_SO_Closed_GlobalDateNum is a variable that gives the highest date in the file&lt;/P&gt;&lt;P&gt;DaysTillDead is a field in the Item Class Table, so all items in the Chicken class will have a certain number and all the items in the Vegetables class will have a different number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As examples of what they should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({DateKey={"&amp;lt;=$(vMax_SO_Closed_GlobalDateNum)&amp;gt;$(=vMax_SO_Closed_GlobalDateNum-30)"}&amp;gt;}&amp;nbsp; [Actual Quantity])&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;Sum({DateKey={"&amp;lt;=$(vMax_SO_Closed_GlobalDateNum)&amp;gt;$(=vMax_SO_Closed_GlobalDateNum-14)"}&amp;gt;}&amp;nbsp; [Actual Quantity])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is when I use the field, the second half of the DateKey expression doesn't work and I get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({DateKey={"&amp;lt;=$(vMax_SO_Closed_GlobalDateNum)"}&amp;gt;}&amp;nbsp; [Actual Quantity])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get this to work? What do I need to do?&amp;nbsp; I don't think I can use a variable because it is different depending on the item. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-a-field-in-set-analysis-comparison/m-p/74803#M767569</guid>
      <dc:creator>djbloiss</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use a field in set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Use-a-field-in-set-analysis-comparison/m-p/74804#M767570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share few rows of data with the expected output to understand your issue better? Also, it seems that you might need Aggr() function with if condition rather than using set analysis because set analysis is evaluated once per chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 13:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-a-field-in-set-analysis-comparison/m-p/74804#M767570</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-25T13:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Use a field in set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Use-a-field-in-set-analysis-comparison/m-p/74805#M767571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay, I didn't know that about set analysis but here is the full expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (isNull(ParentItem_Flag) AND Sum({&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateKey={"&amp;lt;=$(vMax_SO_Closed_GlobalDateNum)&amp;gt;$(=vMax_SO_Closed_GlobalDateNum-DaysTillDead)"}&amp;gt;}&amp;nbsp; [Actual Quantity])=0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum([Case qty on hand])&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I change the if to test for between those two dates should equal 0.&amp;nbsp; That is why I was using set analysis.&lt;/P&gt;&lt;P class="jive-thread-reply-btn"&gt;&lt;/P&gt;&lt;DIV class="jive-thread-reply-btn-correct"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/305938?sr=inbox&amp;amp;ru=171708"&gt;&lt;SPAN class="j-correct-btn-star j-ui-elem"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 13:33:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-a-field-in-set-analysis-comparison/m-p/74805#M767571</guid>
      <dc:creator>djbloiss</dc:creator>
      <dc:date>2018-06-25T13:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Use a field in set analysis comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Use-a-field-in-set-analysis-comparison/m-p/74806#M767572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry sir, but looking at the expression doesn't give me too much information as to what you have and what you want. As I asked earlier, would be able to provide &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;few rows of data with the expected output to understand your issue better?&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;BR /&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;Best,&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;Sunny&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 13:34:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-a-field-in-set-analysis-comparison/m-p/74806#M767572</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-25T13:34:56Z</dc:date>
    </item>
  </channel>
</rss>

