<?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: How I add a constant in a table? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-I-add-a-constant-in-a-table/m-p/1695543#M725612</link>
    <description>&lt;P&gt;Hi, you can do an outer join , which will create a cartesian products between all values in both tables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Outer Join (Sales)
load
Sum(workdays) as workdays_sum
from ...;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option is to load days in a variable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LET vWorkDays = Peek('workdays_sum',0,'workdays');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And use this variable on LOAD:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Load
  sales,
  customer,
  $(vWorkDays) as workdays_sum,
  location
FROM ...;&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;</description>
    <pubDate>Wed, 22 Apr 2020 07:47:14 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2020-04-22T07:47:14Z</dc:date>
    <item>
      <title>How I add a constant in a table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-add-a-constant-in-a-table/m-p/1695514#M725611</link>
      <description>&lt;P&gt;Hi everyone, i'm looking for a solution in this case:&lt;/P&gt;&lt;P&gt;I have this table:&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Sales:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;sales,&lt;/P&gt;&lt;P&gt;customer,&lt;/P&gt;&lt;P&gt;location&lt;/P&gt;&lt;P&gt;FROM ...;&lt;/P&gt;&lt;P&gt;Example:&lt;BR /&gt;[Sales-Customer-Location&lt;/P&gt;&lt;P&gt;100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MIT&lt;/P&gt;&lt;P&gt;200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NY]&lt;/P&gt;&lt;P&gt;Previously I calculate the workdays of the last three months, and i sum this days and save it in a field. I save this result in this table:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;workdays:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sum(workdays) as workdays_sum&lt;/P&gt;&lt;P&gt;from ...;&lt;/P&gt;&lt;P&gt;Example:&lt;BR /&gt;[workdays_sum&lt;/P&gt;&lt;P&gt;&amp;nbsp; 62]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use Concatenate function, the result is this:&lt;/P&gt;&lt;P&gt;[Sales-Customer-Location-workdays_sum&lt;/P&gt;&lt;P&gt;100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MIT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&lt;/P&gt;&lt;P&gt;200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&lt;/P&gt;&lt;P&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 62]&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Who is the best way to have this result:&lt;/P&gt;&lt;P&gt;[Sales-Customer-Location-workdays_sum&lt;/P&gt;&lt;P&gt;100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MIT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 62&lt;/P&gt;&lt;P&gt;200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 62]&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I apretiate all comments and help.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-add-a-constant-in-a-table/m-p/1695514#M725611</guid>
      <dc:creator>seband_fredes</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How I add a constant in a table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-add-a-constant-in-a-table/m-p/1695543#M725612</link>
      <description>&lt;P&gt;Hi, you can do an outer join , which will create a cartesian products between all values in both tables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Outer Join (Sales)
load
Sum(workdays) as workdays_sum
from ...;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option is to load days in a variable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LET vWorkDays = Peek('workdays_sum',0,'workdays');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And use this variable on LOAD:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Load
  sales,
  customer,
  $(vWorkDays) as workdays_sum,
  location
FROM ...;&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;</description>
      <pubDate>Wed, 22 Apr 2020 07:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-add-a-constant-in-a-table/m-p/1695543#M725612</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-04-22T07:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: How I add a constant in a table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-add-a-constant-in-a-table/m-p/1698418#M725613</link>
      <description>&lt;P&gt;Gracias Ruben, muy util tu ayuda.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Saludos&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 02:29:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-add-a-constant-in-a-table/m-p/1698418#M725613</guid>
      <dc:creator>seband_fredes</dc:creator>
      <dc:date>2020-05-02T02:29:54Z</dc:date>
    </item>
  </channel>
</rss>

