<?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 previous day in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128002#M8968</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Petter!!!!!!!!!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2018 13:41:18 GMT</pubDate>
    <dc:creator>jorditorras</dc:creator>
    <dc:date>2018-08-10T13:41:18Z</dc:date>
    <item>
      <title>Set analysis previous day</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128000#M8966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gurus, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developing an application in QlikSense related to Sales, where every morning I load data until the previous day (yesterday). I'm trying to generate two kind of set analysis related to sales and dates: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum (Sales) of last day loaded to the App (Yesterday)&lt;/P&gt;&lt;P&gt;Sum (Sales) of the previous day of the last day loaded to the App (two days ago)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried several Set Analysis and I've checked in all the forums but I haven't found any applicable solution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could please anyone help me with this please? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Jordi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 08:35:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128000#M8966</guid>
      <dc:creator>jorditorras</dc:creator>
      <dc:date>2018-08-10T08:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis previous day</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128001#M8967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Presuming you have a field named Date containing the dates...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yesterday should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt;Date={'$(=Date(Today(1)-1))'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The day before yesterday should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt;Date={'$(=Date(Today(1)-2))'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These expression might need further qualification or sophistication depending on where they are used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance if you have a more fully built out calendar breaking the date field you have into different date categories like Year, Month, Quarter etc.... You might have to nullify selections in these fields that a user might have selected in as they will block the selections on Date if you don't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt;Date={'$(=Date(Today(1)-1))'},&lt;STRONG&gt;Year=,Quarter=,Month=,Week=&lt;/STRONG&gt;&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bolded part of the set expression above will remove user selections that might be active so they don't block the first part of the set expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also disregard ALL selections by using the 1 set identfier within the set expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( {&lt;STRONG&gt;1&lt;/STRONG&gt;&amp;lt;Date={'$(=Date(Today(1)-1))'}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 08:55:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128001#M8967</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-08-10T08:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis previous day</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128002#M8968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Petter!!!!!!!!!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 13:41:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128002#M8968</guid>
      <dc:creator>jorditorras</dc:creator>
      <dc:date>2018-08-10T13:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis previous day</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128003#M8969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way, I had to use the second option. &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: 13px;"&gt;Sum( {&amp;lt;Date={'$(=Date(Today(1)-1))'},&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Year=,Month=,Week=&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 13:42:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128003#M8969</guid>
      <dc:creator>jorditorras</dc:creator>
      <dc:date>2018-08-10T13:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis previous day</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128004#M8970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome - Happy to help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 13:48:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-previous-day/m-p/128004#M8970</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-08-10T13:48:54Z</dc:date>
    </item>
  </channel>
</rss>

