<?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: Data model issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480339#M179506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The link between agent and calendar is confusing. The agent table looks like a set of employment records (this person, on this day). If that is correct, then the link to the calendar should be on a date value not the agent value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you explain the purpose of both the tables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Sep 2013 16:01:25 GMT</pubDate>
    <dc:creator>DavidFoster1</dc:creator>
    <dc:date>2013-09-04T16:01:25Z</dc:date>
    <item>
      <title>Data model issue</title>
      <link>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480336#M179503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some help for the conception of my data model, I'm a bit lost. I just took over a project, and I have to finalize it. &lt;/P&gt;&lt;P&gt;But the conception is not goot enough to make the right things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here's the deal : &lt;/P&gt;&lt;P&gt;&lt;IMG alt="export2.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/46188_export2.png" style="width: 620px; height: 412px;" /&gt;&lt;/P&gt;&lt;P&gt;The important tables are Agent and Calendrier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to calculate the percantage of absenteeism, by choosing between several years, and build an histogram with that.&lt;/P&gt;&lt;P&gt;So I have to count the number of days missed by all the employees at a year Y (or Y and Y+1 to see how it changed) and divide it by the number of employees the same year(s)&lt;/P&gt;&lt;P&gt;The table agent is build this way :&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;IDF_AGENT&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;num_mois&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;num_annee&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;12&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;15&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the Agent #12 was employed in january and february 2013, and the #15 only on May 2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the Calendrier &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;IDF_AGENT&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;NUM_JOUR&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;NUM_MOIS&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;NUM_ANNEE&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;15&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The #12 missed 3 days in february and #15 only one day in may.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I want to make an histogram, there is an issue,because I can't link num_annee.agent and NUM_ANNEE.calendrier.&lt;/P&gt;&lt;P&gt;So I don't find a solution to solve it. Can I create a 3rd table which combine all the years ? But I don't know how to make it.&lt;/P&gt;&lt;P&gt;Rebuild a date model ? I don't see how to build it to make it better. Can someone help me ? I attached my qvw. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx a lot. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 13:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480336#M179503</guid>
      <dc:creator />
      <dc:date>2013-09-04T13:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data model issue</title>
      <link>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480337#M179504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW, the histogram is in the Synthèse tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 13:18:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480337#M179504</guid>
      <dc:creator />
      <dc:date>2013-09-04T13:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Data model issue</title>
      <link>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480338#M179505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Salut,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Je suppose au vu de ton appli que tu parle français &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Alors une solution à ton problème, si je l'ai bien compris, pourrait être de rajouter le nombre de jour d'absence par IDF_AGENT dans ta table agent. Il faut pour cela créer une table temporaire qui va compter le nombre de jour d'absence par IDF_AGENT, par mois et par année et ensuite joindre cette table à la table agent.&lt;/P&gt;&lt;P&gt;En voici le code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDF_AGENT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUM_ANNEE as num_annee,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUM_MOIS as num_mois,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(NUM_JOUR) as NbJourAbsence&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; calendrier&lt;/P&gt;&lt;P&gt;GROUP BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDF_AGENT,NUM_ANNEE,NUM_MOIS&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JOIN&lt;/P&gt;&lt;P&gt;(agent)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDF_AGENT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num_annee,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num_mois,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NbJourAbsence&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmp&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE tmp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maintenant que tu as le nombre de jour d'absence de chaque agent par mois et par année, tu peux faire ton graphe avec en dimension num_annee et/ou num_mois.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 15:53:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480338#M179505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T15:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Data model issue</title>
      <link>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480339#M179506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The link between agent and calendar is confusing. The agent table looks like a set of employment records (this person, on this day). If that is correct, then the link to the calendar should be on a date value not the agent value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you explain the purpose of both the tables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 16:01:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480339#M179506</guid>
      <dc:creator>DavidFoster1</dc:creator>
      <dc:date>2013-09-04T16:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Data model issue</title>
      <link>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480340#M179507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for trying to help me David !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Et merci beaucoup sg_bobbyraj, c'était quand même assez simple, j'y avais pensé, mais je pensais qu'il y aurait une difficulté. M'enfin, tu me retires une grosse épine du pied !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 07:40:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-model-issue/m-p/480340#M179507</guid>
      <dc:creator />
      <dc:date>2013-09-05T07:40:35Z</dc:date>
    </item>
  </channel>
</rss>

