<?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 Expressions inside set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expressions-inside-set-analysis/m-p/862248#M1005219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to Qlikview and have been trying to work with the set analysis but I can't make it work the way I want it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to do a count of subscriptions which where done in the last 7 days without making any selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went for:&lt;/P&gt;&lt;P&gt;=count ( {&amp;lt;(today()-[Action Date]) = {1,2,3,4,5,6,7}&amp;gt;} [Subscription ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn't seem to be working. Is there a problem with the expression in the left?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2015 13:43:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-05-14T13:43:48Z</dc:date>
    <item>
      <title>Expressions inside set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-inside-set-analysis/m-p/862248#M1005219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to Qlikview and have been trying to work with the set analysis but I can't make it work the way I want it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to do a count of subscriptions which where done in the last 7 days without making any selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went for:&lt;/P&gt;&lt;P&gt;=count ( {&amp;lt;(today()-[Action Date]) = {1,2,3,4,5,6,7}&amp;gt;} [Subscription ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn't seem to be working. Is there a problem with the expression in the left?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 13:43:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-inside-set-analysis/m-p/862248#M1005219</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-14T13:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions inside set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-inside-set-analysis/m-p/862249#M1005220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fernando,&lt;/P&gt;&lt;P&gt;Yes, the left part in the filter of a set modifier must always be a field. Not a variable, another function or expression but a valid field in the data model.&lt;/P&gt;&lt;P&gt;Although I'm not sure how your model is created, the expression syntax you are looking for to get the subscriptions of the past 7 days would be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14316115011659500" jivemacro_uid="_14316115011659500"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Count({&amp;lt; DateField = {"=&amp;gt;$(=Date(Today() -7))&amp;lt;=$(=Date(Today()))"} &amp;gt;} [Subscription ID])&lt;/SPAN&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Provided Date(DateField) and Date(Today() -7) are returning the same result format (test it in a text object) the the Count() aggregation will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 13:51:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-inside-set-analysis/m-p/862249#M1005220</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2015-05-14T13:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions inside set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-inside-set-analysis/m-p/862250#M1005221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help, I didn't know about that. The problem is not solved though. Let me explain a bit further:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 Date fields. One is called "Calendar Date", and the other is called "Action Date". Calendar Date is the date the subscription was purchased. Action Date is the date in which the user did something to his subscription (i.e. cancel it). I want to see subscriptions that were done a particular action (ID 12) in the last 7 days (no matter when the subscription has purchased).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By doing: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;Count({&amp;lt; [Action Type ID] = {12}, [Action Date] = {"=&amp;gt;$(=Date(Today() -7))&amp;lt;=$(=Date(Today()))"} &amp;gt;} [Subscription ID])&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still get no results. I have double checked and some should appear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any further advise?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 15:48:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-inside-set-analysis/m-p/862250#M1005221</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-14T15:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions inside set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expressions-inside-set-analysis/m-p/862251#M1005222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure that [Action Date] and Date(Today()) return the same format date. This is not usually the case, since one date can have some decimals and the other is a round number, for example.&lt;/P&gt;&lt;P&gt;Check the app in here:&lt;A href="https://community.qlik.com/docs/DOC-4247"&gt;QlikView App: Dates, Date Ranges and Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 17:29:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expressions-inside-set-analysis/m-p/862251#M1005222</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2015-05-14T17:29:28Z</dc:date>
    </item>
  </channel>
</rss>

