<?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: Set analysis help for total count as per date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952572#M327542</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked as expected&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Nov 2015 13:17:22 GMT</pubDate>
    <dc:creator>ashishtams</dc:creator>
    <dc:date>2015-11-06T13:17:22Z</dc:date>
    <item>
      <title>Set analysis help for total count as per date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952569#M327539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used below expression to calculate the total sale for the latest date. (by default)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current_Sale&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({$&amp;lt;BUSS_DATE={"$(=DATE(MAX(BUSS_DATE)))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i also wanted to show the previous sale, so i calculated the sale for previous date using below expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Previous_Sale&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({$&amp;lt;BUSS_DATE={"$(=DATE(MAX(BUSS_DATE,2)))"}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;It is giving me the correct results as of now. But the moment i select a date (any date), the previous_sale is not shown. it becomes null. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Only the current_Sale is shown for the selected date. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I want to show the previous sale even though a date is selected as a filter. So whichever date is selected that becomes my current date and then i want to calculate the previous sale accordingly. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;is there anything i can use in the set expression to achieve this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Ashish&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 10:41:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952569#M327539</guid>
      <dc:creator>ashishtams</dc:creator>
      <dc:date>2015-11-06T10:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis help for total count as per date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952570#M327540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to change two things:&lt;/P&gt;&lt;P&gt;a) ignore selections in your max() function.&lt;/P&gt;&lt;P&gt;b) ignore selections in any calendar field in your set expression to avoid incompatible sets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Sum({$&amp;lt;BUSS_DATE={"$(=DATE(MAX({&lt;STRONG&gt;1}&lt;/STRONG&gt; BUSS_DATE,2)))"}, &lt;STRONG&gt;DATEFIELDWITHUSERSELECTION=&lt;/STRONG&gt; &amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 13:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952570#M327540</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-06T13:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis help for total count as per date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952571#M327541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3332996368408px;"&gt;Bypass your master calender date:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3332996368408px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3332996368408px;"&gt;=Sum({$&amp;lt;MasterCalenderDate=,BUSS_DATE={"$(=DATE(MAX(BUSS_DATE,2)))"}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 13:13:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952571#M327541</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-06T13:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis help for total count as per date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952572#M327542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked as expected&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 13:17:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952572#M327542</guid>
      <dc:creator>ashishtams</dc:creator>
      <dc:date>2015-11-06T13:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis help for total count as per date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952573#M327543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, when you select a date, there is only one value, so there is no 2nd max and the previous date returns Null().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try to substract a day from the max date:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Previous_Sale&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({$&amp;lt;BUSS_DATE={"$(=DATE(AddDays(MAX(BUSS_DATE), -1)))"}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;or:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Previous_Sale&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({$&amp;lt;BUSS_DATE={"$(=DATE(MAX(BUSS_DATE)-1))"}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 13:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help-for-total-count-as-per-date/m-p/952573#M327543</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-11-06T13:18:42Z</dc:date>
    </item>
  </channel>
</rss>

