<?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 - last 7 days in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358660#M30408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this (you are missing the ending &amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Min({$&amp;lt;[CalDate] = {"&amp;gt;= $(=Date(Max([CalDate])-7, 'YYYY-MM-DD'))"}&lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;&amp;gt;}&lt;/SPAN&gt; [CalDate])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 May 2017 11:40:33 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-05-30T11:40:33Z</dc:date>
    <item>
      <title>Set Analysis - last 7 days</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358659#M30407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I have a heap of transactions each with [CalDate]&amp;nbsp;&amp;nbsp; - a date formatted as YYYY-MM-DD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to count the number of transactions the occurred in the last 7 days ; or be to precise, the last "loaded" 7 days.&lt;/P&gt;&lt;P&gt;My formula wasn't working, so I've tried to simplify it for testing.&lt;BR /&gt;Now I am just trying to create a set of the desired data, and return the earliest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't even get it to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Broken down :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The last date loaded in my dataset, regardless of dimension:&lt;UL&gt;&lt;LI&gt;Max(Total [CalDate])&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 60px;"&gt;(This works)&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;7 Days previous&lt;UL&gt;&lt;LI&gt;Date(Max(Total [CalDate])-7)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 60px;"&gt;(This works)&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Final formula : (should bring back the earliest date present within 7 day dataset)&lt;UL&gt;&lt;LI&gt;Min( { $&amp;lt; [CalDate] = {"&amp;gt;= $(=Date(Max(Total [CalDate])-7))" }&amp;gt;} [CalDate])&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 60px;"&gt;(This just produces NULL)&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;IMG __jive_id="165199" alt="QS.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165199_QS.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 11:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358659#M30407</guid>
      <dc:creator>simonb2013</dc:creator>
      <dc:date>2017-05-30T11:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - last 7 days</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358660#M30408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this (you are missing the ending &amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Min({$&amp;lt;[CalDate] = {"&amp;gt;= $(=Date(Max([CalDate])-7, 'YYYY-MM-DD'))"}&lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;&amp;gt;}&lt;/SPAN&gt; [CalDate])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 11:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358660#M30408</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-05-30T11:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - last 7 days</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358661#M30409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers Sunny, I've edited in the post, small (but important) typo.&lt;/P&gt;&lt;P&gt;Original code has it, and problem remains &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 11:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358661#M30409</guid>
      <dc:creator>simonb2013</dc:creator>
      <dc:date>2017-05-30T11:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - last 7 days</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358662#M30410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simon, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached QVW to see if it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felipe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 11:45:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358662#M30410</guid>
      <dc:creator>felipedl</dc:creator>
      <dc:date>2017-05-30T11:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - last 7 days</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358663#M30411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check with the other changes? Like removing total because it is unnecessary and adding the date format?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 11:51:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358663#M30411</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-05-30T11:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - last 7 days</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358664#M30412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Felip.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your formula did work.&lt;/P&gt;&lt;P&gt;However, I was then curious as to why mine did not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started doing some comparisons and found this:&lt;/P&gt;&lt;P&gt;If I leave a space between the "&amp;gt;="&amp;nbsp; and the "$"&amp;nbsp; of my nested expression, my formula fails completely.&lt;/P&gt;&lt;P&gt;If I remove the space, than it all works fine.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"&amp;gt;= $&lt;/LI&gt;&lt;LI&gt;"&amp;gt;=$&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;With hindsight, I guess it is parsing a space to the start of my date string !?&lt;/P&gt;&lt;P&gt;Is this something that I should have known ??&lt;/P&gt;&lt;P&gt;I don't recall seeing in documentation - but I can sometimes read a bit too fast for my own good !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, hindsight is a wonderful thing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 12:12:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358664#M30412</guid>
      <dc:creator>simonb2013</dc:creator>
      <dc:date>2017-05-30T12:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - last 7 days</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358665#M30413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could be as you said a parsing error due to the space, just tried it here with the same result you got.&lt;/P&gt;&lt;P&gt;Normally i just type without spaces and this situation never occured to me, but its nice to know &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 12:19:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-last-7-days/m-p/1358665#M30413</guid>
      <dc:creator>felipedl</dc:creator>
      <dc:date>2017-05-30T12:19:29Z</dc:date>
    </item>
  </channel>
</rss>

