<?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: Expression Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822409#M1036522</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( if (aggr( sum(Value) , [Item]) = 0 , 1 ) )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jan 2015 18:55:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-20T18:55:26Z</dc:date>
    <item>
      <title>Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822407#M1036520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Item&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 120&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 80&lt;/P&gt;&lt;P&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;DEF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -100&lt;/P&gt;&lt;P&gt;DEF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;DEF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +100&lt;/P&gt;&lt;P&gt;GHI&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;GHI&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;GHI&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to count of # of distinct items where the sum of the Value column is 0 (in this example it would be 2 - DEF and GHI).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 18:44:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822407#M1036520</guid>
      <dc:creator />
      <dc:date>2015-01-20T18:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822408#M1036521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count(distinct {&amp;lt;Item={'=sum(Value)=0'}&amp;gt;}Item)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 18:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822408#M1036521</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2015-01-20T18:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822409#M1036522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( if (aggr( sum(Value) , [Item]) = 0 , 1 ) )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 18:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822409#M1036522</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-20T18:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822410#M1036523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jeremiah and Bill.&amp;nbsp;&amp;nbsp; Both seem to give the correct result when I limit to just one month of data.&amp;nbsp;&amp;nbsp; When I build a chart with a YYYY-MM dimension the values are not the same.&amp;nbsp;&amp;nbsp; How to I enhance these to re-calculate over each dimension change?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 19:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822410#M1036523</guid>
      <dc:creator />
      <dc:date>2015-01-20T19:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822411#M1036524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it to work by including the Date in the aggr function too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(if(aggr(sum(), , ) = 0, 1)) / count(DISTINCT )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table I’m working with has many different types of Transactions in it.  I would like this formula to be enhanced to only include  = ‘CYCLE COUNT’.   This “if” statement would need to be on both side of the “/”.   Possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 21:19:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822411#M1036524</guid>
      <dc:creator />
      <dc:date>2015-01-20T21:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822412#M1036525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out ½ the If statement.   I need help with where/how to place the if(='CYCLE COUNT', on the left side of the equation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(if(aggr(sum(), Site, , ) = 0, 1))  / count(DISTINCT if(='CYCLE COUNT',Site&amp;amp;'|'&amp;amp;[S Item]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 22:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822412#M1036525</guid>
      <dc:creator />
      <dc:date>2015-01-20T22:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822413#M1036526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(aggr(sum(), FIELD1, FIELD2) = 0 &lt;STRONG&gt;and FIELD3='CYCLE COUNT'&lt;/STRONG&gt;, 1)) / count(DISTINCT if(FIELD3='CYCLE COUNT', &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Site&amp;amp;'|'&amp;amp;[S Item])&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 13:57:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822413#M1036526</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2015-01-21T13:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822414#M1036527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The addition of “and =’CYCLE COUNT’” did impact the results but not in the same way as selecting it as a filter.   Selecting as a filter gives the correct result.   I have verified that the right side of the equation is returning the correct results with or without the filter selected so it is something on the left side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your support –&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 15:35:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822414#M1036527</guid>
      <dc:creator />
      <dc:date>2015-01-21T15:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822415#M1036528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Figured it out.&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt;"&gt;{1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Trans Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'CYCLE COUNT'}&amp;gt;}&amp;nbsp; works good enough.&amp;nbsp;&amp;nbsp; If the Trans Type is not selected only Cycle Count is utilized.&amp;nbsp; If something else happens to be selected "No Data" is returned... which is ok in this case.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Full expression ended up:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&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;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Trans Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'CYCLE COUNT'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Matl Qty]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Site&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[S Item]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Matl Date YYYY-MM]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) = 0, 1)) / &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Trans Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='CYCLE COUNT',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Site&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;'|'&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[S Item]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 22:00:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/822415#M1036528</guid>
      <dc:creator />
      <dc:date>2015-01-21T22:00:15Z</dc:date>
    </item>
  </channel>
</rss>

