<?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: A challenge in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578623#M1105399</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Josh,&lt;/P&gt;&lt;P&gt;The reason you see only one tracking number when you use the second formula is because the value would be null() because of your aggregation of OrderNumber. There is nothing unique to aggregate OrderNumber for the second Tracking#.&lt;/P&gt;&lt;P&gt;Try unpressing null() and zero values. It will look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Order#&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Tracking#&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4589823&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$6,500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2345898&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume this is a straight table. Similarly applies for Pivot as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps. These will usually occur because of the way the Data Model is designed. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Mar 2014 19:17:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-14T19:17:25Z</dc:date>
    <item>
      <title>A challenge</title>
      <link>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578620#M1105396</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 pivot table which shows customer's name, Order number, Invoice number, Shipment Tracking number and Order Total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="DuplicateTotal.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/55082_DuplicateTotal.JPG.jpg" style="max-width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are times that an order is too large to physically fit in one box so it ships with 2 boxes each gets its own Tracking Number.&lt;/P&gt;&lt;P&gt;The Total of the order though should appear only once and not as shown as the Grand Total is skewed.&lt;/P&gt;&lt;P&gt;The Expression for the total is&lt;/P&gt;&lt;P&gt;=Sum(Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can correct that with the following expression&lt;/P&gt;&lt;P&gt;=Sum(Aggr(DISTINCT Amount, OrderNumber) &lt;/P&gt;&lt;P&gt;However, that drops one of the lines and only one Tracking number then appears like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="DuplicateTotal2.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/55083_DuplicateTotal2.JPG.jpg" style="width: 620px; height: 176px;" /&gt;&lt;/P&gt;&lt;P&gt;But I need to see both Tracking numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve that.&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;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 18:41:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578620#M1105396</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2014-03-14T18:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: A challenge</title>
      <link>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578621#M1105397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;I guess you can try below idea at Data model:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can remove tracking number from fact&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And create one more table just with OrderNO,Tracking NO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For TrackingNO column Concatenate values if you have more .Then you will get only one row for each order NO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;OrderNO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,TrackingNO&lt;/P&gt;&lt;P&gt;0000100488&amp;nbsp;&amp;nbsp;&amp;nbsp; ,797560638262&lt;/P&gt;&lt;P&gt;0000100779 ,529456752584-529456752595&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 18:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578621#M1105397</guid>
      <dc:creator>chiru_thota</dc:creator>
      <dc:date>2014-03-14T18:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: A challenge</title>
      <link>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578622#M1105398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm thinking something with FirstSortedValue()...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe:&lt;/P&gt;&lt;P&gt;FirstSortedValue(aggr(sum(Amount),OrderNumber),OrderNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: You may need a NODISTINCT in there too&lt;/P&gt;&lt;P&gt;FirstSortedValue(aggr(NODISTINCT sum(Amount),OrderNumber),OrderNumber)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 19:03:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578622#M1105398</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-03-14T19:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: A challenge</title>
      <link>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578623#M1105399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Josh,&lt;/P&gt;&lt;P&gt;The reason you see only one tracking number when you use the second formula is because the value would be null() because of your aggregation of OrderNumber. There is nothing unique to aggregate OrderNumber for the second Tracking#.&lt;/P&gt;&lt;P&gt;Try unpressing null() and zero values. It will look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Order#&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Tracking#&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4589823&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;$6,500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2345898&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume this is a straight table. Similarly applies for Pivot as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps. These will usually occur because of the way the Data Model is designed. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 19:17:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578623#M1105399</guid>
      <dc:creator />
      <dc:date>2014-03-14T19:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: A challenge</title>
      <link>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578624#M1105400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are a genius!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 19:20:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-challenge/m-p/578624#M1105400</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2014-03-14T19:20:20Z</dc:date>
    </item>
  </channel>
</rss>

