<?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: how to if count per specific year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-if-count-per-specific-year/m-p/1069098#M466820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a chart (this includes tables) where cyear is one of your dimensions, use an expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=if (count(cyear) &amp;lt;= 3, &lt;EM&gt;Expression1&lt;/EM&gt;, &lt;EM&gt;Expression2&lt;/EM&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or omit Expression2 altogether if you want to ignore this year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use set analysis which offers better performance in case you have a large number of year (which I don't think you have)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jan 2016 07:56:22 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2016-01-12T07:56:22Z</dc:date>
    <item>
      <title>how to if count per specific year</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-if-count-per-specific-year/m-p/1069097#M466819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example I have this data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14525814881171362" jivemacro_uid="_14525814881171362" modifiedtitle="true"&gt;
&lt;P&gt;cyear&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tax&lt;/P&gt;
&lt;P&gt;2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,000.00&lt;/P&gt;
&lt;P&gt;2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,000.00&lt;/P&gt;
&lt;P&gt;2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,000.00&lt;/P&gt;
&lt;P&gt;2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,000.00&lt;/P&gt;
&lt;P&gt;2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,000.00&lt;/P&gt;
&lt;P&gt;2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,000.00&lt;/P&gt;
&lt;P&gt;2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,000.00&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is my expression;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1452581624486944" jivemacro_uid="_1452581624486944" modifiedtitle="true"&gt;
&lt;P&gt;If($(Tmonths)=7 or $(Tmonths)=8 or $(Tmonths)=9, &lt;/P&gt;
&lt;P&gt;sum({&amp;lt;cyear= {$(Tyear)}, qtr={"2"}&amp;gt;} aggr(DISTINCT Basic,qtr,cyear,OwnerNum,BINum,PCINum,SINum,MDINum,Parcel,PType))*($(Tmonths)*2/100 - .06) +&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;cyear= {$(Tyear)}, qtr={"2"}&amp;gt;} aggr(DISTINCT SEF,qtr,cyear,OwnerNum,BINum,PCINum,SINum,MDINum,Parcel,PType))*($(Tmonths)*2/100 - .06), &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;If($(Tmonths)=10 or $(Tmonths)=11 or $(Tmonths)=12 and count($(Tyear)&amp;lt;=3), &lt;/P&gt;
&lt;P&gt;sum({&amp;lt;cyear= {$(Tyear)}, qtr={"2"}&amp;gt;} aggr(DISTINCT Basic,qtr,cyear,OwnerNum,BINum,PCINum,SINum,MDINum,Parcel,PType))*($(Tmonths)*2/100 - .06) +&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;cyear= {$(Tyear)}, qtr={"2"}&amp;gt;} aggr(DISTINCT SEF,qtr,cyear,OwnerNum,BINum,PCINum,SINum,MDINum,Parcel,PType))*($(Tmonths)*2/100 - .06) +&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;cyear= {$(Tyear)}, qtr={"3"}&amp;gt;} aggr(DISTINCT Basic,qtr,cyear,OwnerNum,BINum,PCINum,SINum,MDINum,Parcel,PType))*($(Tmonths)*2/100 - .12) +&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;cyear= {$(Tyear)}, qtr={"3"}&amp;gt;} aggr(DISTINCT SEF,qtr,cyear,OwnerNum,BINum,PCINum,SINum,MDINum,Parcel,PType))*($(Tmonths)*2/100 - .12), &lt;/P&gt;
&lt;P&gt;))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If cyear &amp;lt;= 3 ( below 3 data entry). If cyear data entry is less than or equal to 3 the expression show above will be use. If cyear data entry is more than 3 like 2016, calculation will be ignored (or use different expression). How can I solve this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 06:59:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-if-count-per-specific-year/m-p/1069097#M466819</guid>
      <dc:creator />
      <dc:date>2016-01-12T06:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to if count per specific year</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-if-count-per-specific-year/m-p/1069098#M466820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a chart (this includes tables) where cyear is one of your dimensions, use an expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=if (count(cyear) &amp;lt;= 3, &lt;EM&gt;Expression1&lt;/EM&gt;, &lt;EM&gt;Expression2&lt;/EM&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or omit Expression2 altogether if you want to ignore this year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use set analysis which offers better performance in case you have a large number of year (which I don't think you have)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 07:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-if-count-per-specific-year/m-p/1069098#M466820</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-01-12T07:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to if count per specific year</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-if-count-per-specific-year/m-p/1069099#M466821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make CYear as dimension, then use&lt;/P&gt;&lt;P&gt;if count(cYear)&amp;lt;=3 then expression else '' end. Are you looking something or may be I am not understood ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 07:57:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-if-count-per-specific-year/m-p/1069099#M466821</guid>
      <dc:creator>manojkulkarni</dc:creator>
      <dc:date>2016-01-12T07:57:42Z</dc:date>
    </item>
  </channel>
</rss>

