<?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: Only return distinct rating per user for an article in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434964#M162132</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;PFA file hope it helps you.&amp;nbsp; Calculating the latest and assigning a flag to the record will have better performance instead of calculating runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2012 07:44:22 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2012-11-15T07:44:22Z</dc:date>
    <item>
      <title>Only return distinct rating per user for an article</title>
      <link>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434962#M162130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if anyone has any ideas on this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I simply have, a user, an article they can view, a rating value that they rate a page and the time that the page is viewed/rated.&lt;/P&gt;&lt;P&gt;But sometimes,&amp;nbsp; for example : 1 user may rate an article with a value of 5 stars, but then change his mind and rate it as 4.&lt;/P&gt;&lt;P&gt;Now, I need to only record the last recorded rating. ie. 4 in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this in a table? I probably need to distinct it somehow, or maybe it can be done with set analysis.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a basic .qvw of the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 03:06:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434962#M162130</guid>
      <dc:creator />
      <dc:date>2012-11-15T03:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Only return distinct rating per user for an article</title>
      <link>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434963#M162131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" href="https://community.qlik.com/people/beanz"&gt;beanz,&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be this is what you are looking for? PS: I modified data a bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 05:44:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434963#M162131</guid>
      <dc:creator />
      <dc:date>2012-11-15T05:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Only return distinct rating per user for an article</title>
      <link>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434964#M162132</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;PFA file hope it helps you.&amp;nbsp; Calculating the latest and assigning a flag to the record will have better performance instead of calculating runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 07:44:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434964#M162132</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-11-15T07:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Only return distinct rating per user for an article</title>
      <link>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434965#M162133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks both for your replies &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 08:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434965#M162133</guid>
      <dc:creator />
      <dc:date>2012-11-15T08:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Only return distinct rating per user for an article</title>
      <link>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434966#M162134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems to be on the right track, but I added a bit more dummy data to test, but it doesn't seem to be working out the latestRating value correctly.&lt;/P&gt;&lt;P&gt;If you look at the attached .qvw, &lt;/P&gt;&lt;P&gt;eg. User 'cc', should get a latestRating of 1 for both page1 and page2, but it seems to only be giving a value of 1 to page2&lt;/P&gt;&lt;P&gt;Both page1 and page2 should get a latestRating of 1, as it is a different page and a different time for both,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you maybe have any ideas on how to modify the If(Previous(user) &amp;lt;&amp;gt; user, 1, 0) AS latestRating expression, which calculates this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Nov 2012 04:04:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434966#M162134</guid>
      <dc:creator />
      <dc:date>2012-11-18T04:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Only return distinct rating per user for an article</title>
      <link>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434967#M162135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I seem to have fixed it.&lt;/P&gt;&lt;P&gt;Just changed the order by : ORDER BY &lt;STRONG&gt;article&lt;/STRONG&gt;, user, datetime&amp;nbsp; DESC;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Nov 2012 04:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434967#M162135</guid>
      <dc:creator />
      <dc:date>2012-11-18T04:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Only return distinct rating per user for an article</title>
      <link>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434968#M162136</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;You need to order the date by descending then it works as you expect.&amp;nbsp; Please close this post you are done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check my script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; datetime, user, rating, article&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012/06/04 09:54, aa, 5, page1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012/06/04 10:00, aa, 5, page1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012/02/09 11:00, bb, 4, page2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012/02/09 11:20, bb, 3, page2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012/11/14 12:03, cc, 4, page1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012/11/14 12:06, cc, 5, page2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Previous(user) &amp;lt;&amp;gt; user, 1, 0) AS latestRating&lt;/P&gt;&lt;P&gt;RESIDENT Temp&lt;/P&gt;&lt;P&gt;ORDER BY user, datetime&amp;nbsp; DESC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 06:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-return-distinct-rating-per-user-for-an-article/m-p/434968#M162136</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-11-19T06:09:23Z</dc:date>
    </item>
  </channel>
</rss>

