<?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: Counting a quarter? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922578#M981067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Best would be to create a calendar with Year, Month, Quarter in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Working with your model, I think there is a date function InQuarter() (not at my system right now, so can't check in the HELP):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count(Distinct If ( [Car.Status]='Sold' AND InQuarter([Car.Sold Date], Yearstart(Today()), 0), [Car Id], ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2015 11:36:07 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-08-13T11:36:07Z</dc:date>
    <item>
      <title>Counting a quarter?</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922577#M981066</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 want to count the number of cars that are sold (1) in the the 1st quarter (2) and in 2015 (3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dates are all days and not months so this is what Ive tried but with no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count(Distinct If (Month([Car.Sold Date]='&amp;lt;=March' AND [Car.Status]='Sold' AND InYear([Car.Sold Date], Today(), 0), [Car Id], ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 11:29:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922577#M981066</guid>
      <dc:creator>knightwriter</dc:creator>
      <dc:date>2015-08-13T11:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Counting a quarter?</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922578#M981067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Best would be to create a calendar with Year, Month, Quarter in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Working with your model, I think there is a date function InQuarter() (not at my system right now, so can't check in the HELP):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count(Distinct If ( [Car.Status]='Sold' AND InQuarter([Car.Sold Date], Yearstart(Today()), 0), [Car Id], ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 11:36:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922578#M981067</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-13T11:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Counting a quarter?</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922579#M981068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create Month and Quarter fields in your script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Car.Sold Date) as Month,&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: 13px; line-height: 1.5em;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Year(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Car.Sold Date) as Year,&lt;/SPAN&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: 13px; line-height: 1.5em;"&gt;'Q'&amp;amp; Ceil(Month(Car.Sold Date)/3) as Quarter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Now usse&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count({&amp;lt;Quarter = {'Q1'}, Year = {'$(=Year(Today()))'}&amp;gt;}Distinct [Car Id])&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 11:36:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922579#M981068</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-08-13T11:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Counting a quarter?</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922580#M981070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for the expression. This does work as far as it gives me a number but if I wanted to use the same text box properties 4 times (ie q1,, q2, q3, q4) how would I use / create this? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 11:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922580#M981070</guid>
      <dc:creator>knightwriter</dc:creator>
      <dc:date>2015-08-13T11:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Counting a quarter?</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922581#M981071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InQuarter([Car.Sold Date], Yearstart(Today()), 0)&lt;/P&gt;&lt;P&gt;InQuarter([Car.Sold Date], Yearstart(Today()), 1)&lt;/P&gt;&lt;P&gt;InQuarter([Car.Sold Date], Yearstart(Today()), 2)&lt;/P&gt;&lt;P&gt;InQuarter([Car.Sold Date], Yearstart(Today()), 3)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 11:58:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-a-quarter/m-p/922581#M981071</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-13T11:58:39Z</dc:date>
    </item>
  </channel>
</rss>

