<?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: Complicated situation for Lookup function in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409476#M33067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct; UNITS is number of cartons and I am using the Lookup function to get CartonsToPallet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Sep 2017 16:17:43 GMT</pubDate>
    <dc:creator>mikegrattan</dc:creator>
    <dc:date>2017-09-13T16:17:43Z</dc:date>
    <item>
      <title>Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409472#M33063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table with item numbers, descriptions, and a attribute called Cartons to Pallet.&amp;nbsp; This attribute tells me how many cartons of a particular item number will fit on one pallet.&amp;nbsp; If an order has less than this number of cartons, then it is a "picked" item, meaning it had to be removed from a full pallet in order to fulfill the order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When identifying a picked item in an order I am using the Lookup function to set a flag for that item.&amp;nbsp; As of this moment, it is only checking to see if the number of cartons is less than the cartons to pallet attribute:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(UNITS &amp;lt; Lookup('CartonsToPallet','ItemNumber',ITEMNUM,'ItemDescriptions'),1,0) AS PickFlag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also like to check if the number of cartons is greater than Cartons To Pallet but also divisible by a whole number.&amp;nbsp; For example, if Cartons To Pallet is 56, and the number of cartons on the order is equal to 56 * 2, or 56 * 3, or any other whole number then this would indicate that whole pallets of this item were loaded and the cartons did not need to be picked.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 15:42:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409472#M33063</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-09-13T15:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409473#M33064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not completely sure, but you can use Mod function to find if the number is whole number or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Mod(Number1, Number2) = 0, 'whole pallet', 'Incomplete pallet')&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 15:57:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409473#M33064</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-13T15:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409474#M33065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the response Sunny.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I should clarify my question.&amp;nbsp; If the number of cartons is greater than Cartons To Pallet and it is evenly divisible by Cartons To Pallet (but not necessarily just a whole number).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: If there are 112 cartons on the order and Cartons To Pallet for that item number is 56, then there are two full pallets on the order.&amp;nbsp; If the number of cartons is 150, then there is one full pallet and one partial pallet.&amp;nbsp; Since one pallet was "picked", then the pick flag would be 1 for that item number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to write my IF statement so that it accommodates both the situation where the number of cartons is less than the Cartons To Pallet value, but could also be greater than that number if it is evenly divisible by Cartons To Pallet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:08:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409474#M33065</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-09-13T16:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409475#M33066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which part of your expression is number of cartons and which one is Cartons To Pallet here?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;UNITS &amp;lt; Lookup('CartonsToPallet','ItemNumber',ITEMNUM,'ItemDescriptions')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is UNITS number of cartons? and Lookup Cartons to Pallet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409475#M33066</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-13T16:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409476#M33067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct; UNITS is number of cartons and I am using the Lookup function to get CartonsToPallet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:17:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409476#M33067</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-09-13T16:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409477#M33068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(UNITS &amp;lt; Lookup('CartonsToPallet','ItemNumber',ITEMNUM,'ItemDescriptions')&lt;SPAN style="color: #ff0000;"&gt; or&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;Mod(UNITS, Lookup('CartonsToPallet','ItemNumber',ITEMNUM,'ItemDescriptions'))&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;&amp;lt;&amp;gt; 0&lt;/SPAN&gt;,1,0) AS PickFlag&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409477#M33068</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-13T16:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409478#M33069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's probably on the right track but doesn't account for the UNITS being evenly divisible by CartonsToPallet.&amp;nbsp; I wonder if it would work like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If(UNITS &amp;lt; Lookup('CartonsToPallet','ItemNumber',ITEMNUM,'ItemDescriptions')&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt; or&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;Mod(UNITS / Lookup('CartonsToPallet','ItemNumber',ITEMNUM,'ItemDescriptions'))&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;&amp;lt;&amp;gt; 0&lt;/SPAN&gt;,1,0) AS PickFlag&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Can I divide UNITS by the lookup value and test the MOD of that?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409478#M33069</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-09-13T16:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409479#M33070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mod is checking for remainder &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;... You don't need to use /... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:36:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409479#M33070</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-13T16:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409480#M33071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So MOD is doing division by CartonsToPallet?&amp;nbsp; Cool....I will test and get back to you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:38:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409480#M33071</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-09-13T16:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409481#M33072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yup &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/ChartFunctions/GeneralNumericFunctions/mod.htm" title="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/ChartFunctions/GeneralNumericFunctions/mod.htm"&gt;Mod ‒ QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409481#M33072</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-13T16:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Complicated situation for Lookup function</title>
      <link>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409482#M33073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works perfectly.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 17:40:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Complicated-situation-for-Lookup-function/m-p/1409482#M33073</guid>
      <dc:creator>mikegrattan</dc:creator>
      <dc:date>2017-09-13T17:40:39Z</dc:date>
    </item>
  </channel>
</rss>

