<?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 Converting a Numeric working Function to on a alphanumeric field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Converting-a-Numeric-working-Function-to-on-a-alphanumeric-field/m-p/1728032#M55501</link>
    <description>&lt;P&gt;I got a function&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/35145" target="_self"&gt;Stigchel&lt;/A&gt;&amp;nbsp;posted on the QlikView community.&amp;nbsp;&amp;nbsp;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/24514" target="_self"&gt;Patric_Nordstrom&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;took this further and applied it to a QlikSense in his "Top 10 Viz tricks - Qonnections 2019" app,&amp;nbsp;that works perfectly on a numeric field (Order_ID).&amp;nbsp; I'm now trying to use the same functionality on a alphanumeric field (Site_Cd), but can't figure out how.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=subfield(Concat( {&amp;lt;OrderID={"&amp;gt;$(=OrderID)"}&amp;gt;} DISTINCT OrderID,'@',OrderID),'@',1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Needless to say, just swopping out Order_ID with Site_Cd doesn't work.&amp;nbsp; I've got a feeling the issue is with the {"&amp;gt;$(=Site_Cd)"}.&amp;nbsp; Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&lt;STRONG&gt;Edit:&lt;/STRONG&gt;&amp;nbsp;Maybe just mention, Site_Cd comes in values like: CEN_4111, EAS_12701 etc.&amp;nbsp; So if someone can come up with a way assigning numeric values to it, that should work to.&amp;nbsp; The number of site_cd's differe from month to month, but we are roughly looking at about 14k unique values.&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN class="login-bold"&gt;Stigchel&lt;/SPAN&gt;&amp;nbsp;post:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-App-Development/How-to-find-next-previous-value-of-the-field/td-p/831644" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/QlikView-App-Development/How-to-find-next-previous-value-of-the-field/td-p/831644&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="login-bold"&gt;Patric_Nordstrom&lt;/SPAN&gt;&amp;nbsp;post:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-Documents-Videos/Top-10-Viz-tricks-Qonnections-2019/ta-p/1580174?_ga=2.242154310.537636640.1594360776-2126863481.1588836162" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Qlik-Sense-Documents-Videos/Top-10-Viz-tricks-Qonnections-2019/ta-p/1580174?_ga=2.242154310.537636640.1594360776-2126863481.1588836162&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 18:21:49 GMT</pubDate>
    <dc:creator>Stefan_dT</dc:creator>
    <dc:date>2024-11-16T18:21:49Z</dc:date>
    <item>
      <title>Converting a Numeric working Function to on a alphanumeric field</title>
      <link>https://community.qlik.com/t5/App-Development/Converting-a-Numeric-working-Function-to-on-a-alphanumeric-field/m-p/1728032#M55501</link>
      <description>&lt;P&gt;I got a function&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/35145" target="_self"&gt;Stigchel&lt;/A&gt;&amp;nbsp;posted on the QlikView community.&amp;nbsp;&amp;nbsp;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/24514" target="_self"&gt;Patric_Nordstrom&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;took this further and applied it to a QlikSense in his "Top 10 Viz tricks - Qonnections 2019" app,&amp;nbsp;that works perfectly on a numeric field (Order_ID).&amp;nbsp; I'm now trying to use the same functionality on a alphanumeric field (Site_Cd), but can't figure out how.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=subfield(Concat( {&amp;lt;OrderID={"&amp;gt;$(=OrderID)"}&amp;gt;} DISTINCT OrderID,'@',OrderID),'@',1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Needless to say, just swopping out Order_ID with Site_Cd doesn't work.&amp;nbsp; I've got a feeling the issue is with the {"&amp;gt;$(=Site_Cd)"}.&amp;nbsp; Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&lt;STRONG&gt;Edit:&lt;/STRONG&gt;&amp;nbsp;Maybe just mention, Site_Cd comes in values like: CEN_4111, EAS_12701 etc.&amp;nbsp; So if someone can come up with a way assigning numeric values to it, that should work to.&amp;nbsp; The number of site_cd's differe from month to month, but we are roughly looking at about 14k unique values.&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN class="login-bold"&gt;Stigchel&lt;/SPAN&gt;&amp;nbsp;post:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-App-Development/How-to-find-next-previous-value-of-the-field/td-p/831644" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/QlikView-App-Development/How-to-find-next-previous-value-of-the-field/td-p/831644&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="login-bold"&gt;Patric_Nordstrom&lt;/SPAN&gt;&amp;nbsp;post:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-Documents-Videos/Top-10-Viz-tricks-Qonnections-2019/ta-p/1580174?_ga=2.242154310.537636640.1594360776-2126863481.1588836162" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Qlik-Sense-Documents-Videos/Top-10-Viz-tricks-Qonnections-2019/ta-p/1580174?_ga=2.242154310.537636640.1594360776-2126863481.1588836162&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:21:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Converting-a-Numeric-working-Function-to-on-a-alphanumeric-field/m-p/1728032#M55501</guid>
      <dc:creator>Stefan_dT</dc:creator>
      <dc:date>2024-11-16T18:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Converting a Numeric working Function to on a alphanumeric field</title>
      <link>https://community.qlik.com/t5/App-Development/Converting-a-Numeric-working-Function-to-on-a-alphanumeric-field/m-p/1728501#M55547</link>
      <description>&lt;P&gt;For anyone that might&amp;nbsp; stumble unto this post with a similar issue, herewith the solution&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/24514"&gt;@Patric_Nordstrom&lt;/a&gt;&amp;nbsp;&amp;nbsp;suggested that I "c&lt;SPAN&gt;reate a numeric version of Site_Cd with the sort you like, Site_Order.&amp;nbsp; Haven't tested but should work."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The standard I use, is *_Cd for alhpanumeric identifiers and *_Id for numeric&amp;nbsp;identifiers , so using below code, I converted Site_Cd into Site_Id.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Handling known anomolies in the data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
,IF(Site_Cd ='NA' , 10000001,
IF(Site_Cd ='UNK' , 10000002,
IF(Site_Cd ='no_atoll_site_id' , 10000003,
IF(Site_Cd ='Site4119' , 10404119,
IF(Site_Cd ='NGA_Nikon_House_SC', 10600000,

// Converting the correct Site_Cd's ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IF(SubField(Site_Cd,'_',1)='CEN', 101 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'),
IF(SubField(Site_Cd,'_',1)='EAS', 102 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'),
IF(SubField(Site_Cd,'_',1)='KZN', 103 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'),
IF(SubField(Site_Cd,'_',1)='LIM', 104 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'),
IF(SubField(Site_Cd,'_',1)='MPU', 105 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'),
IF(SubField(Site_Cd,'_',1)='NGA', 106 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'),
IF(SubField(Site_Cd,'_',1)='SGA', 107 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'),
IF(SubField(Site_Cd,'_',1)='SGS', 108 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'),
IF(SubField(Site_Cd,'_',1)='SGC', 109 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'),
IF(SubField(Site_Cd,'_',1)='WES', 110 &amp;amp; NUM(COALESCE(SubField(Site_Cd,'_',2),0),'00000'), 10000004))))))))))))))) as "Site_Id"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then I could simply replace OrderID with Site_Id for the navigation, but still select Site_Cd as per Patric's solution:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=subfield(Concat( {&amp;lt;Site_Id={"&amp;gt;$(=Site_Id)"}&amp;gt;} DISTINCT Site_Cd,'@',Site_Id),'@',1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 14:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Converting-a-Numeric-working-Function-to-on-a-alphanumeric-field/m-p/1728501#M55547</guid>
      <dc:creator>Stefan_dT</dc:creator>
      <dc:date>2020-07-16T14:45:13Z</dc:date>
    </item>
  </channel>
</rss>

