<?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: Combining Expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Combining-Expressions/m-p/603088#M681704</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;cheers Chris, thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i do use a master calendar which is dissociated from the set allowing dynamic selections. The main issue is NULLS. Its almost like scripting a left outer join in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i cant count from two different tables with just one expression due to the start/end dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i never, ever want to touch a SAP schema again. Ever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2014 12:34:28 GMT</pubDate>
    <dc:creator>wonkymeister</dc:creator>
    <dc:date>2014-04-04T12:34:28Z</dc:date>
    <item>
      <title>Combining Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Expressions/m-p/603086#M681702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy Friday! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an employee data model that is made up of lots of fact tables. There are 2 main fact tables, which every employee will always exist in, and then many other tables that hang off them where employees may or may not have a record. Each table has a begin and end date field for each record, and a record is current where the end date is set to ‘01/01/9999’.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My base set analysis in the expression is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&lt;BR /&gt; &amp;lt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Table_1_BeginDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;lt;=$(vTodayDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}, (this is 1 of the 2 main tables)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Table_1_EndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp; = {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;gt;$( vTodayDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Table_2_BeginDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;lt;=$( vTodayDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}, (this is 2 of the 2 main tables)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Table_2_EndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp; = {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;gt;$( vTodayDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}&lt;BR /&gt; &amp;gt;&lt;BR /&gt; }&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;EmployeeID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will return the true employee headcount when used on either of the 2 main tables. The problem I have is when I need to get the headcount from another table in the model. I have to introduce the start date and end date of that particular table to the expression which changes the headcount total. I.E. i may not get the same headcount as all the employees from the two main tables may not exist in another table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this is fine for standalone objects on the dashboard (dimensions from one table only). But if I want to have many dimensions from many tables in one object the headcount is incorrect. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I include the BeginDate and EndDate in the expression from every table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To put it simpler, how can I ensure I always bring back the true headcount from the 2 main tables (ie count the nulls) no matter what table I count from?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;&lt;LI&gt;Sorry, I hope this makes sense. It’s a big SAP schema, and its driving me mad J&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 12:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Expressions/m-p/603086#M681702</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2014-04-04T12:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Expressions/m-p/603087#M681703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm just giving you a clue because it seems difficult to answer basically to a complex model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you should create a MaseterCalendar table which will link with other tables in your model thru&lt;/P&gt;&lt;P&gt;"Date &amp;amp; &amp;lt;KeyField&amp;gt;"&amp;nbsp; as a key&lt;/P&gt;&lt;P&gt;you then lighten your set analysis to date from calendar table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 12:27:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Expressions/m-p/603087#M681703</guid>
      <dc:creator />
      <dc:date>2014-04-04T12:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Expressions/m-p/603088#M681704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;cheers Chris, thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i do use a master calendar which is dissociated from the set allowing dynamic selections. The main issue is NULLS. Its almost like scripting a left outer join in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i cant count from two different tables with just one expression due to the start/end dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i never, ever want to touch a SAP schema again. Ever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 12:34:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Expressions/m-p/603088#M681704</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2014-04-04T12:34:28Z</dc:date>
    </item>
  </channel>
</rss>

