<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/824797#M1038710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nihhal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# is optional, so forget about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only()&amp;nbsp; - Returns a possible or selected value of a field, there should be only one value possible/selected otherwise it will return null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose if you select Year 2014 and 2013 Only(Year) will return null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To overcome this Max(Year) is use.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=sum({&amp;lt;Year = {$(=&lt;/SPAN&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Max&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(Year)-1)}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Dec 2014 02:09:13 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2014-12-15T02:09:13Z</dc:date>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/824794#M1038707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt; background: #F2F2F2;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #666666;"&gt;sum( {$&amp;lt;Year = {$(#=Only(Year)-1)}&amp;gt;} Sales )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; In above example can you say how works '#' and 'Only'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nihhal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 03:41:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/824794#M1038707</guid>
      <dc:creator>nihhalmca</dc:creator>
      <dc:date>2014-12-13T03:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/824795#M1038708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The # is just part of the dollar sign expansion for set analysis. That functionality allows you to calculate a value to use for assignment to Year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only() function returns the value of the field within only if a single value is selected. So selected two years will return null instead. You can switch this to for example max(). In this case you still see values even if you have multiple years selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 06:57:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/824795#M1038708</guid>
      <dc:creator>morgankejerhag</dc:creator>
      <dc:date>2014-12-13T06:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/824796#M1038709</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;In the above expression Only(Year)-1 means current selection of year field less one year value selected and if only one value is selected means not 2014,2013. And # is nothing here or better you select the some of this expressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use some of this expressions&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;Year = {$(=Only(Year)-1)}&amp;gt;} Sales )&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;Year = {$(=&lt;STRONG&gt;Max&lt;/STRONG&gt;(Year)-1)}&amp;gt;} Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 07:12:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/824796#M1038709</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-12-13T07:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/824797#M1038710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nihhal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# is optional, so forget about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only()&amp;nbsp; - Returns a possible or selected value of a field, there should be only one value possible/selected otherwise it will return null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose if you select Year 2014 and 2013 Only(Year) will return null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To overcome this Max(Year) is use.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=sum({&amp;lt;Year = {$(=&lt;/SPAN&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Max&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(Year)-1)}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2014 02:09:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/824797#M1038710</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-12-15T02:09:13Z</dc:date>
    </item>
  </channel>
</rss>

