<?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: Comparing accounts in different time periods in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12270#M1992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes this is called set analysis, and here it is a nested set analysis using P() function. It is advanced level, so try to be comfortable with simple set analysis syntax before&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-cloud/Subsystems/CloudHub/Content/ChartFunctions/SetAnalysis/set-modifiers-implicit-field-value-definitions.htm" title="https://help.qlik.com/en-US/sense-cloud/Subsystems/CloudHub/Content/ChartFunctions/SetAnalysis/set-modifiers-implicit-field-value-definitions.htm"&gt;https://help.qlik.com/en-US/sense-cloud/Subsystems/CloudHub/Content/ChartFunctions/SetAnalysis/set-modifiers-implicit-fi…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/68931"&gt;P() &amp;amp;amp; E() and where do you use them?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Feb 2018 16:39:14 GMT</pubDate>
    <dc:creator>YoussefBelloum</dc:creator>
    <dc:date>2018-02-26T16:39:14Z</dc:date>
    <item>
      <title>Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12261#M1983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset which shows me transactions and the accounts associated with them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Account_ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Transaction_Date&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Revenue&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Clean_date&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;05-01-2017&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100.50&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2017/01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;234&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;24-01-2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50.21&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2017/01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;21-01-2018&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;253.19&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2018/01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;456&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;29-01-2018&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;432.65&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2018/01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;234&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;07-01-2018&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;324.94&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2018/01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;666&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;09-02-2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;234.08&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2017/02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;666&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;28-02-2018&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;378.94&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2018/02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;654&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;23-02-2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;342.87&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2017/02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;785&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;17-01-2018&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;324&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2018/01&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to be able to show how many of the accounts spent in the selected month compared to the same month in the previous year. For example, if I select 2018/01 I would like to see if the account had revenue in 2017/01 (account 123 would meet this criteria).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I originally solved this within SQL, however my data is down to transaction level now and I am stuck on how to write an expression to provide me with the information, I want to show this at an aggregate level (1 account in total) and also a breakdown of the accounts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 11:48:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12261#M1983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-26T11:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12262#M1984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what do you mean by &lt;STRONG&gt;"&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;show how many of the accounts spent"&lt;/STRONG&gt; ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we take the Account ID 123 for example, what do you expect as an output ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 12:45:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12262#M1984</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-02-26T12:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12263#M1985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean, how many accounts spent in both the selected month and the same month in the previous year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Account 123 would be counted as 1, as I have selected 2018/01 and they have revenue within 2018/01 AND 2017/01.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 12:51:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12263#M1985</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-26T12:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12264#M1986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you combine this with some IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;Transaction_Date={"&amp;gt;=$(=Monthstart(AddMonths(Transaction_Date,-12)))&amp;lt;=$(=MonthEnd(AddMonths(Transaction_Date,-12)))"}&amp;gt;} Revenue)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;you should be able to see the expected output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the attached app, as soon as you select Account 123 and date = 21/01/2018, the table in the middle will show you the revenue of that account on the last year on the same month, if there is no data on the last year same month related with your selection, nothing will appear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test it and let me know&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 14:48:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12264#M1986</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-02-26T14:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12265#M1987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the example, I had a play with it but it doesn't do what I need it to do unfortunately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my app I would like to select the below (2018/01) as an example, if you see in the bottom table account 123 appears and so does 456 as they have a transaction within that month, however, I would like a table just showing account 123 as they have transactions in 2018/01 AND 2017/01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="exa.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/194599_exa.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 15:17:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12265#M1987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-26T15:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12266#M1988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;EDITED !&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So try this (I changed a little bit the expression)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;Clean_date={"&amp;gt;=$(=Date(Monthstart(AddMonths(Date(Date#(Clean_date,'YYYY/MM'),'YYYY/MM'),-12)),'YYYY/MM'))&amp;lt;=$(=Date(MonthEnd(AddMonths(Date(Date#(Clean_date,'YYYY/MM'),'YYYY/MM'),-12)),'YYYY/MM'))"}&amp;gt;} Revenue)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;Here we can remove the Monthstart() and Monthend functions because it is YYYYMM field, we just need to put = sign to have all the month included on our set analysis.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 15:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12266#M1988</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-02-26T15:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12267#M1989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah I see, okay this works a lot better. How do I show the accounts without having to select the account number? The end user wants to see accounts with transactions in both years, if I select the date, it should automatically show all accounts that meet the criteria. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 15:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12267#M1989</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-26T15:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12268#M1990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;EDITED&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this on the expression part:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Only({$&amp;lt;Account_ID = P({&lt;SPAN style="color: #ff0000;"&gt;1&lt;/SPAN&gt;&amp;lt;Clean_date={"$(=Date(AddMonths(Date(Date#(Clean_date,'YYYY/MM'),'YYYY/MM'),-12),'YYYY/MM'))"}&amp;gt;} Account_ID)&amp;gt;} Account_ID )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;here is the new expression:&lt;/P&gt;&lt;P&gt;just remove the 1 after the P function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Only({$&amp;lt;Account_ID = P({&amp;lt;Clean_date={"$(=Date(AddMonths(Date(Date#(Clean_date,'YYYY/MM'),'YYYY/MM'),-12),'YYYY/MM'))"}&amp;gt;} Account_ID)&amp;gt;} Account_ID )&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 16:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12268#M1990</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-02-26T16:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12269#M1991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works perfectly, is this called Set Analysis? I will read up. Many thanks, I understand a lot better now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 16:25:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12269#M1991</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-26T16:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing accounts in different time periods</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12270#M1992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes this is called set analysis, and here it is a nested set analysis using P() function. It is advanced level, so try to be comfortable with simple set analysis syntax before&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-cloud/Subsystems/CloudHub/Content/ChartFunctions/SetAnalysis/set-modifiers-implicit-field-value-definitions.htm" title="https://help.qlik.com/en-US/sense-cloud/Subsystems/CloudHub/Content/ChartFunctions/SetAnalysis/set-modifiers-implicit-field-value-definitions.htm"&gt;https://help.qlik.com/en-US/sense-cloud/Subsystems/CloudHub/Content/ChartFunctions/SetAnalysis/set-modifiers-implicit-fi…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/68931"&gt;P() &amp;amp;amp; E() and where do you use them?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 16:39:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-accounts-in-different-time-periods/m-p/12270#M1992</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-02-26T16:39:14Z</dc:date>
    </item>
  </channel>
</rss>

