<?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 Scripting assistance - Join in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662750#M730258</link>
    <description>&lt;P&gt;Please find attached my very simple model - its not my real model, just a simplified version to get my problem across.&lt;/P&gt;&lt;P&gt;The Two tables joins on Incident_no.&lt;/P&gt;&lt;P&gt;What I want to do - if there is more than one record, per Incident_no, then I only want to return the individual amount, not the sum of them....for example...&lt;/P&gt;&lt;P&gt;Incident 1, after join, returns 30..i only want '10'...&lt;/P&gt;&lt;P&gt;I can amend the Expression, like on my chart, to divide by Count(Incident_rk). That works fine if Incident_rk is a Dimension in the chart. BUT that is not always the case.&lt;/P&gt;&lt;P&gt;how can I, in the code, or front end - doesn't matter - get the same effect?&amp;nbsp;&lt;/P&gt;&lt;P&gt;My reason for this issue is that in a model, I need to join 2 tables with different levels of granularity, and this would be the quickest way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 01:35:31 GMT</pubDate>
    <dc:creator>QFanatic</dc:creator>
    <dc:date>2024-11-16T01:35:31Z</dc:date>
    <item>
      <title>Scripting assistance - Join</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662750#M730258</link>
      <description>&lt;P&gt;Please find attached my very simple model - its not my real model, just a simplified version to get my problem across.&lt;/P&gt;&lt;P&gt;The Two tables joins on Incident_no.&lt;/P&gt;&lt;P&gt;What I want to do - if there is more than one record, per Incident_no, then I only want to return the individual amount, not the sum of them....for example...&lt;/P&gt;&lt;P&gt;Incident 1, after join, returns 30..i only want '10'...&lt;/P&gt;&lt;P&gt;I can amend the Expression, like on my chart, to divide by Count(Incident_rk). That works fine if Incident_rk is a Dimension in the chart. BUT that is not always the case.&lt;/P&gt;&lt;P&gt;how can I, in the code, or front end - doesn't matter - get the same effect?&amp;nbsp;&lt;/P&gt;&lt;P&gt;My reason for this issue is that in a model, I need to join 2 tables with different levels of granularity, and this would be the quickest way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662750#M730258</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2024-11-16T01:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting assistance - Join</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662754#M730259</link>
      <description>&lt;P&gt;in frontend you can use this expression:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FirstSortedValue(distinct Amount, Incident_no)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 06 Jan 2020 06:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662754#M730259</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2020-01-06T06:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting assistance - Join</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662769#M730260</link>
      <description>&lt;P&gt;Thank you for your reply&lt;/P&gt;&lt;P&gt;How would I do this in script? I think doing it there might be the best, if I need to repeat the value on the front end&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 07:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662769#M730260</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2020-01-06T07:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting assistance - Join</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662773#M730261</link>
      <description>&lt;P&gt;sure that sounds good.&lt;/P&gt;&lt;P&gt;this should do it&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Incident_info:
Load Incident_no,
     FirstSortedValue(Distinct Amount, Incident_no) as Amount
Group by Incident_no
;
LOAD * INLINE [
    Incident_no, Amount 
    1, 10 
    1, 10 
    1, 10 
    2, 20 
    3, 30 
    3, 30 
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 08:07:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662773#M730261</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2020-01-06T08:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting assistance - Join</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662779#M730262</link>
      <description>&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 08:22:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662779#M730262</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2020-01-06T08:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting assistance - Join</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662877#M730263</link>
      <description>&lt;P&gt;You can load only distinct values from the table that contains duplicates, i.e.,:&lt;/P&gt;&lt;P&gt;Incident_info:&lt;BR /&gt;LOAD DISTINCT* INLINE [&lt;BR /&gt;Incident_no, Amount&lt;BR /&gt;1, 10&lt;BR /&gt;1, 10&lt;BR /&gt;1, 10&lt;BR /&gt;2, 20&lt;BR /&gt;3, 30&lt;BR /&gt;3, 30&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 12:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-assistance-Join/m-p/1662877#M730263</guid>
      <dc:creator>aivislau</dc:creator>
      <dc:date>2020-01-06T12:18:22Z</dc:date>
    </item>
  </channel>
</rss>

