<?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: Calculated dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-dimension/m-p/1406400#M1236436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaroslav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll have to do some script transformations to get what you need, by getting the minimum month for each user (I also changed the roman literal month number into a integer number):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dummy:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;Month,User,Number of sales&lt;/P&gt;&lt;P&gt;9,A,12&lt;/P&gt;&lt;P&gt;10,A,15&lt;/P&gt;&lt;P&gt;11,A,19&lt;/P&gt;&lt;P&gt;12,A,11&lt;/P&gt;&lt;P&gt;11,B,7&lt;/P&gt;&lt;P&gt;12,B,14&lt;/P&gt;&lt;P&gt;12,C,10&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;User,&lt;/P&gt;&lt;P&gt;min(Month) as minMonth&lt;/P&gt;&lt;P&gt;Resident dummy&lt;/P&gt;&lt;P&gt;group by User;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (dummy)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;User,&lt;/P&gt;&lt;P&gt;minMonth as Month,&lt;/P&gt;&lt;P&gt;1 as [Num]&lt;/P&gt;&lt;P&gt;Resident Max;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;User,&lt;/P&gt;&lt;P&gt;Month,&lt;/P&gt;&lt;P&gt;[Number of sales],&lt;/P&gt;&lt;P&gt;if (User = peek(User), peek(Num)+1,1) as Num;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;Resident dummy&lt;/P&gt;&lt;P&gt;order by User;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table dummy, Max;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code gets me both of your tables above:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sample.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/187149_Sample.png" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached the QVW I used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Dec 2017 13:41:22 GMT</pubDate>
    <dc:creator>felipedl</dc:creator>
    <dc:date>2017-12-15T13:41:22Z</dc:date>
    <item>
      <title>Calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension/m-p/1406399#M1236434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im dealing with current problem, hopefully someone will have some idea &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I got input data like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="205" style="width: 232px; height: 207px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" width="55"&gt;Month&lt;/TD&gt;&lt;TD class="xl66" width="45"&gt;User&lt;/TD&gt;&lt;TD class="xl66" width="103"&gt;Number of sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="19"&gt;IX&lt;/TD&gt;&lt;TD class="xl65"&gt;A&lt;/TD&gt;&lt;TD class="xl65"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="19"&gt;X&lt;/TD&gt;&lt;TD class="xl65"&gt;A&lt;/TD&gt;&lt;TD class="xl65"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="19"&gt;XI&lt;/TD&gt;&lt;TD class="xl65"&gt;A&lt;/TD&gt;&lt;TD class="xl65"&gt;19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="19"&gt;XII&lt;/TD&gt;&lt;TD class="xl65"&gt;A&lt;/TD&gt;&lt;TD class="xl65"&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="19"&gt;XI&lt;/TD&gt;&lt;TD class="xl65"&gt;B&lt;/TD&gt;&lt;TD class="xl65"&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="19"&gt;XII&lt;/TD&gt;&lt;TD class="xl65"&gt;B&lt;/TD&gt;&lt;TD class="xl65"&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="19"&gt;XII&lt;/TD&gt;&lt;TD class="xl65"&gt;C&lt;/TD&gt;&lt;TD class="xl65"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The usual table output would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 359px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="78"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="75"&gt;IX&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="78"&gt;X&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;XI&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;XII&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;19&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I would need:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 359px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="78"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="75"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="78"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;3&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;19&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;14&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basicly I need to compare employees based on number of months they are with company. I think calculated dimension is way to go as far as the input table is not the simple as the above one &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Its made from more tables &amp;amp; their connections... Any hints?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension/m-p/1406399#M1236434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2026-01-26T16:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension/m-p/1406400#M1236436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaroslav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll have to do some script transformations to get what you need, by getting the minimum month for each user (I also changed the roman literal month number into a integer number):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dummy:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;Month,User,Number of sales&lt;/P&gt;&lt;P&gt;9,A,12&lt;/P&gt;&lt;P&gt;10,A,15&lt;/P&gt;&lt;P&gt;11,A,19&lt;/P&gt;&lt;P&gt;12,A,11&lt;/P&gt;&lt;P&gt;11,B,7&lt;/P&gt;&lt;P&gt;12,B,14&lt;/P&gt;&lt;P&gt;12,C,10&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;User,&lt;/P&gt;&lt;P&gt;min(Month) as minMonth&lt;/P&gt;&lt;P&gt;Resident dummy&lt;/P&gt;&lt;P&gt;group by User;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (dummy)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;User,&lt;/P&gt;&lt;P&gt;minMonth as Month,&lt;/P&gt;&lt;P&gt;1 as [Num]&lt;/P&gt;&lt;P&gt;Resident Max;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;User,&lt;/P&gt;&lt;P&gt;Month,&lt;/P&gt;&lt;P&gt;[Number of sales],&lt;/P&gt;&lt;P&gt;if (User = peek(User), peek(Num)+1,1) as Num;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;Resident dummy&lt;/P&gt;&lt;P&gt;order by User;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table dummy, Max;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code gets me both of your tables above:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sample.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/187149_Sample.png" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached the QVW I used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 13:41:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension/m-p/1406400#M1236436</guid>
      <dc:creator>felipedl</dc:creator>
      <dc:date>2017-12-15T13:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension/m-p/1406401#M1236438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Felip! I think I can make it working...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 08:21:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension/m-p/1406401#M1236438</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-20T08:21:36Z</dc:date>
    </item>
  </channel>
</rss>

