<?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 binary sequence to decimal in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094093#M363548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am loading a file that contains a column holding a binary sequence (bits) and need to convert it to a decimal value. An example is the sequence: 000010111101011101111010 which converts to the decimal value 776058. The math to do this is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0×2²³+0×2²²+0×2²¹+0×2²⁰+1×2¹⁹+0×2¹⁸+1×2¹⁷+1×2¹⁶+1×2¹⁵+1×2¹⁴+0×2¹³+1×2¹²+0×2¹¹+1×2¹⁰+1×2⁹+1×2⁸+0×2⁷+1×2⁶+1×2⁵+1×2⁴+1×2³+0×2²+1×2¹+0×2⁰ = 776058&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...but, the length of the incoming decimal value may vary so, I don't want to hardcode anything. Ideally, if there was a function in Qlik or a way of parsing this string iteratively....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Likewise, I also have hexadecimal values that need to be converted into binary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any creative approaches would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jan 2016 16:22:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-01-14T16:22:54Z</dc:date>
    <item>
      <title>Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094093#M363548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am loading a file that contains a column holding a binary sequence (bits) and need to convert it to a decimal value. An example is the sequence: 000010111101011101111010 which converts to the decimal value 776058. The math to do this is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0×2²³+0×2²²+0×2²¹+0×2²⁰+1×2¹⁹+0×2¹⁸+1×2¹⁷+1×2¹⁶+1×2¹⁵+1×2¹⁴+0×2¹³+1×2¹²+0×2¹¹+1×2¹⁰+1×2⁹+1×2⁸+0×2⁷+1×2⁶+1×2⁵+1×2⁴+1×2³+0×2²+1×2¹+0×2⁰ = 776058&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...but, the length of the incoming decimal value may vary so, I don't want to hardcode anything. Ideally, if there was a function in Qlik or a way of parsing this string iteratively....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Likewise, I also have hexadecimal values that need to be converted into binary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any creative approaches would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 16:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094093#M363548</guid>
      <dc:creator />
      <dc:date>2016-01-14T16:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094094#M363549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Binary,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Len(Binary) as Length;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Binary&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;000010111101011101111010&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vLen = Peek('Length');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vBinary = Peek('Binary');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vNumber = 0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FOR i = 0 to ($(vLen) - 1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vCalc = (Mid($(vBinary), ($(i) + 1), 1) * pow(2, $(vLen) - ($(i)+1)));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vNumber = $(vCalc) + $(vNumber);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NEXT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/111690_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 20:16:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094094#M363549</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-14T20:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094095#M363550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny - this works beautifully. What I am trying to do is to save the calculated decimal value for each row of my table so I can save the entire file as a QVD. Is there any way to save the calculated decimal result at the row level instead of saving the last calculated result to a variable? My input file has over 1M rows in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:06:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094095#M363550</guid>
      <dc:creator />
      <dc:date>2016-01-14T22:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094096#M363551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it should be possible to interpret binary values using Num#(Binary, '(BIN)'), but I failed to do right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14528111116149793" jivemacro_uid="_14528111116149793"&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;P&gt;LOAD Binary, Sum( Bit &amp;lt;&amp;lt;&amp;nbsp; Bitno) as Decimal&lt;/P&gt;
&lt;P&gt;GROUP BY Binary;&lt;/P&gt;
&lt;P&gt;LOAD Binary, Mid(Binary,Length-(Iterno()-1),1) as Bit, Iterno()-1 as Bitno&lt;/P&gt;
&lt;P&gt;While Iterno() &amp;lt;= Length;&lt;/P&gt;
&lt;P&gt;LOAD Binary,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Len(Binary) as Length;&lt;/P&gt;
&lt;P&gt;LOAD * Inline [&lt;/P&gt;
&lt;P&gt;Binary&lt;/P&gt;
&lt;P&gt;000010111101011101111010&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:38:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094096#M363551</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-14T22:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094097#M363552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason it fails is that the number of digits in the binary string (or characters) is limited to 14 for some strange reason. So the way to circumvent this limitation is to chunk the conversion into multiples of 14 characters (digits).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:57:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094097#M363552</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2016-01-14T22:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094098#M363553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Super Stefan &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:58:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094098#M363553</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-14T22:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094099#M363554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know what you guys are talking about. The script seems to interpret longer than 14 number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/111709_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No change to Stefan's script except for adding the 39 long binary number here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Binary, Sum( Bit &amp;lt;&amp;lt;&amp;nbsp; Bitno) as Decimal&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GROUP BY Binary;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Binary, Mid(Binary,Length-(Iterno()-1),1) as Bit, Iterno()-1 as Bitno&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While Iterno() &amp;lt;= Length;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Binary,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Len(Binary) as Length;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Binary&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;000010111101011101111010&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;010101010101011110101101001100101010101&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0101&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 23:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094099#M363554</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-14T23:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094100#M363555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think swuehl is on the right track with Num#(). But as Petter pointed out, there is a 14 digit input limit to Num#(). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this: Num(Num#(Binary, '(BIN)'))&lt;/P&gt;&lt;P&gt;works fine as long as you don't have more than 14 digits. Assuming no more than 28 digits you can do something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,Num(&lt;/P&gt;&lt;P&gt;&amp;nbsp; Num#(right(Binary,14),'(BIN)')&lt;/P&gt;&lt;P&gt;&amp;nbsp; + (alt(Num#(left(Binary, rangemax(0,len(Binary)-14)),'(BIN)'),0) &amp;lt;&amp;lt;14)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ) as Decimal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure there is a simpler syntax. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 23:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094100#M363555</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-01-14T23:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094101#M363556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I am unable to understand the issue here, but I just added a sample with 39 numbers sequence and it seems to have worked with Stefan's code. Are you guys talking about something else? I am sorry, if it I am missing something very simple here &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 23:29:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094101#M363556</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-14T23:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094102#M363557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny, I believe the discussion has focused on NUM#(Binary, '(BIN)') issues, it was not about my alternative solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's kind of strange that the num#() function is not able to parse binary values with more than 14 digits (we know this limit e.g. when interpreting integer values, but it doesn't really make sense for binary values). Looks like a bug to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the alternative, I've noticed that we need to care about duplicate Binary values, so grouping only by Binary would be careless:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD ID, Binary, Sum( Bit &amp;lt;&amp;lt;&amp;nbsp; Bitno) as Decimal&lt;/P&gt;&lt;P&gt;GROUP BY ID, Binary;&lt;/P&gt;&lt;P&gt;LOAD ID, Binary, Mid(Binary,Length-(Iterno()-1),1) as Bit, Iterno()-1 as Bitno&lt;/P&gt;&lt;P&gt;While Iterno() &amp;lt;= Length;&lt;/P&gt;&lt;P&gt;LOAD Binary,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Len(Binary) as Length,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; recno() as ID;&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;Binary&lt;/P&gt;&lt;P&gt;000010111101011101111010&lt;/P&gt;&lt;P&gt;000010111101011101111010&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 00:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094102#M363557</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-15T00:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094103#M363558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it. So this was your alternative method. Thanks Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 00:21:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094103#M363558</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-15T00:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094104#M363559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Decimal &lt;/SPAN&gt;:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD Binary, Sum(DecimalValue) as Decimal&amp;nbsp; &lt;/P&gt;&lt;P&gt;GROUP BY Binary;&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD Binary,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Alt(Pow(If(Mid(Binary, IterNo(), 1) = 1, 2), &lt;SPAN style="font-size: 13.3333px;"&gt;Length&lt;/SPAN&gt;-IterNo()), 0)&amp;nbsp; as DecimalValue&lt;/P&gt;&lt;P&gt;While Iterno() &amp;lt;= Length;&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Binary,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Len(Binary) as Length &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM DataSource;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE Decimal INTO Decimal.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 01:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094104#M363559</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2016-01-15T01:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094105#M363560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to Sunny and swuehl for sparking the solutions...all of yours worked for the conversion just great but, for my very specific situation, Rob's was the one that worked out best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Rob, Sunny, &amp;amp; swuehl!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 01:24:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094105#M363560</guid>
      <dc:creator />
      <dc:date>2016-01-15T01:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094106#M363561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One solution using the splitting into 14 digits at a time could look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2016-01-15 #1.PNG" class="jive-image image-1" height="95" src="/legacyfs/online/111688_2016-01-15 #1.PNG" style="height: 95px; width: 795.946px;" width="796" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 08:11:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094106#M363561</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2016-01-15T08:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Converting binary sequence to decimal</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094107#M363562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have reported this as a bug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if I may, I would like to show a different solution to the problem: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, create a mapping table that converts a four-digit BIN to HEX:&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;Bin2Hex:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Mapping&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Load&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Right&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;('0000' &amp;amp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;RecNo&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;()-1,'(BIN)'),4) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon;"&gt;BIN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;RecNo&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;()-1,'(HEX)') &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon;"&gt;HEX&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Autogenerate&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt; 16;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this to convert the number to HEX, and &lt;EM&gt;&lt;STRONG&gt;then&lt;/STRONG&gt;&lt;/EM&gt; use the Num#() function:&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Num&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Num#&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;MapSubString&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;('Bin2Hex',&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Right&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;('0000' &amp;amp; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon;"&gt;Binary&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;, 4*&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Ceil&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;Len&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon;"&gt;Binary&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;)/4))),'(HEX)')) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: maroon;"&gt;Number&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 14-digit limitation is still there, but now we talk about 14 HEX-digits. And that's slightly better....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 14:22:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-binary-sequence-to-decimal/m-p/1094107#M363562</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2016-01-22T14:22:16Z</dc:date>
    </item>
  </channel>
</rss>

