<?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 AW:Re: count on mode function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207322#M63121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did extend the example to show the wrong calculation.&lt;/P&gt;&lt;P&gt;The frequency for Dim=B should be 2 because the value 4 occures two times...&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Oct 2009 01:37:09 GMT</pubDate>
    <dc:creator>rbecher</dc:creator>
    <dc:date>2009-10-06T01:37:09Z</dc:date>
    <item>
      <title>count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207317#M63116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to count the occurrence of the most frequent values in a diagram like this:&lt;/P&gt;&lt;P&gt;count( {$ &amp;lt; Muster = {"=mode(Muster)"} &amp;gt;} Muster )&lt;/P&gt;&lt;P&gt;but the result is wrong. How is the right expression?&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2009 21:17:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207317#M63116</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-10-05T21:17:43Z</dc:date>
    </item>
    <item>
      <title>count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207318#M63117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;I think the correct sentence is:&lt;/P&gt;&lt;P&gt;count( {$ &amp;lt; Value = {$(#=mode(Value))} &amp;gt;} Value )&lt;/P&gt;&lt;DIV dir="ltr" id="result_box"&gt;&lt;DIV dir="ltr" id="result_box"&gt;At least in my instance this has worked.&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;Remember if the Mode function founds more than one value, it will return NULL.&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;Best regards.&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2009 22:05:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207318#M63117</guid>
      <dc:creator />
      <dc:date>2009-10-05T22:05:48Z</dc:date>
    </item>
    <item>
      <title>AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207319#M63118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;I've tried this and it doesn't work. The result is always zero (0).&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2009 22:26:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207319#M63118</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-10-05T22:26:02Z</dc:date>
    </item>
    <item>
      <title>AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207320#M63119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel,&lt;/P&gt;&lt;P&gt;thx for the example. In my case I have a pivot table. I also tried with aggr function but the results are the same (wrong). Your mention about more than on value is not quite right. This is according to the &lt;STRONG&gt;only&lt;/STRONG&gt; function.&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2009 22:59:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207320#M63119</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-10-05T22:59:12Z</dc:date>
    </item>
    <item>
      <title>AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207321#M63120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If more than one value has the maximum number of occurrences, mode() will return NULL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 00:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207321#M63120</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-06T00:32:59Z</dc:date>
    </item>
    <item>
      <title>AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207322#M63121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did extend the example to show the wrong calculation.&lt;/P&gt;&lt;P&gt;The frequency for Dim=B should be 2 because the value 4 occures two times...&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 01:37:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207322#M63121</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-10-06T01:37:09Z</dc:date>
    </item>
    <item>
      <title>AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207323#M63122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I don't have a solution, but I can tell you what's wrong. The $(#=mode(Value)) is analyzed ONCE for the entire chart, so returns 2. 2 occurs twice in A, once in B, and twice in C. That's why you're seeing the results you're seeing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 03:09:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207323#M63122</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-06T03:09:43Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207324#M63123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay thx John, I've got it. But what is with my first wrong version (see example attachment).&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 03:44:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207324#M63123</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-10-06T03:44:41Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207325#M63124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, "" means you're specifying a search mask, and "=..." means you're specifying an advanced search. The expression in an advanced search should return 0 (false) for rows that don't match, and non-0 (true) for rows that do match. Mode(Value) returns non-0 for all values but 0, for which it returns 0. So all non-0 values match your advanced search. So what you've done is tell QlikView to return a count of all non-0 values.&lt;/P&gt;&lt;P&gt;Again, that doesn't tell you how to fix it, but that's what went wrong.&lt;/P&gt;&lt;P&gt;This seems like it should be easy, but I haven't thought of how to make it work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 04:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207325#M63124</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-06T04:51:39Z</dc:date>
    </item>
    <item>
      <title>count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207326#M63125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I've found a solution using Input_fields (I've changed the data source because I don't know how use input fields with Inline tables), your problem remember me another case in the community, I've publicated an example "How to calculate an expression which includes an aggregation within another aggregation using Inputfields" a few days ago.&lt;/P&gt;&lt;P&gt;Basicly, I use an input_fields to calculate and keep the aggregate function, in this case the mode, after this I use the value to do the count function.&lt;/P&gt;&lt;P&gt;What are the black points?:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You need 2 fields of selection and they must be hidden&lt;/LI&gt;&lt;LI&gt;This solution could be a little slow depends on the record numbers&lt;/LI&gt;&lt;LI&gt;The macro for calculating the input_field must be called in a few events (see the Macros section on the Document properties)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I've attached an example.&lt;/P&gt;&lt;P&gt;I hope this help you.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 14:20:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207326#M63125</guid>
      <dc:creator />
      <dc:date>2009-10-06T14:20:44Z</dc:date>
    </item>
    <item>
      <title>AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207327#M63126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;this is a interesting approach with inputfield. In my case it would makes no sense because the mode is changing from selection and nobody would input that data.&lt;/P&gt;&lt;P&gt;I had also some thoughts about to calculate the mode in the script and then having the result in another table for comparison. But this also would be no dynamically solution...&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 15:47:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207327#M63126</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-10-06T15:47:58Z</dc:date>
    </item>
    <item>
      <title>AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207328#M63127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;I don't understand, why did you say "nobody would input that data"?, because, the data in the input field are calculated trough a macro and it will be always calculated after triggers like open document, changing selection, etc, so, nobody have to input nothing, all is always dinamic.&lt;/P&gt;&lt;P&gt;I made some tests after send the "solution" changing values and it always works.&lt;/P&gt;&lt;P&gt;Sorry, I assumed this would help.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 16:00:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207328#M63127</guid>
      <dc:creator />
      <dc:date>2009-10-06T16:00:36Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207329#M63128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;sorry I got it wrong in the first place. I have to go more deeper into the example. But I'm concerned about large datasets with macro execution...&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 20:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207329#M63128</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-10-06T20:12:46Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207330#M63129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;I don't know what is the penality for large datasets (maybe you could try and share the result with us jajaja) but I don't have any more ideas for solving your problem.&lt;/P&gt;&lt;P&gt;good luck.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2009 20:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207330#M63129</guid>
      <dc:creator />
      <dc:date>2009-10-06T20:30:29Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: AW:Re: count on mode function</title>
      <link>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207331#M63130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I really wonder wha this is an issue because these values are available in listboxes!&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 04:27:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-on-mode-function/m-p/207331#M63130</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-10-08T04:27:41Z</dc:date>
    </item>
  </channel>
</rss>

