<?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 only when field has no selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026035#M466510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been trying hard to figure this out and it seems simple to me, I'm convinced there's something I'm missing.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do set analysis on a chart; for example Sum({$ &amp;lt;Year={'2016'}&amp;gt;}TRI) unless there's a selection in the "year" field.&amp;nbsp; So basically I want the chart to default to the sum of TRI where year is 2016 UNLESS the user has a selection in year.&amp;nbsp; I've thought of a few workarounds that I don't like, but I'm convinced there must be a way to do exactly what I'm after... Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Feb 2016 19:25:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-01T19:25:59Z</dc:date>
    <item>
      <title>Set analysis only when field has no selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026035#M466510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been trying hard to figure this out and it seems simple to me, I'm convinced there's something I'm missing.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do set analysis on a chart; for example Sum({$ &amp;lt;Year={'2016'}&amp;gt;}TRI) unless there's a selection in the "year" field.&amp;nbsp; So basically I want the chart to default to the sum of TRI where year is 2016 UNLESS the user has a selection in year.&amp;nbsp; I've thought of a few workarounds that I don't like, but I'm convinced there must be a way to do exactly what I'm after... Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:25:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026035#M466510</guid>
      <dc:creator />
      <dc:date>2016-02-01T19:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis only when field has no selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026036#M466511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({$&amp;lt;Year = {$(=If(GetSelectedCount(Year) = 0, 2016, Concat(Year, ',')))}&amp;gt;} Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:43:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026036#M466511</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-01T19:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis only when field has no selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026037#M466512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is 2016 the max Year?&lt;/P&gt;&lt;P&gt;do you always want to display 1 year?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$ &amp;lt;Year={$(=max(Year))}&amp;gt;} TRI)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026037#M466512</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-02-01T19:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis only when field has no selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026038#M466513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming that you only are looking at yearly aggregations?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so, this should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$ &amp;lt;Year = {'$(=Max(Year))'}&amp;gt;}TRI)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will give you the the sum of whatever year is selected and 2016, the max year, if no selection is made.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 19:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026038#M466513</guid>
      <dc:creator />
      <dc:date>2016-02-01T19:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis only when field has no selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026039#M466514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think Steve wants the default to 2016 and if some thing is selected in&amp;nbsp; the year then the sum should be calculated on the selections, I would go with Sunny's suggestion but one thing , is 2016 a constant or that is a max among the years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 05:24:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026039#M466514</guid>
      <dc:creator>kkkumar82</dc:creator>
      <dc:date>2016-02-02T05:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis only when field has no selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026040#M466515</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;or you can try below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(getselectedCount(Year)=0,sum({&amp;lt;Year={'2016'}&amp;gt;}Sales),Sum(Sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 05:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026040#M466515</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2016-02-02T05:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis only when field has no selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026041#M466516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; I do want to default to current year, but 2016 is not the max.&amp;nbsp; There's other data in the dashboard that has dates of 2017, which is the problem I run into when trying to use max().&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll use Sunny's or Max's suggestion, which I had thought of, but was hoping there was a cleaner way of doing it. This way works!&amp;nbsp; Thanks for everyone's input.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 13:09:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-only-when-field-has-no-selection/m-p/1026041#M466516</guid>
      <dc:creator />
      <dc:date>2016-02-02T13:09:22Z</dc:date>
    </item>
  </channel>
</rss>

