<?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 Aggr/Set Analysis/ Nested help? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-Set-Analysis-Nested-help/m-p/325320#M119844</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone help me get this expression to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if([Qty Bearing]=1 and [Year Ordered]&amp;gt;=2008,&lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;count({$&amp;lt;[Year Ordered]={"&amp;gt;=2008"}&amp;gt;}DISTINCT [Year Ordered])&lt;/P&gt;&lt;P&gt;&amp;lt;3,0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Line Amount])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need this to work for a Pivot Table with dimensions&lt;/P&gt;&lt;P&gt;Part,&lt;/P&gt;&lt;P&gt;Part Description,&lt;/P&gt;&lt;P&gt;Product Group,&lt;/P&gt;&lt;P&gt;Part Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a straight table this expression works perfectly. It also works if in the pivot the highest group is Part:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(count({$&amp;lt;[Year Ordered]={"&amp;gt;=2008"}&amp;gt;}DISTINCT [Year Ordered])&amp;lt;3,0,&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Qty Bearing]={'1'},[Year Ordered]={"&amp;gt;=2008"}&amp;gt;}[Line Amount]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as this is grouped by Product or Class it no longer takes the "limiting expression" into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically only want to return order amounts if the part has been ordered at least 3 of the past 5 years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Feb 2012 16:08:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-28T16:08:16Z</dc:date>
    <item>
      <title>Aggr/Set Analysis/ Nested help?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Set-Analysis-Nested-help/m-p/325320#M119844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone help me get this expression to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if([Qty Bearing]=1 and [Year Ordered]&amp;gt;=2008,&lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;count({$&amp;lt;[Year Ordered]={"&amp;gt;=2008"}&amp;gt;}DISTINCT [Year Ordered])&lt;/P&gt;&lt;P&gt;&amp;lt;3,0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Line Amount])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need this to work for a Pivot Table with dimensions&lt;/P&gt;&lt;P&gt;Part,&lt;/P&gt;&lt;P&gt;Part Description,&lt;/P&gt;&lt;P&gt;Product Group,&lt;/P&gt;&lt;P&gt;Part Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a straight table this expression works perfectly. It also works if in the pivot the highest group is Part:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(count({$&amp;lt;[Year Ordered]={"&amp;gt;=2008"}&amp;gt;}DISTINCT [Year Ordered])&amp;lt;3,0,&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Qty Bearing]={'1'},[Year Ordered]={"&amp;gt;=2008"}&amp;gt;}[Line Amount]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as this is grouped by Product or Class it no longer takes the "limiting expression" into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically only want to return order amounts if the part has been ordered at least 3 of the past 5 years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 16:08:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Set-Analysis-Nested-help/m-p/325320#M119844</guid>
      <dc:creator />
      <dc:date>2012-02-28T16:08:16Z</dc:date>
    </item>
    <item>
      <title>Aggr/Set Analysis/ Nested help?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Set-Analysis-Nested-help/m-p/325321#M119845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try limiting your parts to the subset that actually have the count of orders you need, maybe along these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( {&amp;lt;[Qty Bearing]={'1'}, [Year Ordered]={"&amp;gt;=2008"}, Part={"=count({$&amp;lt;[Year Ordered]={2008,2009,2010,2011,2012}&amp;gt;} DISTINCT [Year Ordered])&amp;gt;=3"} &amp;gt;} [Line Amount]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 16:25:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Set-Analysis-Nested-help/m-p/325321#M119845</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-28T16:25:40Z</dc:date>
    </item>
    <item>
      <title>Aggr/Set Analysis/ Nested help?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Set-Analysis-Nested-help/m-p/325322#M119846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You sir are a genius. I wish I could give you more than just the correct answer. Would have taken me all week and I would never have thought of that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 16:37:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Set-Analysis-Nested-help/m-p/325322#M119846</guid>
      <dc:creator />
      <dc:date>2012-02-28T16:37:15Z</dc:date>
    </item>
  </channel>
</rss>

