<?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: calculate class in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1401000#M424711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhu,&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rank:&lt;/P&gt;&lt;P&gt;LOAD Rank&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;class.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, header is 1 lines, table is class);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;max(RankValue) as MaxRank;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;PurgeChar(FieldValue('Rank',RecNo()),'&amp;lt;&amp;gt;=') as RankValue&lt;/P&gt;&lt;P&gt;AutoGenerate FieldValueCount('Rank');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMaxRank = Peek('MaxRank',0,'Temp');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class:&lt;/P&gt;&lt;P&gt;LOAD country, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Brand, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Class, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rank,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(left(Rank,1) = '&amp;gt;', $(vMaxRank),PurgeChar(Rank,'&amp;lt;&amp;gt;=')) as To&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;class.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, header is 1 lines, table is class);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Class1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;country, &lt;/P&gt;&lt;P&gt;Brand, &lt;/P&gt;&lt;P&gt;Class,&lt;/P&gt;&lt;P&gt;To,&lt;/P&gt;&lt;P&gt;if(country=peek(country) and Brand=peek(Brand),Peek(To),0) +1 as&amp;nbsp; From &lt;/P&gt;&lt;P&gt;Resident Class Order by country, Brand,To ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Sales:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD country, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; brand as Brand, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sales, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rank&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;class.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sales);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Left Join(Class1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;IntervalMatch (Rank, country, Brand) LOAD From, To, country, Brand Resident Class1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Left Join(Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD Rank, country, Brand, Class Resident Class1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Tables Class, Class1,Temp, Rank;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Giving this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;country&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Class&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;sum(sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt; &lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt; &lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;1058 &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;France&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;429&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;France&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;310&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;France&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;C&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;216&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;France&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;D&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;103&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Aug 2017 15:44:58 GMT</pubDate>
    <dc:creator>effinty2112</dc:creator>
    <dc:date>2017-08-29T15:44:58Z</dc:date>
    <item>
      <title>calculate class</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1400999#M424710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Hi everyone&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;I need your helps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;I have two tables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;-First one contains information relative to the class: &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;For example: if the rank of my product’s sales of brand B1 in France &amp;lt;=2, then I will give him a class A;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;The setting of class for each country/brand is different, and interval of rank is larger in Germany than France because we have more products to sale in Germany&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;--Second one is a straight table which contains information about sales.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;In this table I should calculate the rank of sales per product/brand/county and his class according to his rank&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;In this example: &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Product P1 of brand B1 in France has a class C because his sale’s rank is 6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;So for calculating class, I can use “if”: &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;if(country='France' and brand='B1', if(rank&amp;gt;6,'D', if(rank&amp;gt;4, 'C, if(rank&amp;gt;2, 'B','A'))), if(county='France' and brand='B2' ……..) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;But I find my solution is very complicate, I want to find easier way to achieve it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I can not achive it in script because rank is calculated in the &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;straight table&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;But how?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 14:05:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1400999#M424710</guid>
      <dc:creator>syukyo_zhu</dc:creator>
      <dc:date>2017-08-29T14:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: calculate class</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1401000#M424711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhu,&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rank:&lt;/P&gt;&lt;P&gt;LOAD Rank&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;class.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, header is 1 lines, table is class);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;max(RankValue) as MaxRank;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;PurgeChar(FieldValue('Rank',RecNo()),'&amp;lt;&amp;gt;=') as RankValue&lt;/P&gt;&lt;P&gt;AutoGenerate FieldValueCount('Rank');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMaxRank = Peek('MaxRank',0,'Temp');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class:&lt;/P&gt;&lt;P&gt;LOAD country, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Brand, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Class, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rank,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(left(Rank,1) = '&amp;gt;', $(vMaxRank),PurgeChar(Rank,'&amp;lt;&amp;gt;=')) as To&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;class.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, header is 1 lines, table is class);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Class1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;country, &lt;/P&gt;&lt;P&gt;Brand, &lt;/P&gt;&lt;P&gt;Class,&lt;/P&gt;&lt;P&gt;To,&lt;/P&gt;&lt;P&gt;if(country=peek(country) and Brand=peek(Brand),Peek(To),0) +1 as&amp;nbsp; From &lt;/P&gt;&lt;P&gt;Resident Class Order by country, Brand,To ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Sales:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD country, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; brand as Brand, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sales, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rank&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;class.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sales);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Left Join(Class1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;IntervalMatch (Rank, country, Brand) LOAD From, To, country, Brand Resident Class1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Left Join(Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD Rank, country, Brand, Class Resident Class1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Tables Class, Class1,Temp, Rank;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Giving this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;country&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Class&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;sum(sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt; &lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt; &lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;1058 &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;France&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;429&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;France&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;310&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;France&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;C&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;216&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;France&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;D&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;103&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 15:44:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1401000#M424711</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-08-29T15:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: calculate class</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1401001#M424712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhu,&lt;/P&gt;&lt;P&gt;I deleted my original post and replaced it with another. This new script does not read the class from the sales table. It takes the class table and creates intervals of rank then uses the IntervalMatch function to form an association between these intervals and the rank given in the sales table. A join operation then adds the class field to the sales table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 18:11:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1401001#M424712</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-08-29T18:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: calculate class</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1401002#M424713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew.&lt;/P&gt;&lt;P&gt;Thanks for your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it was not clear in my original request. I have not field rank in y table salesin which I have only sales per product/brand/country, rank is an expression in my straight chart calculated according to my filters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 07:43:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1401002#M424713</guid>
      <dc:creator>syukyo_zhu</dc:creator>
      <dc:date>2017-08-30T07:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: calculate class</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1401003#M424714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some feedback for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I said that I have not my rank in my file which is indicator calculated in live in my application.&lt;/P&gt;&lt;P&gt;So I used only firt part of your script to get the liste of my range of class with interval function.&lt;/P&gt;&lt;P&gt;And then I use&amp;nbsp; concat to create two variables: one for class and another one for mapping like this&lt;/P&gt;&lt;P&gt;concat(Chr(39)&amp;amp;Classe&amp;amp;Chr(39),',', Key).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end, I create an expression in my straight table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;Pick(&lt;/P&gt;&lt;P&gt;Match(&lt;/P&gt;&lt;P&gt;County&amp;amp;'|'&amp;amp;Brand&amp;amp;'|'&amp;amp;Rank(.........&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/P&gt;&lt;P&gt;$(filedsmapping))+1,&lt;/P&gt;&lt;P&gt;'D',$(class),&lt;/P&gt;&lt;P&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway thanks for your advices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 09:18:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-class/m-p/1401003#M424714</guid>
      <dc:creator>syukyo_zhu</dc:creator>
      <dc:date>2017-09-04T09:18:12Z</dc:date>
    </item>
  </channel>
</rss>

