<?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 How do a WHERE condition in a left join in Script Qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-a-WHERE-condition-in-a-left-join-in-Script-Qlikview/m-p/233340#M84877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want use a left join in a Script between to tables to have a classement of my results:&lt;/P&gt;&lt;P&gt;I explain I have a table of my result : STATS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Load&lt;BR /&gt;&lt;BR /&gt; [Business name],&lt;BR /&gt; ChannelId,&lt;BR /&gt; [Ending date] as "Date",&lt;BR /&gt; num(WEEK([Ending date])) as "WeekendDate",&lt;BR /&gt; num(YEAR([Ending date])) as "YearDate",&lt;BR /&gt; KEY_USER,&lt;BR /&gt; KEY_SITE,&lt;BR /&gt; sport_trad as "sport",&lt;BR /&gt; [Amount (EUR)] as "Result Amount (EUR)"&lt;BR /&gt;FROM SPORT.QVD&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And a table with my groups of result with a Min and a Max of result Amount of the group.&lt;/P&gt;&lt;P&gt;Decile 1 Min 0.00 Euros Max 1.00 Euros&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;LOAD&lt;BR /&gt; [Decile Year],&lt;BR /&gt; [Decile Week],&lt;BR /&gt; [Decile Date] as Date,&lt;BR /&gt; Sport as sport&lt;BR /&gt; Decile,&lt;BR /&gt; MinDecile,&lt;BR /&gt; MaxDecile&lt;BR /&gt; FROM Decile (qvd);&lt;BR /&gt;&lt;/PRE&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I want per week a count of number of users in each Decile (group) and the average of Amount.&lt;/P&gt;&lt;P&gt;My problem it's I don'tg know do a left join per week to have this table because we don't have any link between Decile and STATS only amount and the number of the week.&lt;/P&gt;&lt;P&gt;I have try with this but it's not works &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;LEFT JOIN (STATS)&lt;BR /&gt;LOAD&lt;BR /&gt;[Decile Year] as WeekendDate,&lt;BR /&gt;[Decile Week] as YearDate,&lt;BR /&gt;Sport assport,&lt;BR /&gt;Decile&lt;BR /&gt;RESIDENT DECILE&lt;BR /&gt;WHERE MinDecile &amp;lt;= " result Amount (EUR)" AND MaxDecile &amp;gt;= " result Amount (EUR)";&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;OR in the dashboard :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt; count({$&amp;lt; MaxDecile={"&amp;gt;=$(=sum([Result Amount (EUR)]))"},MinDecile={"&amp;lt;=$(=sum([Result Amount (EUR)]))"}&amp;gt;}KEY_USER)&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Can you help me please??&lt;/P&gt;&lt;P&gt;Thanks a lot. &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Bruno&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Oct 2010 10:28:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-10-11T10:28:44Z</dc:date>
    <item>
      <title>How do a WHERE condition in a left join in Script Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-a-WHERE-condition-in-a-left-join-in-Script-Qlikview/m-p/233340#M84877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want use a left join in a Script between to tables to have a classement of my results:&lt;/P&gt;&lt;P&gt;I explain I have a table of my result : STATS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Load&lt;BR /&gt;&lt;BR /&gt; [Business name],&lt;BR /&gt; ChannelId,&lt;BR /&gt; [Ending date] as "Date",&lt;BR /&gt; num(WEEK([Ending date])) as "WeekendDate",&lt;BR /&gt; num(YEAR([Ending date])) as "YearDate",&lt;BR /&gt; KEY_USER,&lt;BR /&gt; KEY_SITE,&lt;BR /&gt; sport_trad as "sport",&lt;BR /&gt; [Amount (EUR)] as "Result Amount (EUR)"&lt;BR /&gt;FROM SPORT.QVD&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And a table with my groups of result with a Min and a Max of result Amount of the group.&lt;/P&gt;&lt;P&gt;Decile 1 Min 0.00 Euros Max 1.00 Euros&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;LOAD&lt;BR /&gt; [Decile Year],&lt;BR /&gt; [Decile Week],&lt;BR /&gt; [Decile Date] as Date,&lt;BR /&gt; Sport as sport&lt;BR /&gt; Decile,&lt;BR /&gt; MinDecile,&lt;BR /&gt; MaxDecile&lt;BR /&gt; FROM Decile (qvd);&lt;BR /&gt;&lt;/PRE&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I want per week a count of number of users in each Decile (group) and the average of Amount.&lt;/P&gt;&lt;P&gt;My problem it's I don'tg know do a left join per week to have this table because we don't have any link between Decile and STATS only amount and the number of the week.&lt;/P&gt;&lt;P&gt;I have try with this but it's not works &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;LEFT JOIN (STATS)&lt;BR /&gt;LOAD&lt;BR /&gt;[Decile Year] as WeekendDate,&lt;BR /&gt;[Decile Week] as YearDate,&lt;BR /&gt;Sport assport,&lt;BR /&gt;Decile&lt;BR /&gt;RESIDENT DECILE&lt;BR /&gt;WHERE MinDecile &amp;lt;= " result Amount (EUR)" AND MaxDecile &amp;gt;= " result Amount (EUR)";&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;OR in the dashboard :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt; count({$&amp;lt; MaxDecile={"&amp;gt;=$(=sum([Result Amount (EUR)]))"},MinDecile={"&amp;lt;=$(=sum([Result Amount (EUR)]))"}&amp;gt;}KEY_USER)&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Can you help me please??&lt;/P&gt;&lt;P&gt;Thanks a lot. &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Bruno&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 10:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-a-WHERE-condition-in-a-left-join-in-Script-Qlikview/m-p/233340#M84877</guid>
      <dc:creator />
      <dc:date>2010-10-11T10:28:44Z</dc:date>
    </item>
  </channel>
</rss>

