<?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 Help Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586039#M1117682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi! I'm new to qlikview.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'm trying to write an expression like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;count(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;={2013}&amp;gt;}&lt;SPAN style="color: #800000;"&gt;[days]&lt;/SPAN&gt;)&amp;gt;180),({&amp;lt;type={'O','Y'}&amp;gt;}&lt;SPAN style="color: #800000;"&gt;[name]&lt;/SPAN&gt;) ))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I want to count the name who has more than 180 days of work in 2013, and the "Type" field contains "O" or "Y" value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; Any suggestions greatly appreciated.&amp;nbsp; Andrea&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2014 22:12:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-29T22:12:11Z</dc:date>
    <item>
      <title>Help Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586039#M1117682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi! I'm new to qlikview.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'm trying to write an expression like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;count(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;={2013}&amp;gt;}&lt;SPAN style="color: #800000;"&gt;[days]&lt;/SPAN&gt;)&amp;gt;180),({&amp;lt;type={'O','Y'}&amp;gt;}&lt;SPAN style="color: #800000;"&gt;[name]&lt;/SPAN&gt;) ))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I want to count the name who has more than 180 days of work in 2013, and the "Type" field contains "O" or "Y" value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; Any suggestions greatly appreciated.&amp;nbsp; Andrea&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 22:12:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586039#M1117682</guid>
      <dc:creator />
      <dc:date>2014-01-29T22:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586040#M1117683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can try&lt;/P&gt;&lt;P&gt;count({&amp;lt;type={'O','Y'}&amp;gt;} distinct if(aggr(count({&amp;lt;Year={2013}&amp;gt;}[days]),[name])&amp;gt;180, [name]))&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 23:43:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586040#M1117683</guid>
      <dc:creator />
      <dc:date>2014-01-29T23:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586041#M1117684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;type={'O','Y'}&amp;gt;}&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;={2013}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[days]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;)&amp;gt;180, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;), [name]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 02:17:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586041#M1117684</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-01-30T02:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Help Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586042#M1117685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Thank you for your help!&lt;/P&gt;&lt;P&gt;I'm trying to use this expression in a pivot table. Is it possible to consider the condition "more than 180 days" with these options?:&lt;/P&gt;&lt;P&gt;1) where one record contain more than 180 days;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;2) where the sum of records with the same name is more than 180 days;&lt;/P&gt;&lt;P&gt;You can find an example attached.&lt;/P&gt;&lt;P&gt;I really appreciate any help you can provide.&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 20:52:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586042#M1117685</guid>
      <dc:creator />
      <dc:date>2014-01-30T20:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Help Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586043#M1117686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first proposal didn't work; now got it working with set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current expression in sample is:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Type={'O','Y'}&amp;gt;} aggr(If(sum({&amp;lt;Year={2013}&amp;gt;}[Days Work])&amp;gt;180, 1), [Name]))&lt;/P&gt;&lt;P&gt;It works but is limited to your current selection and pivot table dimensions: if you select type 'O', there's only 1 name matching the condition.&lt;/P&gt;&lt;P&gt;This can be translated in set analysis by:&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Type={'O','Y'},[Name]={"=Sum({&amp;lt;Year={2013}&amp;gt;}[Days Work])&amp;gt;180"}&amp;gt;} DISTINCT [Name])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to keep the result disregarding your current selection, you can use:&lt;/P&gt;&lt;P&gt;=Count({1&amp;lt;Type={'O','Y'},[Name]={"=Sum({1&amp;lt;Year={2013}&amp;gt;}[Days Work])&amp;gt;180"}&amp;gt;} DISTINCT [Name])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These 3 can be used in pivot tables, but the result will be limited to the dimensions of your pivot table: if you put Type as a dimension, it will give you 1 for 'O' and 1 for 'Y'.&lt;/P&gt;&lt;P&gt;To have it regardless of the dimension (but not the selection) you can use:&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Year={2013},[Name]={"=Sum({&amp;lt;Year={2013}&amp;gt;}[Days Work])&amp;gt;180"},Type={'O','Y'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISTINCT TOTAL [Name])&lt;/P&gt;&lt;P&gt;To have it regardless of both selection and dimension, you can use:&lt;/P&gt;&lt;P&gt;=Count({1&amp;lt;Year={2013},[Name]={"=Sum({1&amp;lt;Year={2013}&amp;gt;}[Days Work])&amp;gt;180"},Type={'O','Y'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISTINCT TOTAL [Name])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps better.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 21:54:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586043#M1117686</guid>
      <dc:creator />
      <dc:date>2014-01-30T21:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Help Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586044#M1117687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Thank you so much for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Feb 2014 19:46:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Expression/m-p/586044#M1117687</guid>
      <dc:creator />
      <dc:date>2014-02-01T19:46:21Z</dc:date>
    </item>
  </channel>
</rss>

