<?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 Join Master Calendar to existing table and create a distinct items for every date entry in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Join-Master-Calendar-to-existing-table-and-create-a-distinct/m-p/2074028#M1223749</link>
    <description>&lt;DIV&gt;LOAD cnes as CNES,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ANO_CMPT as Ano,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;MES_CMPT as Mês,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ANO_CMPT&amp;amp;' / '&amp;amp;MES_CMPT as Data,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;PROC_REA as PR,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;QT_PROC as QTS,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;estab_nome as Nome,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;estab_uf as UF,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;estab_cidade as Cidade,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Month(Date#(MES_CMPT,'MM')) as Meses&lt;/DIV&gt;
&lt;DIV&gt;FROM&lt;/DIV&gt;
&lt;DIV&gt;[E:\ciha.qvd]&lt;/DIV&gt;
&lt;DIV&gt;(qvd);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LET vMin = Num(MakeDate(2015));&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LET vMax = Num(MakeDate(2023));&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Calendar:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LOAD&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Month,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Month(Month),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Year(Month) as Year;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LOAD&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Date(MonthStart($(vMin),IterNo()-1),'YYYY / MM') as Month&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;AutoGenerate 1&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;While MonthStart($(vMin),IterNo()-2) &amp;lt;= $(vMax);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This table lists CNES, that's an ID for a hospital, it's name (Nome), it's city (Cidade), it's State (UF), various procedures each hospital can have done in a single month (PR), the quantities of each procedure performed (QTS) and the respective dates (Data) reported by each hospital&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;the only ones truly meaning and that i want to use are the CNES, PR, QTS and DATA:&lt;BR /&gt;the sheet has a span of 8 years and 2 months, starting from jan 2015 to feb 2023, i have created a master calendar that encompasses and gives me all the distinct 98 months the original table contains, but not all hospital contain entries for every month, i want to join the master calendar to the table so that every CNES has at least 98 rows, at least one for each month that the table covers&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MrDolph_0-1684780312662.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/107728iA1C6B39B4E6402D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MrDolph_0-1684780312662.png" alt="MrDolph_0-1684780312662.png" /&gt;&lt;/span&gt;
&lt;P&gt;the left column of lists are from the original table, the right column was all made by the master calendar, i want to join them and generate the missing entries for each and every CNES&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 22 May 2023 18:32:58 GMT</pubDate>
    <dc:creator>MrDolph</dc:creator>
    <dc:date>2023-05-22T18:32:58Z</dc:date>
    <item>
      <title>Join Master Calendar to existing table and create a distinct items for every date entry</title>
      <link>https://community.qlik.com/t5/QlikView/Join-Master-Calendar-to-existing-table-and-create-a-distinct/m-p/2074028#M1223749</link>
      <description>&lt;DIV&gt;LOAD cnes as CNES,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ANO_CMPT as Ano,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;MES_CMPT as Mês,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ANO_CMPT&amp;amp;' / '&amp;amp;MES_CMPT as Data,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;PROC_REA as PR,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;QT_PROC as QTS,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;estab_nome as Nome,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;estab_uf as UF,&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;estab_cidade as Cidade,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Month(Date#(MES_CMPT,'MM')) as Meses&lt;/DIV&gt;
&lt;DIV&gt;FROM&lt;/DIV&gt;
&lt;DIV&gt;[E:\ciha.qvd]&lt;/DIV&gt;
&lt;DIV&gt;(qvd);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LET vMin = Num(MakeDate(2015));&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LET vMax = Num(MakeDate(2023));&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Calendar:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LOAD&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Month,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Month(Month),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Year(Month) as Year;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LOAD&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Date(MonthStart($(vMin),IterNo()-1),'YYYY / MM') as Month&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;AutoGenerate 1&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;While MonthStart($(vMin),IterNo()-2) &amp;lt;= $(vMax);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This table lists CNES, that's an ID for a hospital, it's name (Nome), it's city (Cidade), it's State (UF), various procedures each hospital can have done in a single month (PR), the quantities of each procedure performed (QTS) and the respective dates (Data) reported by each hospital&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;the only ones truly meaning and that i want to use are the CNES, PR, QTS and DATA:&lt;BR /&gt;the sheet has a span of 8 years and 2 months, starting from jan 2015 to feb 2023, i have created a master calendar that encompasses and gives me all the distinct 98 months the original table contains, but not all hospital contain entries for every month, i want to join the master calendar to the table so that every CNES has at least 98 rows, at least one for each month that the table covers&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MrDolph_0-1684780312662.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/107728iA1C6B39B4E6402D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MrDolph_0-1684780312662.png" alt="MrDolph_0-1684780312662.png" /&gt;&lt;/span&gt;
&lt;P&gt;the left column of lists are from the original table, the right column was all made by the master calendar, i want to join them and generate the missing entries for each and every CNES&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 22 May 2023 18:32:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-Master-Calendar-to-existing-table-and-create-a-distinct/m-p/2074028#M1223749</guid>
      <dc:creator>MrDolph</dc:creator>
      <dc:date>2023-05-22T18:32:58Z</dc:date>
    </item>
  </channel>
</rss>

