<?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: expression total is null (-) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533261#M438925</link>
    <description>&lt;P&gt;How about this&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#FF0000"&gt;Sum(Aggr(&lt;/FONT&gt;
Sum(Sales) * Only({&amp;lt;BL_Period={$(=Max(period))}&amp;gt;} BL_rate)
&lt;FONT color="#FF0000"&gt;, [SO#], Country))&lt;/FONT&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Jan 2019 12:57:25 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-01-22T12:57:25Z</dc:date>
    <item>
      <title>expression total is null (-)</title>
      <link>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1532998#M438889</link>
      <description>&lt;P&gt;I has been stuck in this issue for long time. Please someone help me out!&lt;/P&gt;&lt;P&gt;I have a straight table which will calculate sales and convert it to USD with "current" FX rate based on selection. I have a dimension "country" which has multiple values and&amp;nbsp;each has a currency of the country.&lt;/P&gt;&lt;P&gt;In below expression, If I select one country, everything is fine, total sales is also correct because the rate will be unique. However, if don't select the country, the total will be null. I know the problem is the calculation of the rate, but since the rate should be based on user selection, how can I avoid the issue? (SO# is sales order number, I tried to calculate from the lowest level, but looks like doesn't work).&lt;/P&gt;&lt;P&gt;I can't force user to select a country because this is a summary report, every country should be shown in one chart.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff"&gt;sum(&lt;/FONT&gt;Sales) * aggr(Only({&amp;lt;BL_Period={&lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080"&gt;$(=max(period))&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;}&amp;gt;}BL_rate),SO#) &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 08:16:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1532998#M438889</guid>
      <dc:creator>achates2008</dc:creator>
      <dc:date>2019-01-22T08:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: expression total is null (-)</title>
      <link>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533144#M438907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You could probably use a work around here ,that in case a country is not Selected the Total appears as NA,&amp;nbsp;and in case the country is selected , it shows the total , as said when a country is not selected you would not know the rate conversion to be used.&lt;/P&gt;&lt;P&gt;Please check the attachment wherein i Have used Dimensionality which states the number of Dimensions used , in the sample I have used 2 Dimensions and thus the Dimensionality () is 2.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 10:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533144#M438907</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2019-01-22T10:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: expression total is null (-)</title>
      <link>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533232#M438918</link>
      <description>&lt;P&gt;Hi Anushree,&lt;/P&gt;&lt;P&gt;Thank you for your answer, but the total is required by user.&lt;/P&gt;&lt;P&gt;The actual requirements are even more complex. It will have country-city structure, and need to show sub total per country. So I need to change the chart to pivot table later. Anyway, the logic should be same.&lt;/P&gt;&lt;P&gt;There is another similar case as mine, but don't know how to migrate it to my case. Any idea?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-App-Development/Sum-of-rows-in-pivot-table/m-p/460582" target="_self"&gt;https://community.qlik.com/t5/QlikView-App-Development/Sum-of-rows-in-pivot-table/m-p/460582&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 12:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533232#M438918</guid>
      <dc:creator>achates2008</dc:creator>
      <dc:date>2019-01-22T12:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: expression total is null (-)</title>
      <link>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533243#M438922</link>
      <description>Well in that case why not use conditional enabling and show the pivot chart when getselectedcount(city)&amp;gt;0 and use the dimensionality on pivot table , Dimensionality for total on Pivot is zero.&lt;BR /&gt;Furthermore , if the total needs to be displayed even when no country is selected what is the rate you are supposed to assume?&lt;BR /&gt;In case you need further changes , I would say its better you share the sample copy of the application as working without the data in hand gets difficult to understand the actual requirement</description>
      <pubDate>Tue, 22 Jan 2019 12:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533243#M438922</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2019-01-22T12:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: expression total is null (-)</title>
      <link>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533261#M438925</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#FF0000"&gt;Sum(Aggr(&lt;/FONT&gt;
Sum(Sales) * Only({&amp;lt;BL_Period={$(=Max(period))}&amp;gt;} BL_rate)
&lt;FONT color="#FF0000"&gt;, [SO#], Country))&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Jan 2019 12:57:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533261#M438925</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-22T12:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: expression total is null (-)</title>
      <link>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533263#M438926</link>
      <description>&lt;P&gt;Actually it should be always fully expanded, no any conditional needed.&lt;/P&gt;&lt;P&gt;The rate is per SO level, so sum(Sales*rate) has no problem. As mentioned, different country has different rate, so on total level, there isn't a rate. The total must be roll up from row level, but must use expression total in pivot table.&lt;/P&gt;&lt;P&gt;You are right, a real example is the best. I would provide a screenshot as below at first to help on understanding.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2019-01-22 20 48 06.png" style="width: 355px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/4226i237F22A67F113FD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-01-22 20 48 06.png" alt="2019-01-22 20 48 06.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 12:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533263#M438926</guid>
      <dc:creator>achates2008</dc:creator>
      <dc:date>2019-01-22T12:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: expression total is null (-)</title>
      <link>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533272#M438927</link>
      <description>Fantastic! This is exactly the answer.&lt;BR /&gt;Thank you so much, Sunny!</description>
      <pubDate>Tue, 22 Jan 2019 13:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-total-is-null/m-p/1533272#M438927</guid>
      <dc:creator>achates2008</dc:creator>
      <dc:date>2019-01-22T13:09:54Z</dc:date>
    </item>
  </channel>
</rss>

