<?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: use class function to group customer spending in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762406#M271079</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have such consistent buckets you could it make easier with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;'Bucket' &amp;amp; ceil(day / 7) as bucket&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this already within the first load: ceil(day(date) / 7).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Oct 2015 08:51:58 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2015-10-20T08:51:58Z</dc:date>
    <item>
      <title>use class function to group customer spending</title>
      <link>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762401#M271074</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;I have the data like below table 1, and I want to group it like table 2, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Now I'm using a if to do it, &lt;/SPAN&gt;does anybody have experience using class function to archive the same result? &lt;/P&gt;&lt;P&gt;Table1&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81453_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Table2: &lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/81454_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 23:50:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762401#M271074</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-20T23:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: use class function to group customer spending</title>
      <link>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762402#M271075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your intervals are not equal so class will no w0rk here...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Mar 2015 00:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762402#M271075</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-03-21T00:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: use class function to group customer spending</title>
      <link>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762403#M271076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Better you create the bucket in the load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Mar 2015 05:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762403#M271076</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2015-03-21T05:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: use class function to group customer spending</title>
      <link>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762404#M271077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't need these clustering dynamically use the suggestion from &lt;A href="https://community.qlik.com/qlik-users/56619"&gt;Anand Chouhan&lt;/A&gt; maybe with class or a mapping-approach. Should it be dynamic you could use an if-loop inside the class-function to create non-equeal buckets (you have only to avoid an overlapping from the buckets) but better would be you used equal bucket-sizes controlled by a variable - so the user could choose which buckets he/she want to see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Mar 2015 10:40:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762404#M271077</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-03-21T10:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: use class function to group customer spending</title>
      <link>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762405#M271078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;demo:&lt;/P&gt;&lt;P&gt;LOAD ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date, &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; Month(date) as mon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(date) as day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(date) as year&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;D&gt;&lt;/D&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&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;new:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;if(match(day&amp;gt;=1,day&amp;lt;=7),'Bucket1',&lt;/P&gt;&lt;P&gt;if(match(day&amp;gt;=8, day&amp;lt;=14),'Bucket2',&lt;/P&gt;&lt;P&gt;if(match(day&amp;gt;=15, day&amp;lt;=21),'Bucket3',&lt;/P&gt;&lt;P&gt;if(match(day&amp;gt;=22 , day&amp;lt;=28),'Bucket4',&lt;/P&gt;&lt;P&gt;if(match(day&amp;gt;=29 , day&amp;lt;=31),'Bucket5'))))) as Bucket&lt;/P&gt;&lt;P&gt;Resident demo;&lt;/P&gt;&lt;P&gt;DROP Table demo;&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;//new:&lt;/P&gt;&lt;P&gt;//LOAD *,&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;//if(Match(day,1,2,3,4,5,6,7) , 'bucket1',&lt;/P&gt;&lt;P&gt;//if(Match(day,8,9,10,11,12,13,14), 'bucket2',&lt;/P&gt;&lt;P&gt;//if(Match(day,15,16,17,18,19,20,21), 'bucket3',&lt;/P&gt;&lt;P&gt;//if(Match(day,22,23,24,25,26,27,28), 'bucket4',&lt;/P&gt;&lt;P&gt;//if(Match(day,29,30,31), 'bucket5'))))) as bucket&lt;/P&gt;&lt;P&gt;//Resident table;&lt;/P&gt;&lt;P&gt;//DROP Table table;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 08:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762405#M271078</guid>
      <dc:creator>sumitjadhav</dc:creator>
      <dc:date>2015-10-20T08:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: use class function to group customer spending</title>
      <link>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762406#M271079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have such consistent buckets you could it make easier with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;'Bucket' &amp;amp; ceil(day / 7) as bucket&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this already within the first load: ceil(day(date) / 7).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 08:51:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-class-function-to-group-customer-spending/m-p/762406#M271079</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-10-20T08:51:58Z</dc:date>
    </item>
  </channel>
</rss>

