<?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: Calculate Expression in straight table with 3 different calender fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-Expression-in-straight-table-with-3-different-calender/m-p/792473#M1025814</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The blue should &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;always&lt;/STRONG&gt; be the current selection and is "Fecha de Venta".&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The yellow is "Fecha Anterior Actual". This column should....let say &lt;EM style="font-weight: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;search for&lt;/STRONG&gt;&lt;/EM&gt; "Fecha de Venta" inside "DetalleVentas" table and use the "Ventas del Dia".&lt;/P&gt;





&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If blue is the current selection then the table DetalleVentas is filtered on that value. If you want an additional filter on Fecha Anterior Actual then DetalleVentas will be filtered on Fecha de Venta and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Fecha Anterior Actual. So going by your screenshot only the records that meet the condition (&lt;EM style="font-size: 13.3333330154419px;"&gt;Fecha de Venta = 12/02/2015&amp;nbsp; AND &lt;/EM&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;Fecha Anterior Actual = &lt;/EM&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;12/02/2014) &lt;/EM&gt;will remain&lt;EM&gt;. &lt;/EM&gt;If you then also want to filter on &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Fecha Anterior Siguiente then the only the records remain that meet the condition &lt;SPAN style="font-size: 13.3333330154419px;"&gt;(&lt;/SPAN&gt;&lt;EM style="font-size: 13.3333330154419px;"&gt;Fecha de Venta = 12/02/2014&amp;nbsp; AND &lt;/EM&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;Fecha Anterior Actual = &lt;/EM&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;12/02/2015 AND Fecha Anterior Siguiente = 13/02/2014). &lt;/EM&gt;It's possible that no record exists in Calendrio with these values in these fields. In that case there are no associated records in DetalleVentas to calculate a result from.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Feb 2015 12:21:31 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2015-02-26T12:21:31Z</dc:date>
    <item>
      <title>Calculate Expression in straight table with 3 different calender fields</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Expression-in-straight-table-with-3-different-calender/m-p/792472#M1025813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have 3 calender fields. 2 of them from table "Calendario" and 1 from "DetalleVentas". (see image below) &lt;IMG alt="diagram1.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/79265_diagram1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see &lt;STRONG&gt;primary key&lt;/STRONG&gt; is "Fecha de Venta" and it's a Date type.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;"Ventas del Dia"&lt;/SPAN&gt; is in spanish so it's like saying "&lt;EM&gt;Sales per Day&lt;/EM&gt;" in english and it is a Number type.&lt;/P&gt;&lt;P&gt;In design I have 3 calenders.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="calendar.PNG" class="jive-image image-2" height="176" src="https://community.qlik.com/legacyfs/online/79266_calendar.PNG" style="height: 176px; width: 111.115207373272px; float: left;" width="111" /&gt;The blue should &lt;STRONG&gt;always&lt;/STRONG&gt; be the current selection and is "Fecha de Venta".&lt;/P&gt;&lt;P&gt;The yellow is "Fecha Anterior Actual". This column should....let say &lt;EM&gt;&lt;STRONG&gt;search for&lt;/STRONG&gt;&lt;/EM&gt; "Fecha de Venta" inside "DetalleVentas" table and use the "Ventas del Dia". So when I use my expression, I can show all sales per day of "Fecha Anterior Actual" and not the selected "Fecha de Venta".&lt;/P&gt;&lt;P&gt;The orange is "Fecha Anterior Siguiente". Same concept... Need to search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The straight table should show the following columns using "Ventas del Dia" that is a number type:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="calendar columns.PNG" class="jive-image image-3" src="/legacyfs/online/79267_calendar columns.PNG" style="height: 38px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;I can actually show as a label...but I' cant use "Ventas del Dia" in the column as numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your help! Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/cool.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 20:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Expression-in-straight-table-with-3-different-calender/m-p/792472#M1025813</guid>
      <dc:creator />
      <dc:date>2015-02-25T20:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Expression in straight table with 3 different calender fields</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Expression-in-straight-table-with-3-different-calender/m-p/792473#M1025814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The blue should &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;always&lt;/STRONG&gt; be the current selection and is "Fecha de Venta".&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The yellow is "Fecha Anterior Actual". This column should....let say &lt;EM style="font-weight: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;search for&lt;/STRONG&gt;&lt;/EM&gt; "Fecha de Venta" inside "DetalleVentas" table and use the "Ventas del Dia".&lt;/P&gt;





&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If blue is the current selection then the table DetalleVentas is filtered on that value. If you want an additional filter on Fecha Anterior Actual then DetalleVentas will be filtered on Fecha de Venta and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Fecha Anterior Actual. So going by your screenshot only the records that meet the condition (&lt;EM style="font-size: 13.3333330154419px;"&gt;Fecha de Venta = 12/02/2015&amp;nbsp; AND &lt;/EM&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;Fecha Anterior Actual = &lt;/EM&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;12/02/2014) &lt;/EM&gt;will remain&lt;EM&gt;. &lt;/EM&gt;If you then also want to filter on &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Fecha Anterior Siguiente then the only the records remain that meet the condition &lt;SPAN style="font-size: 13.3333330154419px;"&gt;(&lt;/SPAN&gt;&lt;EM style="font-size: 13.3333330154419px;"&gt;Fecha de Venta = 12/02/2014&amp;nbsp; AND &lt;/EM&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;Fecha Anterior Actual = &lt;/EM&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;12/02/2015 AND Fecha Anterior Siguiente = 13/02/2014). &lt;/EM&gt;It's possible that no record exists in Calendrio with these values in these fields. In that case there are no associated records in DetalleVentas to calculate a result from.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 12:21:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Expression-in-straight-table-with-3-different-calender/m-p/792473#M1025814</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-02-26T12:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Expression in straight table with 3 different calender fields</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Expression-in-straight-table-with-3-different-calender/m-p/792474#M1025815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola.&lt;/P&gt;&lt;P&gt;no me queda muy claro tu planteamiento pero te doy un par de pistas de lo que he entendido a ver si te vale.&lt;/P&gt;&lt;P&gt;Yo me creo casi siempre que trabajo con fechas una tabla de calendario, completa, de 1-1-año a 31-12-año de los años que quiera o necesito y esta tabla esta vinculada con la tabla de hechos que corresponda. En tu caso, la tabla de ventas.&lt;/P&gt;&lt;P&gt;Desde ese momento, tu puedes seleccionar cualquier fecha y si tiene ventas saldrá la información donde sea.&lt;/P&gt;&lt;P&gt;A partir de ahí viene la duda.&lt;/P&gt;&lt;P&gt;Si lo que quieres es un venta desde Fecha anterior, pasando por la fecha actual y/o hasta la fecha posterior yo utilizaría por ejemplo 2 variables para sacar los valores de fecha anterior y posterior. y utilizando operadores de conjuntos {&amp;lt;&amp;gt;} haría los "bloques" que necesitaras...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 14:20:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Expression-in-straight-table-with-3-different-calender/m-p/792474#M1025815</guid>
      <dc:creator>david_paraje</dc:creator>
      <dc:date>2015-02-26T14:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Expression in straight table with 3 different calender fields</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Expression-in-straight-table-with-3-different-calender/m-p/792475#M1025816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. I solved by myself the code in the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(Sum({&amp;lt;[Fecha de Venta]= {'$(=[Fecha Anterior Siguiente])'}&amp;gt;} [Ventas del Dia]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this line I can now work all my data &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Later on, I made this expression and it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(Sum({&amp;lt;[Fecha de Venta]= {'$(=Date([Fecha de Venta] - 1))'}&amp;gt;} [Promedio Anual del Dia])) + Num(Sum([Promedio Anual del Dia]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually don't know how to explain what I did but I got the calculations I want &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;BR /&gt;Thanks for the replys!&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Feb 2015 17:59:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Expression-in-straight-table-with-3-different-calender/m-p/792475#M1025816</guid>
      <dc:creator />
      <dc:date>2015-02-28T17:59:58Z</dc:date>
    </item>
  </channel>
</rss>

