<?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 Assigning IP-Address to IP-Range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Assigning-IP-Address-to-IP-Range/m-p/221645#M74442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did it in this way:&lt;/P&gt;&lt;P&gt;To do ip range checks you have to convert every ip to numeric format. Just removing the dots won't make it decimal numeric so make sure you do it the correct way.&lt;/P&gt;&lt;P&gt;I created a NumericIp field like this in QV script:&lt;/P&gt;&lt;P&gt;Load subfield(ip,'.',1) &amp;lt;&amp;lt; 24 + subfield(ip,'.',2) &amp;lt;&amp;lt; 16 + subfield(ip,'.',3) &amp;lt;&amp;lt; 8 + subfield(ip,'.',4) &amp;lt;&amp;lt; 0 as NumericIp;&lt;/P&gt;&lt;P&gt;Use http://www.allredroster.com/iptodec.htm to validate your numeric ip's. For example, the ip 1.1.1.1 should equal 16843009 in numeric format.&lt;/P&gt;&lt;P&gt;Now you are ready to match the ip with your locations file that contains ip ranges and locations. My ip ranges file looks like this:&lt;/P&gt;&lt;P&gt;"2.6.190.56","2.6.190.63","33996344","33996351","Location 1"&lt;/P&gt;&lt;P&gt;"4.17.135.32","4.17.135.63","68257568","68257599","Location 2"&lt;/P&gt;&lt;P&gt;... and so on.&lt;/P&gt;&lt;P&gt;As you can see, I have pre-calculated the numeric ip's but you can make you conversion in the script when you load the locations file if you prefer that. Load the the locations file into a table called IpRanges and name the fields IpRangeStart, IpRangeEnd and IpLocation&lt;/P&gt;&lt;P&gt;Finally, you map the location for a specific ip by using the interval match:&lt;/P&gt;&lt;P&gt;Intervals:&lt;BR /&gt;intervalmatch ([NumericIp]) Load [IpRangeStart], [IpRangeEnd] Resident IpRanges;&lt;/P&gt;&lt;P&gt;I have posted an example qvw here: &lt;A href="http://community.qlik.com/media/p/121093.aspx" title="here"&gt;http://community.qlik.com/media/p/121093.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jul 2010 09:59:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-13T09:59:07Z</dc:date>
    <item>
      <title>Assigning IP-Address to IP-Range</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-IP-Address-to-IP-Range/m-p/221644#M74441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm not working with QlikView that long so I apologize if this question has been already answered in another post but i didn't really know what to search for in the forum.&lt;/P&gt;&lt;P&gt;My problem is as follows:&lt;/P&gt;&lt;P&gt;I have got a table called "logfile" and another table called "location". in the logfile there is some information about the users connection.&lt;/P&gt;&lt;P&gt;On the one hand the user can be identified with his IP-address in the log file&lt;/P&gt;&lt;P&gt;on the other hand you can assign an IP address to a IP-range to distinguish between the locations&lt;/P&gt;&lt;P&gt;due to the fact that this should not be a user specific but a location specific reporting, I tried to connect the fields IP-range and IP-address using the textbetween function but this does not work. has anybody an idea how to solve that problem?&lt;/P&gt;&lt;P&gt;thanking you in anticipation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 09:13:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-IP-Address-to-IP-Range/m-p/221644#M74441</guid>
      <dc:creator />
      <dc:date>2010-07-13T09:13:41Z</dc:date>
    </item>
    <item>
      <title>Assigning IP-Address to IP-Range</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-IP-Address-to-IP-Range/m-p/221645#M74442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did it in this way:&lt;/P&gt;&lt;P&gt;To do ip range checks you have to convert every ip to numeric format. Just removing the dots won't make it decimal numeric so make sure you do it the correct way.&lt;/P&gt;&lt;P&gt;I created a NumericIp field like this in QV script:&lt;/P&gt;&lt;P&gt;Load subfield(ip,'.',1) &amp;lt;&amp;lt; 24 + subfield(ip,'.',2) &amp;lt;&amp;lt; 16 + subfield(ip,'.',3) &amp;lt;&amp;lt; 8 + subfield(ip,'.',4) &amp;lt;&amp;lt; 0 as NumericIp;&lt;/P&gt;&lt;P&gt;Use http://www.allredroster.com/iptodec.htm to validate your numeric ip's. For example, the ip 1.1.1.1 should equal 16843009 in numeric format.&lt;/P&gt;&lt;P&gt;Now you are ready to match the ip with your locations file that contains ip ranges and locations. My ip ranges file looks like this:&lt;/P&gt;&lt;P&gt;"2.6.190.56","2.6.190.63","33996344","33996351","Location 1"&lt;/P&gt;&lt;P&gt;"4.17.135.32","4.17.135.63","68257568","68257599","Location 2"&lt;/P&gt;&lt;P&gt;... and so on.&lt;/P&gt;&lt;P&gt;As you can see, I have pre-calculated the numeric ip's but you can make you conversion in the script when you load the locations file if you prefer that. Load the the locations file into a table called IpRanges and name the fields IpRangeStart, IpRangeEnd and IpLocation&lt;/P&gt;&lt;P&gt;Finally, you map the location for a specific ip by using the interval match:&lt;/P&gt;&lt;P&gt;Intervals:&lt;BR /&gt;intervalmatch ([NumericIp]) Load [IpRangeStart], [IpRangeEnd] Resident IpRanges;&lt;/P&gt;&lt;P&gt;I have posted an example qvw here: &lt;A href="http://community.qlik.com/media/p/121093.aspx" title="here"&gt;http://community.qlik.com/media/p/121093.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 09:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-IP-Address-to-IP-Range/m-p/221645#M74442</guid>
      <dc:creator />
      <dc:date>2010-07-13T09:59:07Z</dc:date>
    </item>
    <item>
      <title>Assigning IP-Address to IP-Range</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-IP-Address-to-IP-Range/m-p/221646#M74443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works great! Nothing left to say. Tank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 10:49:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-IP-Address-to-IP-Range/m-p/221646#M74443</guid>
      <dc:creator />
      <dc:date>2010-07-13T10:49:46Z</dc:date>
    </item>
  </channel>
</rss>

