<?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: count field with previous month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338664#M573169</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;For this to work ensure both your date fields are timestamps:&lt;/P&gt;&lt;P&gt;count(DISTINCT {&amp;lt;DisputeLog.Status={'Completed'},DisputeLog.Source-='DecMes'},DisputeLog.DisputeType-={'Information'},DisputeLog.DateofLogging={"&amp;lt;=$(=monthstart(AddMonths(Date(Max(DisputeLog.DateofLogging)),-6)))"},DisputeLog.DisputePeriod={"&amp;lt;=$(=monthstart(AddMonths(Date(Max(DisputeLog.DisputePeriod)),-6)))"}&amp;gt;} DisputeLog.LogId)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2012 03:53:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-09T03:53:06Z</dc:date>
    <item>
      <title>count field with previous month</title>
      <link>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338660#M573165</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;I 'm new to this tool and i need kind help seniors..... could u pls help me out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using Line graph and in my expression i hav to include this logic &lt;/P&gt;&lt;P&gt;I hav a date field "X" and i want to count "Y" with the condition that count should include X+ previous 6 month and my dimenion is also "X" &lt;/P&gt;&lt;P&gt; i tried this logic&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #333333;"&gt;&lt;STRONG&gt;count(DISTINCT(if(Date(X)&amp;lt;monthstart(AddMonths(X,-6)) ,Y)) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #333333;"&gt;'m getting wrong value when i look at the source data i dont know where exactly 'm running out of logic so guide me out seniors...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #333333;"&gt;&lt;STRONG&gt;many thanks in advance&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #333333;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #333333;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 15:48:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338660#M573165</guid>
      <dc:creator />
      <dc:date>2012-07-06T15:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: count field with previous month</title>
      <link>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338661#M573166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(Distinct {&amp;lt;X={"&amp;lt;=$(=monthstart(AddMonths(X,-6)))"}&amp;gt;} Y). If X is a number then change it to (num(monthstart...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 15:57:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338661#M573166</guid>
      <dc:creator />
      <dc:date>2012-07-06T15:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: count field with previous month</title>
      <link>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338662#M573167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for ur response but its showing 0 wt to do???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2012 07:45:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338662#M573167</guid>
      <dc:creator />
      <dc:date>2012-07-08T07:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: count field with previous month</title>
      <link>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338663#M573168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Expression tat 'm using currently is tat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(DISTINCT(if(Date(DisputeLog.DateofLogging)&amp;lt;monthstart(AddMonths(DisputeLog.DateofLogging,6))&lt;/P&gt;&lt;P&gt; and date(DisputeLog.DisputePeriod)&amp;lt;MonthStart(AddMonths(DisputeLog.DisputePeriod,6))&lt;/P&gt;&lt;P&gt; and DisputeLog.DisputeType&amp;lt;&amp;gt;'Information' and&lt;/P&gt;&lt;P&gt; DisputeLog.Source&amp;lt;&amp;gt;'DecMes' and&lt;/P&gt;&lt;P&gt; DisputeLog.Status='Completed',DisputeLog.LogId)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my two date fields are DateOfLogging and DisputePeriod and few conditions.... if i select some month for eg..... Mar-2012 i want to show the count Mar-2012 + Feb-2012.....+Oct-2011&amp;nbsp; and if i select Apr-11 it should giv me the count again Apr-11 + previous 6 months data like dynamic one and 'm using same date field as my dimension i used ur expression its showing 0 value.... could u pls help me out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jul 2012 18:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338663#M573168</guid>
      <dc:creator />
      <dc:date>2012-07-08T18:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: count field with previous month</title>
      <link>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338664#M573169</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;For this to work ensure both your date fields are timestamps:&lt;/P&gt;&lt;P&gt;count(DISTINCT {&amp;lt;DisputeLog.Status={'Completed'},DisputeLog.Source-='DecMes'},DisputeLog.DisputeType-={'Information'},DisputeLog.DateofLogging={"&amp;lt;=$(=monthstart(AddMonths(Date(Max(DisputeLog.DateofLogging)),-6)))"},DisputeLog.DisputePeriod={"&amp;lt;=$(=monthstart(AddMonths(Date(Max(DisputeLog.DisputePeriod)),-6)))"}&amp;gt;} DisputeLog.LogId)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 03:53:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-field-with-previous-month/m-p/338664#M573169</guid>
      <dc:creator />
      <dc:date>2012-07-09T03:53:06Z</dc:date>
    </item>
  </channel>
</rss>

