<?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 Straight Table expression using a calculated field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185561#M50003</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so John W's formula works if i take out any reference to "Overtimedays", but not with reference to the field or with the expression added.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help so far guys, i'll keep trying!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Sep 2010 15:53:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-09-03T15:53:40Z</dc:date>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185553#M49995</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;I have a straight table of employee related data (days worked, contracted days etc.) that contains a number of calculated fields, one of which is 'overtimedays'. I am trying to put this field into another expression in the same table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Sum({&amp;lt; [Entry Date] = {"&amp;gt;$(=Date(Today() - ((17 * 7)+ [overtimedays] )))"}, Project_Type = {"Project", "Non_Project"} &amp;gt;} [Total Hrs])&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this doesn't seem to work. If i replace [overtimedays] with a number, the expression works fine.&lt;/P&gt;&lt;P&gt;Any ideas how I can make this type of calculation work? I'm fairly new to QlikView.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 10:03:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185553#M49995</guid>
      <dc:creator />
      <dc:date>2010-09-02T10:03:13Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185554#M49996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Rbi,&lt;/P&gt;&lt;P&gt;Can you explain What you exactly want to do..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 10:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185554#M49996</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2010-09-02T10:13:14Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185555#M49997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have noticed this problem - I had a similar problem (using Column(#) rather than the column header - but its all the same, I think). It seems that you can refer to other columns in calculations (eg Column(1)/(Column(1) + Column(2)), but not in conditional expressions. This expression did not work:&lt;/P&gt;&lt;P style="font-style: italic"&gt;Count(If(ValueDate = Date(Column(1)), BalanceRemaining))&lt;/P&gt;&lt;P&gt;But if I replaced Column(1) with a literal date (the value in Column(1)), it worked OK. See post &lt;A href="http://community.qlik.com/forums/t/33430.aspx" title="http://community.qlik.com/forums/t/33430.aspx"&gt;http://community.qlik.com/forums/t/33430.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It wont work in a set expression, because set expressions are applied on the model as a whole and are not at a row level. It may may work if you replace [overtimedays] with the expression. Not very elegant, I agree&lt;IMG alt="Sad" src="http://community.qlik.com/emoticons/emotion-6.gif" /&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 10:14:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185555#M49997</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-09-02T10:14:22Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185556#M49998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression I posted is designed to show the total number of hours worked on "project" and "non-project" activities over a time period of 17 weeks + overtimedays (17*7 because our working time is recorded per day).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 10:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185556#M49998</guid>
      <dc:creator />
      <dc:date>2010-09-02T10:27:19Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185557#M49999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A set analysis set is calculated once for your entire table. You can't (meaningfully) refer to dimension values in it, calculated or otherwise. You'll have to write that part with an if(). Somthing like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum({&amp;lt;Project_Type={'Project','Non_Project'}&amp;gt;} if("Entry Date"&amp;gt;today()-((17*7)+"overtimedays"),"Total Hrs"))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 01:01:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185557#M49999</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-03T01:01:21Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185558#M50000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't seem to be able to get that kind of IF expression to work either! &lt;IMG alt="Tongue Tied" src="http://community.qlik.com/emoticons/emotion-7.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 14:04:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185558#M50000</guid>
      <dc:creator />
      <dc:date>2010-09-03T14:04:22Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185559#M50001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I stated earlier, I would not expect that to work because "overtimedays" is a column in your table and these seem not to work in conditionals. With all due respect to JohnW, who knows far me than me!&lt;/P&gt;&lt;P&gt;Take JownW's expression, but replace "overtimedays" with the expression for that column. That might work, but I can't say for sure as I have not seen your data model or QVW file.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 14:51:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185559#M50001</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-09-03T14:51:12Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185560#M50002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also test JohnW's expression without the "overtimedays" and if it works, you know that the expression logic is correct. Then try what I suggested above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;sum({&amp;lt;Project_Type={'Project','Non_Project'}&amp;gt;} if("Entry Date"&amp;gt;today()-(17*7),"Total Hrs"))&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 14:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185560#M50002</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-09-03T14:54:17Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185561#M50003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so John W's formula works if i take out any reference to "Overtimedays", but not with reference to the field or with the expression added.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help so far guys, i'll keep trying!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 15:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185561#M50003</guid>
      <dc:creator />
      <dc:date>2010-09-03T15:53:40Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185562#M50004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, if you can't refer to column by name or number in a conditional, you can always repeat the column expression. If it's large, you could make it a variable and use the variable in both columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Sep 2010 16:43:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185562#M50004</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-03T16:43:21Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185563#M50005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you explain how I make it a variable please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 08:55:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185563#M50005</guid>
      <dc:creator />
      <dc:date>2010-09-06T08:55:35Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185564#M50006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a simple example, let's say that your column expression is this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum(Sales)&lt;/P&gt;&lt;P&gt;You could create a variable (settings -&amp;gt; document properties -&amp;gt; variables -&amp;gt; new, among other methods) and set the value to sum(Sales). Then wherever you want to use it, use $(MyVariable) instead. The dollar sign expansion will then literally insert sum(Sales) where that expression is at execution time, so it's just as if you'd typed it in yourself, but it prevents dual maintenance when you're using the same expression in multiple places.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 17:38:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185564#M50006</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-07T17:38:33Z</dc:date>
    </item>
    <item>
      <title>Straight Table expression using a calculated field</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185565#M50007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John! First attempt this appears to do the trick, but let me play with it a bit more to be sure. I really appreciate your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 09:47:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-expression-using-a-calculated-field/m-p/185565#M50007</guid>
      <dc:creator />
      <dc:date>2010-09-08T09:47:28Z</dc:date>
    </item>
  </channel>
</rss>

