<?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: pick rating on the fly using calculated score in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582364#M216291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(I'm back after a few days "off-line".)&lt;BR /&gt;I think there should be a better way.&amp;nbsp; For now, a sugestion.&amp;nbsp; Instead of pre-building the whole "if" expression in the script, define only the "border" values as variables in the script, in this case it will be something like this:&lt;BR /&gt;vOne = 56.25&lt;BR /&gt;vTwo = 63.78&lt;BR /&gt;vThree = xx.xx&lt;BR /&gt;vFour = yy.yy&lt;/P&gt;&lt;P&gt;And the expression will be:&lt;BR /&gt;if(score&amp;lt;=vOne, 1,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;lt;=vTwo, 2,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;lt;=vThree, 3,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;lt;=vFour, 4, 5&lt;BR /&gt;))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe it helps...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2014 18:21:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-04-04T18:21:18Z</dc:date>
    <item>
      <title>pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582358#M216285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys, looking for some directions here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have large QVD which represents financial transactions - 90 million rows and growing. based on some KPIs and complex calculations, I determine overall score for a specific entity. The score is a number from 0 to 100 and it CANNOT be calculated in a load script - depending on user selections, the scores would be different. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with that said, here is my challenge. I am a given a little table that determines a rate for an entity, based on its score - basically that table has low score and high score and a rate from 1 to 5. I need to calculate the score (again on the fly based on user selections) and using that table identify its rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a few options I considered:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) create a data island table for scores/rates and use if thens to pick a rate from there. While it works great on by 10,000 records sample, it is taking forever in my real app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) use aggr, set analysis and advanced search expression in it - did not work because aggr is calculated not per row but per chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 17:59:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582358#M216285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-31T17:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582359#M216286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the relation between score and rate?&amp;nbsp; Can it be something like&lt;/P&gt;&lt;P&gt;0 to 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;21 to 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;If yes, you can try this.&lt;/P&gt;&lt;P&gt;rate = div(score-1,20)+1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, maybe enclosed if()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 18:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582359#M216286</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-31T18:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582360#M216287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your reply, Michael. the scores are decimal numbers like 87.45 and rates are defined as ranges like 0..56.25 for rate 1, 56.26..63.78 for rate 2 etc. I have to use a lookup table because of that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rate is determined by statistical calculations on a side - another team is doing that using special software&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 19:02:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582360#M216287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-31T19:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582361#M216288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, what about "if":&lt;/P&gt;&lt;P&gt;if(score&amp;lt;=56.25, 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;lt;=63.78, 2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;lt;=xx.xx, 3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;lt;=yy.yy, 4, 5&lt;/P&gt;&lt;P&gt;))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expect it to be slow but hopefully better than with the data island.&amp;nbsp; You can give it a try on a limited data set and compare.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 19:17:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582361#M216288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-31T19:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582362#M216289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot hard code these numbers as they will be updated once a month (that other department will recalculate the numbers and send them to me) but you gave me an idea to create this if-then expression in my load script and then use as dynamic expression (dollar expansion) in the actual chart objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a bit pessimistic though due to the volume of data I have but you gave me hope &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is this the only way? I understand QV needs to operate with data loaded in data model and it is no SQL when you can join tables on the fly, but there must be a better solution to that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 19:39:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582362#M216289</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-31T19:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582363#M216290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this did not work as i was hoping. while i was able to build if-then statements dynamically in my load script, i also need to use one variable dimension. I used dollar sign expansion but this only work if I manually select dimension value. Apparently as I've just read on a forum, dollar sign expansion is done for the whole chart not per dimension row so this did not work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am back using data island table but it is terrible slow. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other expert opinions? I could do that in Excel in 1 minute using vlookup function and I guess was hoping QV can do something like that on the fly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 15:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582363#M216290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-03T15:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582364#M216291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(I'm back after a few days "off-line".)&lt;BR /&gt;I think there should be a better way.&amp;nbsp; For now, a sugestion.&amp;nbsp; Instead of pre-building the whole "if" expression in the script, define only the "border" values as variables in the script, in this case it will be something like this:&lt;BR /&gt;vOne = 56.25&lt;BR /&gt;vTwo = 63.78&lt;BR /&gt;vThree = xx.xx&lt;BR /&gt;vFour = yy.yy&lt;/P&gt;&lt;P&gt;And the expression will be:&lt;BR /&gt;if(score&amp;lt;=vOne, 1,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;lt;=vTwo, 2,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;lt;=vThree, 3,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;lt;=vFour, 4, 5&lt;BR /&gt;))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe it helps...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 18:21:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582364#M216291</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-04T18:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582365#M216292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for trying help me but it would not work in my case. I have 8 metrics that i need to score/rate and each one actually has a rate from 1 to 100. i would need to create 800 variables &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so far the best solution i found is to use firstsortedvalue with nested aggr - this actually work well but terribly slow. takes 50 seconds to calculate one chart on a very powerful server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gave up on if-s idea because dollar expansions do not work on expressions within charts - expression is expanded before chart is calculated hence you cannot refer to chart dimensions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 18:51:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582365#M216292</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-04T18:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582366#M216293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Borys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interesting case &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;I have no license, so i cant open qvd &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; (during weekend).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, give me in xls your surce tables with sample data, Script, maybe some example of expected result in xls...&lt;/P&gt;&lt;P&gt;Give me some screen's, sample expressions, etc.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Especially show me (eplain me) how variable dimension works in your app&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(you told: this did not work as i was hoping. while i was able to build if-then statements dynamically in my load script, i also need to use one variable dimension. I used dollar sign expansion but this only work if I manually select dimension value. Apparently as I've just read on a forum, dollar sign expansion is done for the whole chart not per dimension row so this did not work for me.).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will also try to help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 22:04:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582366#M216293</guid>
      <dc:creator />
      <dc:date>2014-04-04T22:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582367#M216294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Borys,&lt;/P&gt;&lt;P&gt;i thought a little about your case.&lt;/P&gt;&lt;P&gt;For me this "second step" of your calculation (determining rate value) should be done as a expression.&lt;/P&gt;&lt;P&gt;If you let me know your data model, your chart dimensions, structure of your rating data (you told, that your rating dictionary has 800 points, you have 8 metrics etc) I'am sure we will find a way how to generate "score to rate transformation function" to have good performance and flexibility &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Darek.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Apr 2014 10:15:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582367#M216294</guid>
      <dc:creator />
      <dc:date>2014-04-06T10:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582368#M216295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Borys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i prepared small example in assumption, that you have to get your rating regarding to some dimension value ....&lt;/P&gt;&lt;P&gt;For example purposes i assumed, that i have some data and my score function is simple avg.&lt;/P&gt;&lt;P&gt;I added field Dim_1 to simulate some user selections.&lt;/P&gt;&lt;P&gt;In my opinion this aproach should not impact a lot your applicationperformance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it helped you&lt;/P&gt;&lt;P&gt;If you like this direction, i have some additional idea, how to optimize it &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 15:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582368#M216295</guid>
      <dc:creator />
      <dc:date>2014-04-07T15:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582369#M216296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dziękuję, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Darek&lt;/SPAN&gt;! you loved my little challenge, did not you? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is a great solution - if i got it right, you build 7 different expressions in the load script, then use pick function to pick one of the 7 for the corresponding dimension. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried and it is very fast - much better than mine firstsortedvalue / aggr solution. I think it is definitely a great way to address a problem - but unfortunately not going to work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirements have just changed and there will be 112 different dimension values to rate - not 7 as i thought initially. And every one of these 112 will be using different from/to scores and&amp;nbsp; ratings 1..100, so we are looking at 112 expressions in that pick function. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Every one of those 112 expressions will have approximately 7000 characters in length (all if/then-s for every rate 1 to 100), so the total length of my pick expression would be around 784,000 characters. I've read somewhere that QV will start crashing on you once you approach expression length in 20,000-50,000.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My solution with firstsortedvalue / aggr actually worked but it was super slow - like 60 seconds to recalculate my chart. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But after much thinking I looked at it from another perspective - I changed my source data for that rate table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the idea is to load scores and rates in a horizontal table like that (like a cross table):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;targetdim, score_from_rate1, score_from_rate2, ... score_from_rate100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this table will have 112 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in a chart, use expression like this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( $(mymetric) &amp;lt; ONLY ( score_from_rate1), 'rate 1'&lt;/P&gt;&lt;P&gt;,IF ( $(mymetric) &amp;lt; ONLY ( score_from_rate2), 'rate 2'&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;,IF ( $(mymetric) &amp;lt; ONLY ( score_from_rate100), 'rate 99'&lt;/P&gt;&lt;P&gt;,IF ( $(mymetric) &amp;lt; ONLY ( score_from_over_rate100), 'rate 100'&lt;/P&gt;&lt;P&gt;)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) //close all 101 if-s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works pretty fast - takes 4-5 seconds to recalculate my chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still not 100% happy as it was such a hassle and still looks ugly but it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am going to accept your answer as correct one though - thanks for trying solve this!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 16:40:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582369#M216296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-07T16:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582370#M216297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Borys,&lt;/P&gt;&lt;P&gt;proszę &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;i think you may find something interesting in v1 &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, aggregate formula for each dimension value as a row in formula table&lt;/P&gt;&lt;P&gt;Then using dimension number, with pick you may ask $(=fieldvalue('field',nbr))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember, that it will work nice while field has distinct values. So, it will be better to check it during reload. If 2 dimension values have the same score ranges and rating, you will have to have the same formula and dim number).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution with 100 columns and 112 rows (associated with dimension) looks nice. But i think, that there will be better if you preaggregate data stronger. This may be also more complex script if you would like to prepare it generic (assuming, that number of your ratings /columns in your solution/ will grow up). There is of course generic load, but ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We may also go into table with 112 columns: formula_1.formula_2, .... formula_112 and 1 row. Then pick(nbr, $(=only(formula_1)), ...,$(=only(formula_112))). It is also "generic" and may be easy prepared in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;poka&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 17:13:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582370#M216297</guid>
      <dc:creator />
      <dc:date>2014-04-07T17:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582371#M216298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Borys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 more idea with your 100+1 columns and 112 rows table.&lt;/P&gt;&lt;P&gt;Columns are:&lt;/P&gt;&lt;P&gt;Dim, r1,r2,r3, ... , r100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In rn column you have n'th range from value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check how fast is expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-RangeSum(score&amp;gt;=r1,score&amp;gt;=r2,score&amp;gt;=r3,.......,score&amp;gt;=r100)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 19:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582371#M216298</guid>
      <dc:creator />
      <dc:date>2014-04-07T19:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582372#M216299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;got it, very cool&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 19:55:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582372#M216299</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-07T19:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582373#M216300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, Darek, not sure I understand this. RangeSum will give a sum of all boolean expressions and then what can i do with that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 19:57:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582373#M216300</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-07T19:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582374#M216301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in QV true=-1, false=0 &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simple example:&lt;/P&gt;&lt;P&gt;DIM,range,score_from,score_to&lt;/P&gt;&lt;P&gt;A,1,&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.25&lt;/P&gt;&lt;P&gt;A,2,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.26,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.55&lt;/P&gt;&lt;P&gt;A,3,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.56.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.80&lt;/P&gt;&lt;P&gt;A,4,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.81&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;our table:&lt;/P&gt;&lt;P&gt;DIM, r1, r2, r3, r4&lt;/P&gt;&lt;P&gt;A,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0, 0.26 , 2.56, 7.81&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets test:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;score = 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-rangesum(3&amp;gt;0, 3&amp;gt;0.26, 3&amp;gt;2.56, 3&amp;gt;7.81) = - rangesum(-1,-1,-1,0)=3 &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another test:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;score=2.3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;range=-rangesum(2.3&amp;gt;0,2.3&amp;gt;0.26,2.3&amp;gt;2.56, 2.3&amp;gt;7.81)=-rangesum(-1,-1,0,0)=2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 20:06:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582374#M216301</guid>
      <dc:creator />
      <dc:date>2014-04-07T20:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582375#M216302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is a very interesting idea - I will think about it more tonight. Thanks for your help again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 20:45:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582375#M216302</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-07T20:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582376#M216303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your range should be equal to number of score_from, which are less than calculated score.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, i'am not sure if this will be good for performence. It is always 11200 comparisions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think, that it may be better to prepare something like tree.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's asume range table (for one Dim value):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;range, score_from, score_to&lt;/P&gt;&lt;P&gt;1,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.05&lt;/P&gt;&lt;P&gt;2,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.01&lt;/P&gt;&lt;P&gt;3,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25.04&lt;/P&gt;&lt;P&gt;4,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25.05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30.20&lt;/P&gt;&lt;P&gt;5,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30.21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50,54&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;10,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 101,33&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 110,43&lt;/P&gt;&lt;P&gt;11,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 110,44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 137,01&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;20,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 189.01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 205,45&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;100,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 567,99&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We may prepare 2 levels if (like tree)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(score&amp;lt;=110.43,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(score&amp;gt;=0,1,if(score&amp;gt;=5.06,2,if(score&amp;gt;=10.02,3,if(score&amp;gt;=25.05,4,.......))))))))),if(score&amp;lt;=189.01,if(score&amp;gt;=110,44,11,........)))))))))),..........)))))))))))))))))))))))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, first level looks in which tenth is result. 2'nd level checks only values in tenth found in 1'st level.&lt;/P&gt;&lt;P&gt;This way, if you have 100 ranges and 112 dim values, max number of comparisions will be 10x112 (to find tenth for each dim value)+10x112(to find range for each dim value) = 2240, and no summation needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With rangesum we have always 100x112 logical comparisions and next 112 summations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 20:52:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582376#M216303</guid>
      <dc:creator />
      <dc:date>2014-04-07T20:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: pick rating on the fly using calculated score</title>
      <link>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582377#M216304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately performance is left to be desired so I will be open to any other suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is one of these things which are very easy to do in Excel using vlookup function but QV cannot handle this well. I have hard time to explain this to my project stakeholder who happens to be an Excel guru &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 01:27:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/pick-rating-on-the-fly-using-calculated-score/m-p/582377#M216304</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-19T01:27:48Z</dc:date>
    </item>
  </channel>
</rss>

