<?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 - Date Ranges in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1650534#M729935</link>
    <description>&lt;P&gt;Could you share your app with sample data explaining the expected output format?&lt;/P&gt;</description>
    <pubDate>Mon, 25 Nov 2019 07:43:33 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2019-11-25T07:43:33Z</dc:date>
    <item>
      <title>Set Analysis - Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1650531#M729934</link>
      <description>&lt;P&gt;Hi Qlikview Community,&lt;/P&gt;&lt;P&gt;I really hope that you could assist me with the following.&lt;/P&gt;&lt;P&gt;I'm having some trouble creating a set analysis that will calculate the amount paid during a certain period of time per client. I have 2 date fields which I imported from an Excel file. The two date fields (per client) are as follow:&lt;/P&gt;&lt;P&gt;* DateField_1 = Start date of membership&lt;/P&gt;&lt;P&gt;* DateField_2 = End date of membership&lt;/P&gt;&lt;P&gt;I require the set analysis or ETL script to calculate the sum total of amounts paid between the two mentioned date. A normal Excel if statement should look something like this:&lt;/P&gt;&lt;P&gt;if(DateField_1 &amp;lt;= DateField_2, sum(AMT_Paid), 0)&lt;/P&gt;&lt;P&gt;I have received assistance from the community and I'm currently using the following script:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; MasterDate = {"&amp;gt;=$(=Date(Start_Of_Membership)&amp;lt;=$(=Date(End_Of_Membership)"} &amp;gt;} AMT_paid)&lt;/P&gt;&lt;P&gt;The problem is that it only works when I make a selection. I am also happy to use it in the load script. Just need it to calculate without having to select anything. There is a common denominator (primary key) between the 2 sheets in the form of a client ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Niel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:51:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1650531#M729934</guid>
      <dc:creator>NielBerg</dc:creator>
      <dc:date>2024-11-16T01:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1650534#M729935</link>
      <description>&lt;P&gt;Could you share your app with sample data explaining the expected output format?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 07:43:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1650534#M729935</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-11-25T07:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1650540#M729936</link>
      <description>&lt;P&gt;Hi Niel,&lt;/P&gt;&lt;P&gt;you need selection because there are several possibilities in the dates.&lt;BR /&gt;so if you want to use it in a graph you must specify a characteristic that allows Set Analysis to retrieve a date, for example, Max(date)...&lt;BR /&gt;otherwise, you can use it in the script, and I think that's what you want, I suggest you use the pick() function in this case (here's how to use it &lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/InterRecordFunctions/Peek.htm" target="_self"&gt;Peek&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Taoufiq&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 08:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1650540#M729936</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2019-11-25T08:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1650570#M729937</link>
      <description>&lt;P&gt;It couldn't be solved with a classical set analysis because they worked like a selection - means the set condition is applied globally and not on your dimensional level.&lt;/P&gt;&lt;P&gt;You could try it in this way:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; MasterDate = {"=MasterDate&amp;gt;=Start_Of_Membership and MasterDate&amp;lt;=End_Of_Membership"} &amp;gt;} AMT_paid)&lt;/P&gt;&lt;P&gt;which is quite the same like:&lt;/P&gt;&lt;P&gt;if(MasterDate&amp;gt;=Start_Of_Membership and MasterDate&amp;lt;=End_Of_Membership, Sum(AMT_paid))&lt;/P&gt;&lt;P&gt;Quite common for such a use-case is to resolve the start/end-date to a real date and to connect it with the date from the master-calendar. For this take a look here: &lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/IntervalMatch/ba-p/1464547" target="_self"&gt;IntervalMatch&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 10:20:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1650570#M729937</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-11-25T10:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1655607#M729938</link>
      <description>&lt;P&gt;Niel, did any of the posts help you with a final solution?&amp;nbsp; If so, please be sure to return to the post and use the Accept as Solution button on the post(s) that helped you get a working solution.&amp;nbsp; If you did something different, consider posting that and then mark it.&amp;nbsp; Marking things gives the posters credit for the assistance and lets other Community Members know what actually worked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only additional thing I have is a Design Blog post that may be of some use to you:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Sorry I have nothing better for you.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 18:28:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Date-Ranges/m-p/1655607#M729938</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-12-09T18:28:43Z</dc:date>
    </item>
  </channel>
</rss>

