<?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: Assign score based on count function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Assign-score-based-on-count-function/m-p/815082#M660978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnx Massimo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is must have entered it wrong somehow because your solution is the right one. Thans again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Mar 2015 10:57:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-03-05T10:57:04Z</dc:date>
    <item>
      <title>Assign score based on count function</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-score-based-on-count-function/m-p/815080#M660975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need your help on something. I created a metric which should assign a score to customer or a piece of equipment depending on the number of notifications are created for the piece of equipment (an equipment is assigned to a customer). The scoring should be as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;From 0 to 10 notifications, the equipment should be assigned a score '10'&lt;/LI&gt;&lt;LI&gt;From 10 to 20 notificaitons, the equipment &lt;SPAN style="font-size: 13.3333330154419px;"&gt;should be&lt;/SPAN&gt; assigned a score '9'&lt;/LI&gt;&lt;LI&gt;and so on...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As we know,we cannot do a count function in the script, so I have to execute this function in the 'front end' but then I cannot find a way to link the matching score to a number of notifications. I tried the following but this didn't quite work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Score: =If(count(distinct(NotificationNr)) &amp;lt;= 10, 10, if( etc.))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above function did not work because if there are more than 10 notifications the scoring is not assigned correctly anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 13:43:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-score-based-on-count-function/m-p/815080#M660975</guid>
      <dc:creator />
      <dc:date>2015-03-02T13:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Assign score based on count function</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-score-based-on-count-function/m-p/815081#M660976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe I don't understant but the if should work &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 10, 10,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 20, 9,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 30, 8,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 40, 7,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 50, 6,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 60, 5,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 70, 4,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 80, 3,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 90, 2,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(count(distinct notificationnr) &amp;lt;= 100, 1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;))))))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.jpg" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/79690_1.jpg" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 22:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-score-based-on-count-function/m-p/815081#M660976</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-03-02T22:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Assign score based on count function</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-score-based-on-count-function/m-p/815082#M660978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnx Massimo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is must have entered it wrong somehow because your solution is the right one. Thans again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2015 10:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-score-based-on-count-function/m-p/815082#M660978</guid>
      <dc:creator />
      <dc:date>2015-03-05T10:57:04Z</dc:date>
    </item>
  </channel>
</rss>

