<?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 Unwanted document level calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Unwanted-document-level-calculation/m-p/296690#M497430</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;If vRed is defined without an = sign then it should not be calculated at the document level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check what is happening, change your chart to a straight table and make the label for the express blank (i.e. it defaults to &amp;lt;use expression&amp;gt;).&amp;nbsp; When the straight table displays, the actual expression that is being used - after the dollar expansion - will be visible and that should help you troubleshoot what is happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2011 11:35:06 GMT</pubDate>
    <dc:creator>stephencredmond</dc:creator>
    <dc:date>2011-09-28T11:35:06Z</dc:date>
    <item>
      <title>Unwanted document level calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Unwanted-document-level-calculation/m-p/296689#M497429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I logged a question last week which Jason Michaelides kindly supplied me with the following solution:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;Employee&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;"=SUM({&amp;lt;[Time category group] ={Productive,Billable}&amp;gt;} [Project time])/SUM([Project time])&amp;lt; 0.49999"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;Employee&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. supply the number of employees where their productive and billable projects amount to less than 50% of their work (each employee will have a number of different entries (the projects)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works perfectly when I displayed the answer in a text box. I have now been asked to map this figure over different periods and place them in a bar chart (Dimension axis = period and Expression axis = the above calculation)&lt;/P&gt;&lt;P&gt;I have defined a variable vRed as the above calculation (without an equals sign at the front) and used the following calculation on the chart (without an equals sign at the front):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;$(vRed)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;Employee&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;),'##.#%') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I have is when the calculation is placed in a graph it first calculates vRed at a document level and then applies the&amp;nbsp; &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;Employee&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;at the period level.&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;I am not very experienced with set analysis, but from what I have read the ‘=’ is an instruction to calculate at the document level, so I am assuming the ‘=’ in the middle of the vRed calculation is causing my problem?&lt;/P&gt;&lt;P&gt;If this is the case, how do I get round this problem? I have seen Do While loops, but I am not sure that these are used in expression calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 10:14:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unwanted-document-level-calculation/m-p/296689#M497429</guid>
      <dc:creator />
      <dc:date>2011-09-28T10:14:02Z</dc:date>
    </item>
    <item>
      <title>Unwanted document level calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Unwanted-document-level-calculation/m-p/296690#M497430</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;If vRed is defined without an = sign then it should not be calculated at the document level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check what is happening, change your chart to a straight table and make the label for the express blank (i.e. it defaults to &amp;lt;use expression&amp;gt;).&amp;nbsp; When the straight table displays, the actual expression that is being used - after the dollar expansion - will be visible and that should help you troubleshoot what is happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 11:35:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unwanted-document-level-calculation/m-p/296690#M497430</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2011-09-28T11:35:06Z</dc:date>
    </item>
    <item>
      <title>Unwanted document level calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Unwanted-document-level-calculation/m-p/296691#M497431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion, but unfortunately the calculation just appears as if I had written it ‘long hand’.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way it is calculating the answer is as follows:&lt;/P&gt;&lt;P&gt;- It looks at the data for all periods and calculates how many Employees are &amp;lt;50%, say 10 people.&lt;/P&gt;&lt;P&gt;- It then looks at the specified period and checks how many of those 10 people have data in that period – say 8.&lt;/P&gt;&lt;P&gt;- It will then use the 8 as the numerator and divides it by the number of Distinct employees in that period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously I want it to use the calculated count of employees &amp;lt;50% for the specified period to be the numerator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 12:51:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unwanted-document-level-calculation/m-p/296691#M497431</guid>
      <dc:creator />
      <dc:date>2011-09-28T12:51:40Z</dc:date>
    </item>
  </channel>
</rss>

