<?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 Group Alphabets into Buckets in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1699564#M451129</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;This might look simple, but somehow stuck here -&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a USERS column having names of the Users, with first name starting from A-Z. From this column, I created a calculated field in script called 'Alphabets' by 'Left (USERS, 1) as Alphabets', which gave me 26 distinct values from A-Z.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Now I want to&lt;/STRONG&gt; &lt;/U&gt;group the alphabets into 13 buckets in another column called 'Bucket' like, A&amp;amp;B in 1 , C&amp;amp;D in 2, E&amp;amp;F in 3..... Y&amp;amp;Z in 13.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the new field Bucket should have 13 distinct values that would have proper association.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please assist here.&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2020 18:56:13 GMT</pubDate>
    <dc:creator>dmohanty</dc:creator>
    <dc:date>2020-05-06T18:56:13Z</dc:date>
    <item>
      <title>Group Alphabets into Buckets</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1699564#M451129</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;This might look simple, but somehow stuck here -&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a USERS column having names of the Users, with first name starting from A-Z. From this column, I created a calculated field in script called 'Alphabets' by 'Left (USERS, 1) as Alphabets', which gave me 26 distinct values from A-Z.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Now I want to&lt;/STRONG&gt; &lt;/U&gt;group the alphabets into 13 buckets in another column called 'Bucket' like, A&amp;amp;B in 1 , C&amp;amp;D in 2, E&amp;amp;F in 3..... Y&amp;amp;Z in 13.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the new field Bucket should have 13 distinct values that would have proper association.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please assist here.&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 18:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1699564#M451129</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2020-05-06T18:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Group Alphabets into Buckets</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1699607#M451138</link>
      <description>&lt;P&gt;An easy way would be to type up a Mapping table like this:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;BucketMap:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Mapping Load * Inline [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;alpha, bucket&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;A, A&amp;amp;B&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;B, A&amp;amp;B&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;C, C&amp;amp;D&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;...etc...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;And then use the mapping table in your load.&amp;nbsp; I find coding more fun than typing so here's an example with generating the mapping table and testing it:&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;BucketMap:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;Mapping&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;LOAD&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; chr&lt;/SPAN&gt;(64+&lt;SPAN class="s1"&gt;RecNo&lt;/SPAN&gt;()),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; if&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Odd&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;RecNo&lt;/SPAN&gt;())&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; ,&lt;SPAN class="s1"&gt;chr&lt;/SPAN&gt;(64+&lt;SPAN class="s1"&gt;RecNo&lt;/SPAN&gt;()) &amp;amp; '&amp;amp;' &amp;amp; &lt;SPAN class="s1"&gt;chr&lt;/SPAN&gt;(64+&lt;SPAN class="s1"&gt;RecNo&lt;/SPAN&gt;()+1)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; ,&lt;SPAN class="s1"&gt;chr&lt;/SPAN&gt;(64+&lt;SPAN class="s1"&gt;RecNo&lt;/SPAN&gt;()-1) &amp;amp; '&amp;amp;' &amp;amp; &lt;SPAN class="s1"&gt;chr&lt;/SPAN&gt;(64+&lt;SPAN class="s1"&gt;RecNo&lt;/SPAN&gt;())&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;AutoGenerate&lt;/SPAN&gt; 26&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;MAP&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;Bucket&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;using&lt;/SPAN&gt; BucketMap;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Alpha:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;LOAD&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; *,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s2"&gt;&amp;nbsp; Alpha&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;as&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;Bucket&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;LOAD&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; chr&lt;/SPAN&gt;(64+&lt;SPAN class="s1"&gt;RecNo&lt;/SPAN&gt;()) &lt;SPAN class="s1"&gt;as&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;Alpha&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;AutoGenerate&lt;/SPAN&gt; 26&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 21:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1699607#M451138</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2020-05-06T21:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Group Alphabets into Buckets</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1700222#M451168</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for sharing an interesting idea. Yeah this helped as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even I could have used an Inline table to join, but wanted a reusable idea on this. So I was trying this concept, but somehow didnt worked out -&amp;nbsp;&lt;/P&gt;&lt;P&gt;If(Substringcount(Concat( DISTINCT Alphabets, '&amp;amp;') , 'A&amp;amp;B') = 1 , 'A&amp;amp;B' ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;If(Substringcount(Concat( DISTINCT Alphabets, '&amp;amp;') , 'C&amp;amp;D') = 1 , 'C&amp;amp;D'&lt;/P&gt;&lt;P&gt;...... ) as Bucket&lt;/P&gt;&lt;P&gt;Resident TableName;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this something we can tweak the above to make it work ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 13:31:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1700222#M451168</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2020-05-08T13:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Group Alphabets into Buckets</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1700249#M451170</link>
      <description>&lt;P&gt;A method that would not use another table might be:&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;if&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Odd&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;ord&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Alpha&lt;/SPAN&gt;))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; ,&lt;SPAN class="s2"&gt;Alpha&lt;/SPAN&gt; &amp;amp; '&amp;amp;' &amp;amp; &lt;SPAN class="s1"&gt;chr&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Ord&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Alpha&lt;/SPAN&gt;)+1)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; ,&lt;SPAN class="s1"&gt;chr&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Ord&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Alpha&lt;/SPAN&gt;)-1) &amp;amp; '&amp;amp;' &amp;amp; &lt;SPAN class="s2"&gt;Alpha&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;) &lt;SPAN class="s1"&gt;as&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;Bucket&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 14:50:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1700249#M451170</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2020-05-08T14:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Group Alphabets into Buckets</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1700266#M451171</link>
      <description>&lt;P&gt;To add to this discussion...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;BucketMap:
Mapping
LOAD
  chr(64+RecNo()),
  if(Odd(RecNo())
    ,chr(64+RecNo()) &amp;amp; '&amp;amp;' &amp;amp; chr(64+RecNo()+1)
    ,chr(64+RecNo()-1) &amp;amp; '&amp;amp;' &amp;amp; chr(64+RecNo())
)
AutoGenerate 26;
MAP Bucket using BucketMap;

Data:
LOAD *, Left(Name,1) As Bucket;
LOAD Capitalize(KeepChar(Hash128(Rand()),'ABCEDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')) As Name
AutoGenerate 20; &lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV46.PNG" style="width: 142px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33215i06D013752304F08A/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV46.PNG" alt="commQV46.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 16:17:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1700266#M451171</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-05-08T16:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Group Alphabets into Buckets</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1706238#M451474</link>
      <description>&lt;P&gt;You have received two follow-up posts to your initial request, we would appreciate it if you would be sure to return to the post and close the thread if you have a solution, and if the last two posts did help, be sure to use the Accept as Solution button to mark the post(s) that helped, as this gives them credit for the assistance and lets other Members know what worked.&amp;nbsp; If you have further questions etc., please leave an update post.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 20:04:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Alphabets-into-Buckets/m-p/1706238#M451474</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-05-28T20:04:50Z</dc:date>
    </item>
  </channel>
</rss>

