<?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 Pivot table order dimension by expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Pivot-table-order-dimension-by-expression/m-p/1591293#M43423</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope you guys can help me regarding one problem of sorting dimension in pivot table by expression. here is my pivot table:&lt;/P&gt;&lt;P&gt;I would like to order the last dimension - Material based on the measure which is count of batches for the first day - 2019-06-12. Because the date range is dynamic, I used following expression in the "Sort by expression"&lt;/P&gt;&lt;P&gt;AGGR(Count({$&amp;lt;ScheduledDate={"=$(=Date(Min(ScheduledDate),'YYYY-MM-DD')"}&amp;gt;}DISTINCT BatchNumber),Material)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Snippet.PNG" style="width: 806px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13669i84440C4448D83CD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snippet.PNG" alt="Snippet.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I want materials that have highest count appear first,&amp;nbsp;however it didn't give me the desired ordering for all materials. not sure what was wrong in my expression in set analysis above. any help will be greatly appreciated. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2019 00:36:10 GMT</pubDate>
    <dc:creator>Frank_Fu</dc:creator>
    <dc:date>2019-06-13T00:36:10Z</dc:date>
    <item>
      <title>Pivot table order dimension by expression</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-table-order-dimension-by-expression/m-p/1591293#M43423</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope you guys can help me regarding one problem of sorting dimension in pivot table by expression. here is my pivot table:&lt;/P&gt;&lt;P&gt;I would like to order the last dimension - Material based on the measure which is count of batches for the first day - 2019-06-12. Because the date range is dynamic, I used following expression in the "Sort by expression"&lt;/P&gt;&lt;P&gt;AGGR(Count({$&amp;lt;ScheduledDate={"=$(=Date(Min(ScheduledDate),'YYYY-MM-DD')"}&amp;gt;}DISTINCT BatchNumber),Material)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Snippet.PNG" style="width: 806px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13669i84440C4448D83CD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snippet.PNG" alt="Snippet.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I want materials that have highest count appear first,&amp;nbsp;however it didn't give me the desired ordering for all materials. not sure what was wrong in my expression in set analysis above. any help will be greatly appreciated. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 00:36:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-table-order-dimension-by-expression/m-p/1591293#M43423</guid>
      <dc:creator>Frank_Fu</dc:creator>
      <dc:date>2019-06-13T00:36:10Z</dc:date>
    </item>
  </channel>
</rss>

