<?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: return value based on value between 2 other values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508653#M751705</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;apologies for the delay, attached the postalcode file.&lt;/P&gt;&lt;P&gt;I used to find the match in excel with the lookup formula, tried it in QV but looks like the syntacts is not the same..?&lt;/P&gt;&lt;P&gt;hope you can work this out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Nov 2018 17:33:37 GMT</pubDate>
    <dc:creator>PeterHenskens</dc:creator>
    <dc:date>2018-11-18T17:33:37Z</dc:date>
    <item>
      <title>return value based on value between 2 other values</title>
      <link>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508494#M751699</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I’m pretty new in Qlikview, but wonder if there is a way to return a value if a certain value is between 2 other values&lt;/P&gt;&lt;P&gt;example based on zip codes in US:&lt;/P&gt;&lt;P&gt;let’s say I have a zipcode 651, the value that should return would be 9 (651 is between 600 and 999)&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Lower Postal&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Upper Postal&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Zone&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;500&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;599&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;600&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;999&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;9&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;1000&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2999&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table named TX_data&lt;/P&gt;&lt;P&gt;there is a field named&amp;nbsp;[Pickup Postal Code] (search criteria)&lt;/P&gt;&lt;P&gt;in this table I’d like to add a column with "Zone"&lt;/P&gt;&lt;P&gt;table to search in =&lt;/P&gt;&lt;P&gt;Landmark_Zones:&lt;BR /&gt;LOAD [Lower Postal],&amp;nbsp;&lt;BR /&gt;[Upper Postal],&amp;nbsp;&lt;BR /&gt;Zone&lt;/P&gt;&lt;P&gt;its also the first time I've posted a question so if things are not propper explaned please ask for more info.&lt;/P&gt;&lt;P&gt;thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508494#M751699</guid>
      <dc:creator>PeterHenskens</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: return value based on value between 2 other values</title>
      <link>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508500#M751700</link>
      <description>&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;Please take a look at how&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/LoadData/matching-intervals-to-discrete-data.htm" target="_self"&gt;IntervalMatch - Matching intervals to discrete data &lt;/A&gt;can help you.&lt;/P&gt;&lt;P&gt;In your example&lt;/P&gt;&lt;PRE&gt;TX_data:
LOAD * INLINE [
Pickup Postal Code
599
500
750
1500
];

Landmark_Zones:
LOAD * INLINE [
Lower Postal, Upper Postal, Zone
500, 599, 2
600, 999, 9
1000, 2999, 3
];

INNER JOIN IntervalMatch ([Pickup Postal Code])
 
LOAD 
[Lower Postal], 
[Upper Postal]
RESIDENT 
Landmark_Zones;&lt;/PRE&gt;&lt;P&gt;Also attached in case you prefer to pull apart.&lt;/P&gt;&lt;P&gt;All the best.&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 13:14:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508500#M751700</guid>
      <dc:creator>charlie_firemind</dc:creator>
      <dc:date>2018-11-17T13:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: return value based on value between 2 other values</title>
      <link>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508510#M751701</link>
      <description>&lt;P&gt;Hi Charlie,&lt;/P&gt;&lt;P&gt;many thanks for your responce, but i cannot open your files.&lt;/P&gt;&lt;P&gt;just to be clear TX_Data is +1m rows, looking at your code i should paste all the Pickup postal codes under load * INLINE?&lt;/P&gt;&lt;P&gt;Lower and upper code is 400 rows&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 14:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508510#M751701</guid>
      <dc:creator>PeterHenskens</dc:creator>
      <dc:date>2018-11-17T14:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: return value based on value between 2 other values</title>
      <link>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508512#M751702</link>
      <description>Apologies I just noticed this is View not Sense, thats my fault (The code is exactly the same as attachment though).&lt;BR /&gt;&lt;BR /&gt;That's correct - just add the remaining postal codes you have and you will be ready to go.&lt;BR /&gt;&lt;BR /&gt;If you have the post codes in an excel file or table just switch that with the inline table, that was just to give an example.&lt;BR /&gt;&lt;BR /&gt;Let me know if you have no joy.</description>
      <pubDate>Sat, 17 Nov 2018 14:46:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508512#M751702</guid>
      <dc:creator>charlie_firemind</dc:creator>
      <dc:date>2018-11-17T14:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: return value based on value between 2 other values</title>
      <link>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508518#M751703</link>
      <description>&lt;P&gt;unfortunatly not realy working like I was hoping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code:&lt;/P&gt;&lt;P&gt;TX_Data:&lt;BR /&gt;LOAD Id,&lt;BR /&gt;[Project Code],&lt;BR /&gt;[Project Name],&lt;BR /&gt;Performance,&lt;BR /&gt;Packages,&lt;BR /&gt;[SLA Pickup Date],&lt;BR /&gt;[Actual Pickup Date],&lt;BR /&gt;[Actual Pickup Time],&lt;BR /&gt;[Pickup Name],&lt;BR /&gt;[Pickup Postal Code],&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;Zones:&lt;BR /&gt;LOAD [Lower Postal],&lt;BR /&gt;[Upper Postal],&lt;BR /&gt;Zone&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;INNER JOIN IntervalMatch ([Delivery Postal Code])&lt;BR /&gt;LOAD&lt;BR /&gt;[Lower Postal],&lt;BR /&gt;[Upper Postal]&lt;BR /&gt;RESIDENT&lt;BR /&gt;Zones;&lt;/P&gt;&lt;P&gt;result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Zone should be a number between 1 and 43" style="width: 391px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/517i8D351B77D3A97245/image-size/large?v=v2&amp;amp;px=999" role="button" title="tempsnip.png" alt="Zone should be a number between 1 and 43" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Zone should be a number between 1 and 43&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 16:09:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508518#M751703</guid>
      <dc:creator>PeterHenskens</dc:creator>
      <dc:date>2018-11-17T16:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: return value based on value between 2 other values</title>
      <link>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508527#M751704</link>
      <description>So intervalmatch works with numeric values - The [Delivery Postal Code] above is not numeric as per your original 500 - 599 etc.&lt;BR /&gt;&lt;BR /&gt;Can you please share an example of your Lower Postal], [Upper Postal] table and I will suggest the best route.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 17 Nov 2018 19:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508527#M751704</guid>
      <dc:creator>charlie_firemind</dc:creator>
      <dc:date>2018-11-17T19:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: return value based on value between 2 other values</title>
      <link>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508653#M751705</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;apologies for the delay, attached the postalcode file.&lt;/P&gt;&lt;P&gt;I used to find the match in excel with the lookup formula, tried it in QV but looks like the syntacts is not the same..?&lt;/P&gt;&lt;P&gt;hope you can work this out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 17:33:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/return-value-based-on-value-between-2-other-values/m-p/1508653#M751705</guid>
      <dc:creator>PeterHenskens</dc:creator>
      <dc:date>2018-11-18T17:33:37Z</dc:date>
    </item>
  </channel>
</rss>

