<?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 Add a unique identifier with nulls in the table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Add-a-unique-identifier-with-nulls-in-the-table/m-p/2064921#M87346</link>
    <description>&lt;P&gt;Below, a test data set, unfortunately doesn't give me the behaviour I need. The answer escapes me. Any insights would be appreciated.&lt;/P&gt;
&lt;P&gt;The calculation, not unexpectedly, will not execute when Lot is a null.&lt;/P&gt;
&lt;P&gt;I need to run the calculation for each line, but I don't have the ability to create a guaranteed unique identify. I don't see a way to add a Row number, again, because I don't have a way to create a guaranteed unique identify for each row.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;Parts:
Load * Inline
[
Part, Factor
ABC, 400
DEF, 400
GHI, 400
];

Left Join (Parts)
Load * Inline
[
Part, Lot, Price, Adder
ABC, 123, 1.45, 2022
ABC, 987, 0.56, 2020
DEF, 456, 0.02, 2022
];

Left Join (Parts)
Load
Part, Lot,
If(IsNull(Price), Factor, Price + Adder) as Result
Resident Parts;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 15:25:17 GMT</pubDate>
    <dc:creator>smarties</dc:creator>
    <dc:date>2023-04-26T15:25:17Z</dc:date>
    <item>
      <title>Add a unique identifier with nulls in the table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-a-unique-identifier-with-nulls-in-the-table/m-p/2064921#M87346</link>
      <description>&lt;P&gt;Below, a test data set, unfortunately doesn't give me the behaviour I need. The answer escapes me. Any insights would be appreciated.&lt;/P&gt;
&lt;P&gt;The calculation, not unexpectedly, will not execute when Lot is a null.&lt;/P&gt;
&lt;P&gt;I need to run the calculation for each line, but I don't have the ability to create a guaranteed unique identify. I don't see a way to add a Row number, again, because I don't have a way to create a guaranteed unique identify for each row.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;Parts:
Load * Inline
[
Part, Factor
ABC, 400
DEF, 400
GHI, 400
];

Left Join (Parts)
Load * Inline
[
Part, Lot, Price, Adder
ABC, 123, 1.45, 2022
ABC, 987, 0.56, 2020
DEF, 456, 0.02, 2022
];

Left Join (Parts)
Load
Part, Lot,
If(IsNull(Price), Factor, Price + Adder) as Result
Resident Parts;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 15:25:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-a-unique-identifier-with-nulls-in-the-table/m-p/2064921#M87346</guid>
      <dc:creator>smarties</dc:creator>
      <dc:date>2023-04-26T15:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Add a unique identifier with nulls in the table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-a-unique-identifier-with-nulls-in-the-table/m-p/2064932#M87348</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/179688"&gt;@smarties&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a rule you don't need to join in the load script, rather just let things associate in the data model and then do your calculations in the front end.&lt;/P&gt;
&lt;P&gt;Try calling the first load Factor, then loading the second bit as Parts - without the left join and don't do the final resident load.&lt;/P&gt;
&lt;P&gt;If you then create a table in the front end with a dimensions of Part and Lot and a calculation using Factor, Price and Adder this should work.&lt;/P&gt;
&lt;P&gt;To resolve issues with nulls you may need to use the&amp;nbsp;&lt;STRONG&gt;alt&lt;/STRONG&gt; function, i.e.&amp;nbsp;&lt;STRONG&gt;+ Alt(Factor,0)&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.quickintelligence.co.uk/blog/" target="_blank"&gt;https://www.quickintelligence.co.uk/blog/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 15:41:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-a-unique-identifier-with-nulls-in-the-table/m-p/2064932#M87348</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2023-04-26T15:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add a unique identifier with nulls in the table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-a-unique-identifier-with-nulls-in-the-table/m-p/2064940#M87350</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6748"&gt;@stevedark&lt;/a&gt;. I have a solution now following your direction. Appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 16:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-a-unique-identifier-with-nulls-in-the-table/m-p/2064940#M87350</guid>
      <dc:creator>smarties</dc:creator>
      <dc:date>2023-04-26T16:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Add a unique identifier with nulls in the table</title>
      <link>https://community.qlik.com/t5/App-Development/Add-a-unique-identifier-with-nulls-in-the-table/m-p/2065002#M87358</link>
      <description>&lt;P&gt;That's good to know. Thanks for updating and letting me know.&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 20:42:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Add-a-unique-identifier-with-nulls-in-the-table/m-p/2065002#M87358</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2023-04-26T20:42:00Z</dc:date>
    </item>
  </channel>
</rss>

