<?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: Help in expression (put computed column value in set analysis) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-in-expression-put-computed-column-value-in-set-analysis/m-p/1702476#M451300</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Pick(Dimensionality(),
	Sum(Aggr(If(YEARMONTH = Max(TOTAL &amp;lt;YEAR&amp;gt; YEARMONTH), Count(DISTINCT EMPLOYEE)), YEAR, Quarter, YEARMONTH)),
	Sum(Aggr(If(YEARMONTH = Max(TOTAL &amp;lt;YEAR, Quarter&amp;gt; YEARMONTH), Count(DISTINCT EMPLOYEE)), YEAR, Quarter, YEARMONTH)),
	Count(DISTINCT EMPLOYEE)
)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 15 May 2020 14:43:06 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2020-05-15T14:43:06Z</dc:date>
    <item>
      <title>Help in expression (put computed column value in set analysis)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-expression-put-computed-column-value-in-set-analysis/m-p/1702220#M451279</link>
      <description>&lt;P&gt;Hello got a pivot table with Year, Quarter, and month as dimensions&lt;/P&gt;&lt;P&gt;I managed using the FirstSortedValue function to get the latest month per month, or per quarter or per year&lt;BR /&gt;Now what I want is to use this value in my expression to get the headcount&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="expand_all.png" style="width: 410px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33669iC28118DDCC287343/image-size/large?v=v2&amp;amp;px=999" role="button" title="expand_all.png" alt="expand_all.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;when all columns are expanded I get the max month per month which is fine&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="expand_all2.png" style="width: 395px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33670i6C7BD55C6F9AB890/image-size/large?v=v2&amp;amp;px=999" role="button" title="expand_all2.png" alt="expand_all2.png" /&gt;&lt;/span&gt;&lt;BR /&gt;when I collapse the Quarter column I get the latest month as per the data and this is fine&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="expand_all3.png" style="width: 405px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33671iBEFCFD40F0E248B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="expand_all3.png" alt="expand_all3.png" /&gt;&lt;/span&gt;&lt;BR /&gt;and when I collapse the year column I get the latest month in the year and this is fine&lt;BR /&gt;Now what I want is to count(distinct Employee) where monthYear is the one I'm getting using the FirstSortedValue&lt;BR /&gt;so when the year is collapsed I should get &lt;STRONG&gt;1&lt;/STRONG&gt; since in 201905 the distinct count of employee is &lt;STRONG&gt;1&lt;/STRONG&gt;&lt;BR /&gt;check attached sample data and help please&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 02:37:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-expression-put-computed-column-value-in-set-analysis/m-p/1702220#M451279</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2020-05-15T02:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help in expression (put computed column value in set analysis)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-expression-put-computed-column-value-in-set-analysis/m-p/1702476#M451300</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Pick(Dimensionality(),
	Sum(Aggr(If(YEARMONTH = Max(TOTAL &amp;lt;YEAR&amp;gt; YEARMONTH), Count(DISTINCT EMPLOYEE)), YEAR, Quarter, YEARMONTH)),
	Sum(Aggr(If(YEARMONTH = Max(TOTAL &amp;lt;YEAR, Quarter&amp;gt; YEARMONTH), Count(DISTINCT EMPLOYEE)), YEAR, Quarter, YEARMONTH)),
	Count(DISTINCT EMPLOYEE)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 15 May 2020 14:43:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-expression-put-computed-column-value-in-set-analysis/m-p/1702476#M451300</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-05-15T14:43:06Z</dc:date>
    </item>
  </channel>
</rss>

