<?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 Tricky Set Analysis Scenario in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462697#M558342</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few columns of my data set include Year, Month, AccountNumber, and Amount.&amp;nbsp; Often an AccountNumber will show up for multiple Months and/or Years, but I only want to count each AccountNumber once each year.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created one bar graph with "Year" as my X-axis and "Number of Accounts" as my Y-axis to show a year-over-year comparison of managed accounts.&amp;nbsp; I used the following expression to give me the output I want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;Year=,Month=&amp;gt;} DISTINCT AccountNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Set Analysis for Year and Month are needed because those filters are set to "Always one selected value".&amp;nbsp; For this graph, I want to ignore those 2 filters yet allow all others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I'm having now is how to create this same chart but using "Amount" as my Y-axis.&amp;nbsp; I can't use a similar expression since the AccountNumber is the identifier I need, yet instead of counting those I want to sum the corresponding Amounts.&amp;nbsp; I hope this makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help you can provide.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jun 2013 19:13:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-06-11T19:13:29Z</dc:date>
    <item>
      <title>Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462697#M558342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few columns of my data set include Year, Month, AccountNumber, and Amount.&amp;nbsp; Often an AccountNumber will show up for multiple Months and/or Years, but I only want to count each AccountNumber once each year.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created one bar graph with "Year" as my X-axis and "Number of Accounts" as my Y-axis to show a year-over-year comparison of managed accounts.&amp;nbsp; I used the following expression to give me the output I want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;Year=,Month=&amp;gt;} DISTINCT AccountNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Set Analysis for Year and Month are needed because those filters are set to "Always one selected value".&amp;nbsp; For this graph, I want to ignore those 2 filters yet allow all others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I'm having now is how to create this same chart but using "Amount" as my Y-axis.&amp;nbsp; I can't use a similar expression since the AccountNumber is the identifier I need, yet instead of counting those I want to sum the corresponding Amounts.&amp;nbsp; I hope this makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help you can provide.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 19:13:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462697#M558342</guid>
      <dc:creator />
      <dc:date>2013-06-11T19:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462698#M558343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds like you want the sum of amount per accountnumber disregarding selections in Year and Month. If that's correct you can use AccountNumber as dimension and sum({&amp;lt;Year=,Month-&amp;gt;} Amount) as expression. If not, please explain in more detail what you need and &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-1290"&gt;prepare an example document&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 19:20:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462698#M558343</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-06-11T19:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462699#M558344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that's the solution.&amp;nbsp; I want the sum of amount per year, as such I'm using Year as the dimension.&amp;nbsp; However, it's not just sum of Amount per year because any given AccountNumber could be listed for any number of Months each year, but I only want each AccountNumber's Amount included once in the total for each year.&amp;nbsp; I'll work on an example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 19:31:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462699#M558344</guid>
      <dc:creator />
      <dc:date>2013-06-11T19:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462700#M558345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a very simple example.&amp;nbsp; Now I want to create this same chart, but instead of Count of AccountNumber I want to Sum Amount.&amp;nbsp; Hopefully this better illustrates my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 19:46:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462700#M558345</guid>
      <dc:creator />
      <dc:date>2013-06-11T19:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462701#M558346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So why the&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Year=,Month=&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is not the solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 20:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462701#M558346</guid>
      <dc:creator />
      <dc:date>2013-06-11T20:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462702#M558347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because then it would sum many accounts multiple times.&amp;nbsp; Check out the raw data set for the Qlik file - based on your suggestion, AccountNumber "1" would be summed four times for 2009 - I only want to sum it once.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total Amount for 2009 is 1,145, yet if only unique Accounts are included (each AccountNumber 1, 2, 3, 4, 5 added just once) the Total Amount would be 545.&amp;nbsp; This last figure is what I want to appear in the graph.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 20:18:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462702#M558347</guid>
      <dc:creator />
      <dc:date>2013-06-11T20:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462703#M558348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Change "Month" data from text to integer (Jan=1, Feb = 2,..)&lt;/P&gt;&lt;P&gt;2. Add a flag to your table in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (TRANSACTIONS)&lt;/P&gt;&lt;P&gt;LOAD Year, AccountNumber, max(Month) as Month, 1 as Flag&lt;/P&gt;&lt;P&gt;resident TRANSACTIONS&lt;/P&gt;&lt;P&gt;GROUP BY Year, AccountNumber;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Then, use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Year=, Month=&amp;gt;} Amount * Flag)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 21:48:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462703#M558348</guid>
      <dc:creator />
      <dc:date>2013-06-11T21:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462704#M558349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 10:42:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462704#M558349</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-06-12T10:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462705#M558350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks lucian and Gysbert.&amp;nbsp; Both are good solutions, Gysbert's was easier to implement so that is what I used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 12:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462705#M558350</guid>
      <dc:creator />
      <dc:date>2013-06-12T12:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462706#M558351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's a small difference: my solution returns the latest value in year, Gysbert's solution returns the biggest value in year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your table is a "point-in-time" value list (as I believe it is), be aware of what you choose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 15:25:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462706#M558351</guid>
      <dc:creator />
      <dc:date>2013-06-12T15:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462707#M558352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually ended up using a 3rd solution as Gysbert's wasn't working properly (the data in the chart was changing with the month/year selection which I need to avoid) and yours populated a 1 in every "flag" cell so that didn't work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a case statement in the SQL code I was using to create my data set that creates a new column, only pulling in the amount once per account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My example wasn't very good, so unfortunately the solutions provided didn't work when I applied them to my actual file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all of the help though as these different view points did get me to the solution, even it was in a round-about way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 15:46:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/462707#M558352</guid>
      <dc:creator />
      <dc:date>2013-06-12T15:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Set Analysis Scenario</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/1527130#M558353</link>
      <description>&lt;P&gt;we can achieve&amp;nbsp; that directly in UI by using below expression-&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="1"&gt;SUM&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;AGGR&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;max&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;AMOUNT&lt;/FONT&gt;&lt;FONT size="1"&gt;),&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;ACCOUNTNUMBER&lt;/FONT&gt;&lt;FONT size="1"&gt;)) &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2019 14:49:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Set-Analysis-Scenario/m-p/1527130#M558353</guid>
      <dc:creator>namrata_maheshw</dc:creator>
      <dc:date>2019-01-07T14:49:24Z</dc:date>
    </item>
  </channel>
</rss>

