<?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 Same expression returns different value in Straight Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457683#M565619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the screenshot attached,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an expression which returns the number of calls taken by a specialist and devides it by the number of weekdays in the current selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression that calculates the number of weekdays is as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 9pt;"&gt;sum({&amp;lt;specialist=&amp;gt;}_Work_Day_Flag)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;For december 2012 this returns 21 weekdays ( the correct value) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;but when I paste this exact same expression into the straight table it returns 14 (the number of unique dates that this specialist took calls) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;I need it to return 21 in the straight table so it will calculate the correct value for ave number of calls per day. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;The correct number of days is 21.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;The correct average should be 1.0476 and NOT 1.5714 like it is returning.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Can anyone shed any light on why this is happening? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;I am literally copyinig and pasting the expression from the text box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Any help would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;L&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jan 2013 10:45:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-01-25T10:45:03Z</dc:date>
    <item>
      <title>Same expression returns different value in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457683#M565619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the screenshot attached,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an expression which returns the number of calls taken by a specialist and devides it by the number of weekdays in the current selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression that calculates the number of weekdays is as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 9pt;"&gt;sum({&amp;lt;specialist=&amp;gt;}_Work_Day_Flag)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;For december 2012 this returns 21 weekdays ( the correct value) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;but when I paste this exact same expression into the straight table it returns 14 (the number of unique dates that this specialist took calls) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;I need it to return 21 in the straight table so it will calculate the correct value for ave number of calls per day. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;The correct number of days is 21.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;The correct average should be 1.0476 and NOT 1.5714 like it is returning.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Can anyone shed any light on why this is happening? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;I am literally copyinig and pasting the expression from the text box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Any help would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;L&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 10:45:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457683#M565619</guid>
      <dc:creator />
      <dc:date>2013-01-25T10:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Same expression returns different value in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457684#M565620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, in the chart the expression takes SpecialistID into account since it's a dimension of the chart. So there must be more specialists with a count. The total over all specialists should add up to 21. If you want the expression to return 21 for all specialists you can add the TOTAL keyword: sum(TOTAL _Work_Day_Flag). The set modifier is useless in the chart so you might as well leave it out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 11:17:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457684#M565620</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-01-25T11:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Same expression returns different value in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457685#M565621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;21 is the number of weekdays in the current date selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in December 2012 there were 21 weekdays (mon - fri) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the straight table to return 21 regardless of which specialist is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the current selection it returns 14 because the specialist selected had actioned calls on 14 distinct days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my reporting I need to calculate average calls per day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if a month is selected - the field should count ALL weekdays in that month regardless of how many calls were taken on those days. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this make more sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 11:21:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457685#M565621</guid>
      <dc:creator />
      <dc:date>2013-01-25T11:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Same expression returns different value in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457686#M565622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's probably easier to use a variable that uses the monthstart and monthend functions in the networkingdays function to calculate the number working days. Perhaps something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vWorkDays = networkdays(monthstart(min(MyDate)),monthend(max(MyDate)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you can select a period (or a date) and get the number of working days over the months in which the period falls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then use the variable vWorkDays in your expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 11:27:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457686#M565622</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-01-25T11:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Same expression returns different value in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457687#M565623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a good idea Gysbert, but this also needs to be able to count workdays between any timespan selected,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg: Workdays in 2012&lt;/P&gt;&lt;P&gt;workdays in a week&lt;/P&gt;&lt;P&gt;workdays between any selection of dates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 11:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457687#M565623</guid>
      <dc:creator />
      <dc:date>2013-01-25T11:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Same expression returns different value in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457688#M565624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anybody explain me how to connect qlikview with bakends especially (sql server and oracle) step by step i am new to qlikview11&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 11:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457688#M565624</guid>
      <dc:creator />
      <dc:date>2013-01-25T11:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Same expression returns different value in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457689#M565625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, well as I said in your other discussion you could use calendar objects and variable to select a date range. You can use the same variables to calculate the number of working days in that range. I still think that is your best option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 12:04:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457689#M565625</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-01-25T12:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Same expression returns different value in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457690#M565626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you sooo much,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did look at the link and didn't quite understand the application to this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't quite work it like the video but here is what i did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Document Properties -&amp;gt; Variables tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selected variable and entered the expression &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 9pt;"&gt;sum({&amp;lt;specialist=&amp;gt;}_Work_Day_Flag)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; entered the variable name into the expressions on the Straight Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works absolutely perfectly and I have learnt somehting about Variables thanks to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again thank you for your effort in helping &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 12:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457690#M565626</guid>
      <dc:creator />
      <dc:date>2013-01-25T12:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Same expression returns different value in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457691#M565627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all u have to create ODBC Connection.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Controle Panel--&amp;gt; Administartive Tools----&amp;gt;Data Source(ODBC)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here u have to create ODBC Connection, If u have already ODBC Connection,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in Qlikview---&amp;gt; Edit Script---&amp;gt; Database(ODBC)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give username n password of the Ur Database , Then connection string will come, Then u can directly fetch the data from (Select) option next to the database&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 12:24:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-expression-returns-different-value-in-Straight-Table/m-p/457691#M565627</guid>
      <dc:creator>khadeer</dc:creator>
      <dc:date>2013-01-25T12:24:00Z</dc:date>
    </item>
  </channel>
</rss>

