<?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 Set Analysis use OR in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-use-OR/m-p/220710#M500569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to show data for only yesterday and today. I have a variable that calculates yesterday's date vMaxDate. I want all sales where the Date = Yesterday OR the date = Today.&lt;/P&gt;&lt;P&gt;vMaxDate is yesterday because that is our report cutoff BUT some sales come thru with today's date so I want to see those as well. I am using v9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the below but it only picks up yesterday's sales, not todays. What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date ={"$(#vMaxDate)","$(#vMaxDate)+1"} ,[Subscription Indicator]={"Non-Subscription"}&amp;gt;} [TOTAL BOOKED ($)])/1000&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Feb 2011 18:07:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-17T18:07:43Z</dc:date>
    <item>
      <title>Set Analysis use OR</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-use-OR/m-p/220710#M500569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to show data for only yesterday and today. I have a variable that calculates yesterday's date vMaxDate. I want all sales where the Date = Yesterday OR the date = Today.&lt;/P&gt;&lt;P&gt;vMaxDate is yesterday because that is our report cutoff BUT some sales come thru with today's date so I want to see those as well. I am using v9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the below but it only picks up yesterday's sales, not todays. What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date ={"$(#vMaxDate)","$(#vMaxDate)+1"} ,[Subscription Indicator]={"Non-Subscription"}&amp;gt;} [TOTAL BOOKED ($)])/1000&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 18:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-use-OR/m-p/220710#M500569</guid>
      <dc:creator />
      <dc:date>2011-02-17T18:07:43Z</dc:date>
    </item>
    <item>
      <title>Set Analysis use OR</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-use-OR/m-p/220711#M500570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unchecked expression that should in principal work:&lt;/P&gt;&lt;P&gt;=sum(if(Date=today() or Date = today()-1,Sales))&lt;/P&gt;&lt;P&gt;You may have to put date() functions round the 'Date' and today to ensure they're the same format but there's no reason that shouldn't work.&lt;/P&gt;&lt;P&gt;It should then be a simple(ish) process to get it into Set Analysis.&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 18:52:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-use-OR/m-p/220711#M500570</guid>
      <dc:creator>matt_crowther</dc:creator>
      <dc:date>2011-02-17T18:52:45Z</dc:date>
    </item>
    <item>
      <title>Set Analysis use OR</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-use-OR/m-p/220712#M500571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt's solution should work, but just so that you understand set analysis, you need to put the formula within the dollar-sign expansion $() like the following:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date ={"$(vMaxDate)","$(=vMaxDate+1)"} ,[Subscription Indicator]={"Non-Subscription"}&amp;gt;} [TOTAL BOOKED ($)])/1000&lt;/P&gt;&lt;P&gt;And you might be careful that the MaxDate variable returns a value in the date format like&lt;/P&gt;&lt;P&gt;date(max(Date))&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 19:10:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-use-OR/m-p/220712#M500571</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2011-02-17T19:10:01Z</dc:date>
    </item>
  </channel>
</rss>

