<?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: Getcurrentfield in TOTAL expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350613#M516070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still don't get why you want to use a total prefix if you want an average for &lt;SPAN style="text-decoration: underline;"&gt;each&lt;/SPAN&gt; column in your chart. If I understood you right it should be enough to use expression w/o a total prefix. PFA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 May 2017 18:17:58 GMT</pubDate>
    <dc:creator>Sergey_Shuklin</dc:creator>
    <dc:date>2017-05-28T18:17:58Z</dc:date>
    <item>
      <title>Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350606#M516063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My bar chart has 2 dimensions:&lt;/P&gt;&lt;P&gt;1.periods - cyclic selection&lt;/P&gt;&lt;P&gt;2. metric code (1-4)&lt;/P&gt;&lt;P&gt;expressions:&lt;/P&gt;&lt;P&gt;1.bar - order quantity&lt;/P&gt;&lt;P&gt;2.text - average duration of all segments for the current period (e.g., date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to display an average for each column, according to a selected cyclic dimension.&lt;/P&gt;&lt;P&gt;But the following expression doesn't work, as all the values are the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(TOTAL &amp;lt;$(='[' &amp;amp; GetCurrentField([Cyc_SaleOrd_Periods]) &amp;amp; ']')&amp;gt; Order_OpenTarget_TimeDiff)&lt;/P&gt;&lt;P&gt;/count(TOTAL &amp;lt;$(='[' &amp;amp; GetCurrentField([Cyc_SaleOrd_Periods]) &amp;amp; ']')&amp;gt;&amp;nbsp; DISTINCT&amp;nbsp; SaleOrder_ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would appreciate another way to display it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="165001" alt="bar_chart_total.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165001_bar_chart_total.png" style="height: 334px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Dafnis X&#xD;
Attached sample data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 14:08:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350606#M516063</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-28T14:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350607#M516064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share sample data to work with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 15:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350607#M516064</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-05-28T15:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350608#M516065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Dafnis!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps, you are getting one value for all columns due to exact a total prefix. Try to use an aggr(sum(),dates)/aggr(count(),dates). I don't sure for real, but in some case it may help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 15:31:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350608#M516065</guid>
      <dc:creator>Sergey_Shuklin</dc:creator>
      <dc:date>2017-05-28T15:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350609#M516066</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;The issue is probably due to the getcurrentfield.. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 15:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350609#M516066</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-28T15:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350610#M516067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just did..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 15:33:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350610#M516067</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-28T15:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350611#M516068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try without $ sign, it may be calculating it to value of the field rather than adding the fieldname to the total.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 16:18:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350611#M516068</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-05-28T16:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350612#M516069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It gives an error :"allocated memory exceeded"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 16:35:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350612#M516069</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-28T16:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350613#M516070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still don't get why you want to use a total prefix if you want an average for &lt;SPAN style="text-decoration: underline;"&gt;each&lt;/SPAN&gt; column in your chart. If I understood you right it should be enough to use expression w/o a total prefix. PFA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 18:17:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350613#M516070</guid>
      <dc:creator>Sergey_Shuklin</dc:creator>
      <dc:date>2017-05-28T18:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350614#M516071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sergey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your kind help!&lt;/P&gt;&lt;P&gt;I probably was wrong with what how I was trying to do it..&lt;/P&gt;&lt;P&gt;For Each bar the value&amp;nbsp; should display the average duration of an order according to the dimension selected.&lt;/P&gt;&lt;P&gt;If that's what your calculation tries to achieve, that i think it's wrong.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;3/5/2017 &lt;/P&gt;&lt;P&gt;sum(duration)/sum(orders) =&amp;nbsp; 1.5 (~30/20)&lt;/P&gt;&lt;P&gt;but you got 2.4&lt;/P&gt;&lt;P&gt;Can you please explain?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 19:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350614#M516071</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-28T19:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350615#M516072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My apologize, I didn't check result well. 2.4 - is the average of one metric. In case of calculating all metrics using of Total prefix seems to be the way.&lt;/P&gt;&lt;P&gt;So, the solution will be that:&lt;/P&gt;&lt;P&gt;=sum(total &amp;lt;OpenWeek,OpenDate&amp;gt; Duration)/sum(total &amp;lt;OpenWeek,OpenDate&amp;gt; [Qty Orders])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 19:34:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350615#M516072</guid>
      <dc:creator>Sergey_Shuklin</dc:creator>
      <dc:date>2017-05-28T19:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350616#M516073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sergey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you offer to actually include all the fields in the group in the expression.&lt;/P&gt;&lt;P&gt;Thak you very much.&lt;/P&gt;&lt;P&gt;I didn't mark your answer as correct because it is a workaround.. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 03:30:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350616#M516073</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-29T03:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350617#M516074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Dafnis!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a great experience to solve your problem. Thank you &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There is one more solution which can be the one you lookin' for:&lt;/P&gt;&lt;P&gt;=sum(total &amp;lt;$(=GetCurrentField(Periods))&amp;gt; Duration)/sum(total &amp;lt;$(=GetCurrentField(Periods))&amp;gt; [Qty Orders])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've finnaly reached the &lt;SPAN style="font-size: 13.3333px;"&gt;GetCurrentField() function =D &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 15:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350617#M516074</guid>
      <dc:creator>Sergey_Shuklin</dc:creator>
      <dc:date>2017-05-29T15:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Getcurrentfield in TOTAL expression</title>
      <link>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350618#M516075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kudos!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried some variations of this expession which&amp;nbsp; but none worked!&lt;/P&gt;&lt;P&gt;Count(TOTAL &amp;lt;$(='[' &amp;amp; GetCurrentField([Group Name]) &amp;amp; ']')&amp;gt; [Respondent ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 18:02:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getcurrentfield-in-TOTAL-expression/m-p/1350618#M516075</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-29T18:02:56Z</dc:date>
    </item>
  </channel>
</rss>

