<?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: Dynamic Date Expression- Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573046#M1103842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try :&amp;nbsp; avg({&amp;lt;Date={'&amp;gt;=$(=addmonth(max(Date)))'}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Apr 2014 11:32:39 GMT</pubDate>
    <dc:creator>ashwanin</dc:creator>
    <dc:date>2014-04-14T11:32:39Z</dc:date>
    <item>
      <title>Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573044#M1103840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a formula in QV&lt;/P&gt;&lt;P&gt;=avg({$&amp;lt;Date={'$(=max(Date))'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem : QV does not calculate for the Data in which Sales records does not exists for max date for Customers having last sales date of previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Is there any formula ,that will calculate avg for all the records for max date and auto calculate for those in which max date is of previous month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g Customer has sales on 01-Mar-14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while b has Sales on 28-Feb-2014, i want it will calculate the avg for Customer A on 01-Mar-14 while for B it should be 28-Feb-14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 10:45:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573044#M1103840</guid>
      <dc:creator />
      <dc:date>2014-04-14T10:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573045#M1103841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this Avg(if(Date=aggr(max(Date),Customer),Sales)) may be it will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 11:18:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573045#M1103841</guid>
      <dc:creator>nlmmaurya</dc:creator>
      <dc:date>2014-04-14T11:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573046#M1103842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try :&amp;nbsp; avg({&amp;lt;Date={'&amp;gt;=$(=addmonth(max(Date)))'}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 11:32:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573046#M1103842</guid>
      <dc:creator>ashwanin</dc:creator>
      <dc:date>2014-04-14T11:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573047#M1103843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using Qlikview 11 then you may go through Alternate States. It becomes easy to present Previous and Current month of data by using this Comparative feature. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanket&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 11:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573047#M1103843</guid>
      <dc:creator>sanketkhunte</dc:creator>
      <dc:date>2014-04-14T11:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573048#M1103844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neelam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we do this by Set Analysis?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 11:48:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573048#M1103844</guid>
      <dc:creator />
      <dc:date>2014-04-14T11:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573049#M1103845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashwani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is somewhat near, but here it calculates the data of two dates. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 11:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573049#M1103845</guid>
      <dc:creator />
      <dc:date>2014-04-14T11:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573050#M1103846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanket,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, i am using QV-11. Can you please let me know, more about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want to compare data. I want qv will calculate for all customers, where their sales dates is of last month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 11:51:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573050#M1103846</guid>
      <dc:creator />
      <dc:date>2014-04-14T11:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573051#M1103847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg({$&amp;lt;Date={'$(=aggr(max(Date),Customer)'}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 11:56:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573051#M1103847</guid>
      <dc:creator />
      <dc:date>2014-04-14T11:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573052#M1103848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bertran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might be i have written something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here Customer is in Dimension. I need an expression which took the last date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried below, but this is also not working .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg({$&amp;lt;Date={'$(=aggr(max(Date)'}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 12:11:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573052#M1103848</guid>
      <dc:creator />
      <dc:date>2014-04-14T12:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573053#M1103849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want to get the last date by Customer you need :&lt;/P&gt;&lt;P&gt;aggr(max(Date),Customer)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 12:16:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573053#M1103849</guid>
      <dc:creator />
      <dc:date>2014-04-14T12:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573054#M1103850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please, try this.&lt;/P&gt;&lt;P&gt;Let me know, if it helps and if you like it....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 13:02:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573054#M1103850</guid>
      <dc:creator />
      <dc:date>2014-04-14T13:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573055#M1103851</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;If the table dimension is Customer, you will not be able to use a set expression for this analysis as the set is evaluated once for the object, not on each line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(If(Date = Max(Aggr(Date, Customer)), Sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the data set is large, it would be better to store a last sale date field (associated with to the customer), or set a last transaction flag value (associated with the sales fact). For the former, you could now use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(If(Date = LastSaleDate, Sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 13:35:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573055#M1103851</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-04-14T13:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Expression- Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573056#M1103852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, KRISHNA, Jonathan.&lt;/P&gt;&lt;P&gt;In fact, there is a &lt;SPAN style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;possibility&lt;/SPAN&gt; to calculate this formula using set expression, but you need to have 'RowID' field (or similar) in your data. Then you can use such expression:&lt;/P&gt;&lt;P&gt;avg({&amp;lt; RowID = {"=Date = aggr( max(total&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Customer&lt;/SPAN&gt;&amp;gt; Date ), &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Customer&lt;/SPAN&gt;, RowID )"} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;You can use this expression when you want to calculate this formula depends on current selection in date filters (e.g. Year, Month and so on).&lt;BR /&gt;If you just want to show absolute result for customer, the best way is using additional field with flag, as Jonathan wrote above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 14:25:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Date-Expression-Set-Analysis/m-p/573056#M1103852</guid>
      <dc:creator />
      <dc:date>2014-04-14T14:25:34Z</dc:date>
    </item>
  </channel>
</rss>

