<?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: Problem with dates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814812#M66641</link>
    <description>&lt;P&gt;HI Dani,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can create a key field with Date also in both global &amp;amp; budget.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;idMarca &amp;amp;'_'&amp;amp; [pv]&amp;amp;'_'&amp;amp;datefield as [% Key marca_pv],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;create the link table concept for your data model.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 08:52:49 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2021-06-14T08:52:49Z</dc:date>
    <item>
      <title>Problem with dates</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1813604#M66446</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;I have a problem with my date fields in my app.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cattura.PNG" style="width: 827px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56491i2C4BCCF5A8F872D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura.PNG" alt="Cattura.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this is the structure of my app, basically I have a date range in table "Budget" from "datainizio" to "datafine".&lt;/P&gt;&lt;P&gt;I have to display in my app a table which shows a value from table "Globale" and a value from table "Budget" in the same period but I don't know ho to link the date fields in "Budget" table to my Master Calendar.&lt;BR /&gt;If I use month(datainizio) I can see "budget"field (from table Budget) in each month but I don't see "molt"field (from table Globale). If I use month(data01) (which is "Mese" in my master calendar) I can see "molt"field in each month but I don't see "budget"field.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cattura2.PNG" style="width: 939px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56492iF4E4580902309275/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura2.PNG" alt="Cattura2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cattura3.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56493i8F420DE89CB6D592/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura3.PNG" alt="Cattura3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't know if I am clear with my deal, could anyone help me?&lt;/P&gt;&lt;P&gt;This is my script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//** GLOBALE TABLE&lt;/P&gt;&lt;P&gt;Globale:&lt;BR /&gt;LOAD&lt;BR /&gt;idMarca &amp;amp;'_'&amp;amp; [pv] as [% Key marca_pv],&lt;BR /&gt;scontrino,&lt;BR /&gt;idMarca,&lt;BR /&gt;azienda,&lt;BR /&gt;nomeazienda,&lt;BR /&gt;tipodoc,&lt;BR /&gt;destipodoc,&lt;BR /&gt;numerodocumento,&lt;BR /&gt;data01,&lt;BR /&gt;[pv],&lt;BR /&gt;puntovendita,&lt;BR /&gt;codmailing,&lt;BR /&gt;ragsoc,&lt;BR /&gt;tipologiaCliente,&lt;BR /&gt;agente,&lt;BR /&gt;tipoAgente,&lt;BR /&gt;desagente,&lt;BR /&gt;segno,&lt;BR /&gt;molt,&lt;BR /&gt;clifor,&lt;BR /&gt;preventivo,&lt;BR /&gt;ordinefornitore,&lt;BR /&gt;tipostat,&lt;BR /&gt;idarticolo,&lt;BR /&gt;descrizione,&lt;BR /&gt;codesterno,&lt;BR /&gt;marca,&lt;BR /&gt;gruppo,&lt;BR /&gt;linea,&lt;BR /&gt;reparto,&lt;BR /&gt;codreparto,&lt;BR /&gt;famiglia,&lt;BR /&gt;codfamiglia,&lt;BR /&gt;idmagprovenienza,&lt;BR /&gt;idmagazzino,&lt;BR /&gt;magprovenienza,&lt;BR /&gt;magazzino,&lt;BR /&gt;qta,&lt;BR /&gt;prezzo,&lt;BR /&gt;sconto1,&lt;BR /&gt;sconto2,&lt;BR /&gt;sconto3,&lt;BR /&gt;importo,&lt;BR /&gt;costo,&lt;BR /&gt;provvigioni,&lt;BR /&gt;costoAnagrafico,&lt;BR /&gt;prezzolistino1,&lt;BR /&gt;prezzolistino2,&lt;BR /&gt;prezzolistino3,&lt;BR /&gt;prezzolistino4,&lt;BR /&gt;prezzolistino5,&lt;BR /&gt;prezzolistino6&lt;BR /&gt;FROM [lib://letturadati/Globale.qvd]&lt;BR /&gt;(qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//** BUDGET TABLE&lt;/P&gt;&lt;P&gt;Budget:&lt;BR /&gt;LOAD&lt;BR /&gt;Budget.idMarca &amp;amp;'_'&amp;amp; Budget.pv as [% Key marca_pv],&lt;BR /&gt;Budget.idMarca,&lt;BR /&gt;ID,&lt;BR /&gt;Budget.tipo,&lt;BR /&gt;Budget.tipostat,&lt;BR /&gt;Budget.descrizione,&lt;BR /&gt;datainizio,&lt;BR /&gt;datafine,&lt;BR /&gt;Budget.pv,&lt;BR /&gt;idAgente,&lt;BR /&gt;Budget.codmailing,&lt;BR /&gt;budget,&lt;BR /&gt;peso,&lt;BR /&gt;budget*peso as budgetcalc&lt;BR /&gt;FROM [lib://letturadati/BudgetMarca.qvd]&lt;BR /&gt;(qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//** CALENDAR&lt;/P&gt;&lt;P&gt;QuartersMap:&lt;BR /&gt;MAPPING LOAD&lt;BR /&gt;rowno() as Mese,&lt;BR /&gt;'T' &amp;amp; Ceil (rowno()/3) as Trimestre&lt;BR /&gt;AUTOGENERATE (12);&lt;/P&gt;&lt;P&gt;Temp:&lt;BR /&gt;Load&lt;BR /&gt;'01/01/2021' as minDate,&lt;BR /&gt;max(data01) as maxDate&lt;BR /&gt;Resident Globale;&lt;/P&gt;&lt;P&gt;Let varMinDate = Num(Peek('minDate', 0, 'Temp'));&lt;BR /&gt;Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));&lt;BR /&gt;DROP Table Temp;&lt;/P&gt;&lt;P&gt;TempCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt;$(varMinDate) + Iterno()-1 As Num,&lt;BR /&gt;Date($(varMinDate) + IterNo() - 1) as TempDate&lt;BR /&gt;AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);&lt;/P&gt;&lt;P&gt;MasterCalendar:&lt;BR /&gt;Load&lt;BR /&gt;TempDate AS data01,&lt;BR /&gt;week(TempDate) As Settimana,&lt;BR /&gt;Year(TempDate) As Anno,&lt;BR /&gt;Month(TempDate) As Mese,&lt;BR /&gt;Day(TempDate) As Giorno,&lt;BR /&gt;YeartoDate(TempDate)*-1 as CurYTDFlag,&lt;BR /&gt;YeartoDate(TempDate,-1)*-1 as LastYTDFlag,&lt;BR /&gt;inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,&lt;BR /&gt;date(monthstart(TempDate), 'MMM-YYYY') as MeseAnno,&lt;BR /&gt;ApplyMap('QuartersMap', month(TempDate), Null()) as Trimestre,&lt;BR /&gt;Week(weekstart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as WeekYear,&lt;BR /&gt;WeekDay(TempDate) as WeekDay&lt;BR /&gt;Resident TempCalendar&lt;BR /&gt;Order By TempDate ASC;&lt;BR /&gt;Drop Table TempCalendar;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank to all!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 11:10:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1813604#M66446</guid>
      <dc:creator>danimarc12</dc:creator>
      <dc:date>2021-06-08T11:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814799#M66636</link>
      <description>&lt;P&gt;I have seen something with the using of the Canonical Calendar but I'm not sure it can be the best solution. Did anyone had this kind of issue and found solution?&lt;/P&gt;&lt;P&gt;thank u all!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 08:34:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814799#M66636</guid>
      <dc:creator>danimarc12</dc:creator>
      <dc:date>2021-06-14T08:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814812#M66641</link>
      <description>&lt;P&gt;HI Dani,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can create a key field with Date also in both global &amp;amp; budget.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;idMarca &amp;amp;'_'&amp;amp; [pv]&amp;amp;'_'&amp;amp;datefield as [% Key marca_pv],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;create the link table concept for your data model.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 08:52:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814812#M66641</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2021-06-14T08:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814832#M66643</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;MayilVahanan, thanks for your answer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've concatenated also the datefield but it still not working... I think I have to create a calendar which matches the dates from the fields&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;data01&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;(from&amp;nbsp;&lt;STRONG&gt;Globale&lt;/STRONG&gt; table) and&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;datainizio&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;(from&amp;nbsp;&lt;STRONG&gt;Budget&lt;/STRONG&gt; table).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically I want to display the sales, the budget and the differences.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe I have to edit the Master Calendar?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I really don't understand how to fix it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 09:40:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814832#M66643</guid>
      <dc:creator>danimarc12</dc:creator>
      <dc:date>2021-06-14T09:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814844#M66645</link>
      <description>&lt;P&gt;Hi dani&lt;/P&gt;&lt;P&gt;Can you share the sample data and expected output ?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 10:12:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814844#M66645</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2021-06-14T10:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814845#M66646</link>
      <description>&lt;P&gt;Yes, in attached you can find it!&lt;/P&gt;&lt;P&gt;My expected output is to see the "Venduto" column in the second image with the "Budget" column in the first image. It seems those measures can't recognize the corresponding month. If I use &lt;STRONG&gt;month(data01)&lt;/STRONG&gt; I can see the correct "Venduto", If I use&amp;nbsp;&lt;STRONG&gt;month(datainizio)&lt;/STRONG&gt; I can see the correct "Budget" but I want to see both.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 10:17:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1814845#M66646</guid>
      <dc:creator>danimarc12</dc:creator>
      <dc:date>2021-06-14T10:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1815122#M66679</link>
      <description>&lt;P&gt;Hi Dani,&lt;/P&gt;&lt;P&gt;Can you send the data files to change the data model &amp;amp; verify from our end?&lt;/P&gt;&lt;P&gt;And also, expected output too..&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 08:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1815122#M66679</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2021-06-15T08:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1815124#M66680</link>
      <description>&lt;P&gt;I use a query to take datas from a database. I'm not selecting everything.&lt;/P&gt;&lt;P&gt;This is my query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sub Estrazione&lt;/P&gt;&lt;P&gt;LIB CONNECT TO 'Appserver';&lt;BR /&gt;sql use cm70_gest;&lt;/P&gt;&lt;P&gt;Globale:&lt;BR /&gt;SELECT d.ID as scontrino,&lt;BR /&gt;mar.id as idMarca,&lt;BR /&gt;d.azienda,&lt;BR /&gt;az.ragsoc as nomeazienda,&lt;BR /&gt;d.tipodoc,&lt;BR /&gt;t.descrizione as destipodoc,&lt;BR /&gt;d.numerodocumento,&lt;BR /&gt;d.datadocumento as data01,&lt;BR /&gt;d.pv,&lt;BR /&gt;pv.Descrizione AS puntovendita,&lt;BR /&gt;d.codmailing,&lt;BR /&gt;m.ragsoc,&lt;BR /&gt;ts.descrizione as tipologiaCliente,&lt;BR /&gt;d.agente,&lt;BR /&gt;ag.tipo as tipoAgente,&lt;BR /&gt;ag.nome AS desagente,&lt;BR /&gt;t.segno,&lt;BR /&gt;if(t.segno='+',1,if(t.segno='-',-1,0)) AS molt,&lt;BR /&gt;t.clifor,&lt;BR /&gt;t.preventivo,&lt;BR /&gt;t.ordinefornitore,&lt;BR /&gt;t.tipo AS tipostat,&lt;BR /&gt;dd.idarticolo,&lt;BR /&gt;dd.descrizione,&lt;BR /&gt;mar.codesterno,&lt;BR /&gt;mar.marca,&lt;BR /&gt;mar.gruppo,&lt;BR /&gt;lin.descrizione AS linea,&lt;BR /&gt;r.descrizione AS reparto,&lt;BR /&gt;a.reparto AS codreparto,&lt;BR /&gt;f.descrizione AS famiglia,&lt;BR /&gt;a.famiglia AS codfamiglia,&lt;BR /&gt;d.magazzinoprovenienza AS idmagprovenienza,&lt;BR /&gt;dd.idmagazzino,&lt;BR /&gt;mgp.descrizione AS magprovenienza,&lt;BR /&gt;mg.descrizione AS magazzino,&lt;BR /&gt;dd.qta,&lt;BR /&gt;dd.prezzo,&lt;BR /&gt;dd.sconto1,&lt;BR /&gt;dd.sconto2,&lt;BR /&gt;dd.sconto3,&lt;BR /&gt;dd.importo,&lt;BR /&gt;dd.costorif AS costo,&lt;BR /&gt;dd.provvigioni,&lt;BR /&gt;getCostoNetto(a.costo,a.sc1,a.sc2,a.sc3,a.sc4) AS costoAnagrafico,&lt;BR /&gt;a.prezzolistino1,&lt;BR /&gt;a.prezzolistino2,&lt;BR /&gt;a.prezzolistino3,&lt;BR /&gt;a.prezzolistino4,&lt;BR /&gt;a.prezzolistino5,&lt;BR /&gt;a.prezzolistino6&lt;BR /&gt;FROM mag_documenti_dettagli dd&lt;BR /&gt;INNER JOIN mag_documenti d ON d.id=dd.iddocumento&lt;BR /&gt;LEFT JOIN mag_agenti ag ON d.agente=ag.id&lt;BR /&gt;INNER JOIN mag_tipologiedocumento t ON d.tipodoc=t.codice&lt;BR /&gt;LEFT JOIN mag_articoli a ON dd.idarticolo=a.id&lt;BR /&gt;LEFT JOIN mag_magazzini mg ON dd.idmagazzino=mg.id&lt;BR /&gt;LEFT JOIN mag_magazzini mgp ON d.magazzinoprovenienza=mgp.ID&lt;BR /&gt;LEFT JOIN mag_marche mar ON a.marca=mar.id&lt;BR /&gt;LEFT JOIN mag_puntivendita pv ON d.pv=pv.id&lt;BR /&gt;LEFT JOIN mag_linee lin ON a.linea=lin.id&lt;BR /&gt;LEFT JOIN mag_reparti r ON a.reparto=r.id&lt;BR /&gt;LEFT JOIN mag_famiglie f ON a.famiglia=f.id&lt;BR /&gt;LEFT JOIN cm70_wf.mailing m ON d.codmailing=m.codice&lt;BR /&gt;LEFT JOIN cm70_wf.tipologia_servizi ts ON m.tipologia=ts.codice&lt;BR /&gt;LEFT JOIN cm70_wf.aziende az ON d.azienda=az.id&lt;BR /&gt;WHERE t.tipo IN ('V','VI','F','D','FD');&lt;/P&gt;&lt;P&gt;store Globale into [lib://estrazionedati/Globale.qvd](qvd);&lt;/P&gt;&lt;P&gt;Qualify *;&lt;BR /&gt;Unqualify ID, datainizio, datafine, idAgente, budget, peso;&lt;/P&gt;&lt;P&gt;Budget:&lt;BR /&gt;SELECT ba.idMarca,&lt;BR /&gt;b.ID,&lt;BR /&gt;b.tipo,&lt;BR /&gt;b.tipostat,&lt;BR /&gt;b.descrizione,&lt;BR /&gt;bs.datainizio,&lt;BR /&gt;bs.datafine,&lt;BR /&gt;bn.pv,&lt;BR /&gt;bn.codagente AS idAgente,&lt;BR /&gt;bn.codmailing,&lt;BR /&gt;ba.importo as budget,&lt;BR /&gt;bs.peso/100 as peso&lt;BR /&gt;FROM mag_budget b&lt;BR /&gt;INNER JOIN mag_budget_split bs ON b.ID=bs.idbudget&lt;BR /&gt;INNER JOIN mag_budget_articoli ba ON b.ID=ba.idbudget&lt;BR /&gt;INNER JOIN mag_budget_nominativi bn ON b.ID=bn.idbudget;&lt;/P&gt;&lt;P&gt;Unqualify *;&lt;/P&gt;&lt;P&gt;store Budget into [lib://estrazionedati/BudgetMarca.qvd](qvd);&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then I use the .qvd files.&lt;/P&gt;&lt;P&gt;My expected output is to show in a Pivot Table the "Venduto" of the second image compared to the "Budget" of the first image (look at the post).&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 08:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-dates/m-p/1815124#M66680</guid>
      <dc:creator>danimarc12</dc:creator>
      <dc:date>2021-06-15T08:58:02Z</dc:date>
    </item>
  </channel>
</rss>

