<?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: count will not work with button in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170610#M913881</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(MaxFilter=0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} ID),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;Count({&amp;lt;Version={'V2'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} ID) -1&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 May 2016 11:12:27 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-30T11:12:27Z</dc:date>
    <item>
      <title>count will not work with button</title>
      <link>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170609#M913879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after having tried all Aggr variations I am still stuck with simple triggered count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume - a button (MaxFilter) selects the wanted focus on a Combo chart - meaning calculating Sums of Amounts either with Maximum per Dimensions or without and showing related Numbers as well:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;if(MaxFilter=0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum(&amp;nbsp; {&amp;lt;Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} Value),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum(&amp;nbsp; {&amp;lt;Version={'V2'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} Value) &lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Max(&amp;nbsp; {&amp;lt;Version={'V2'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;&amp;gt;This works fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(MaxFilter=0,&lt;/P&gt;&lt;P&gt;Count(&amp;nbsp; {&amp;lt;Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} ID),&lt;/P&gt;&lt;P&gt;Count(&amp;nbsp; {&amp;lt;Version={'V2'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} ID) &lt;STRONG&gt;-1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;gt;&amp;gt;This does not work for MaxFilter=1&amp;nbsp; but would if I do remove the "-1".&amp;nbsp; Why can't I reduce QlikViews Count result for the one Max-ID?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Tobias&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/count-will-not-work-with-button/m-p/1170609#M913879</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: count will not work with button</title>
      <link>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170610#M913881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(MaxFilter=0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} ID),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;Count({&amp;lt;Version={'V2'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} ID) -1&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 11:12:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170610#M913881</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-30T11:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: count will not work with button</title>
      <link>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170611#M913883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried already without any luck. Result is: "-1".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 11:50:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170611#M913883</guid>
      <dc:creator />
      <dc:date>2016-05-30T11:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: count will not work with button</title>
      <link>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170612#M913885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample to show what exactly is going on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 12:04:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170612#M913885</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-30T12:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: count will not work with button</title>
      <link>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170613#M913887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, probably this is just another inappropriate non-Use of Aggr - but I still can´t see how it should work correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;the time dimension is filled day by day&lt;/P&gt;&lt;P&gt;&amp;gt; so in the fact table there are Null Values and therefore my Formula is obviously producing "Null"&lt;/P&gt;&lt;P&gt;&amp;gt; but only in the 2. Part of the IF clause where the Formula is expanded by "-1"&amp;nbsp; as if QV cant't count and substract at a time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replacing the "-1" with&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"- Max({&amp;lt;Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} Value)/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max({&amp;lt;Version={'V1'},doctype={$(Inputbox_doctype)}, per={$(Inputbox_period)} &amp;gt;} Value)"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(which equals to&amp;nbsp; -1) is doing the trick! Now it works.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="count-1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/126447_count-1.PNG" style="height: 156px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Thanks for your thoughts!&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 06:13:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170613#M913887</guid>
      <dc:creator />
      <dc:date>2016-06-01T06:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: count will not work with button</title>
      <link>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170614#M913888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you were able to achieve what you wanted, please close this thread by marking your response as correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 10:56:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-will-not-work-with-button/m-p/1170614#M913888</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-01T10:56:29Z</dc:date>
    </item>
  </channel>
</rss>

