<?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 How to use Button to show a data as an ascending order?? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259495#M97952</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; I assume that the first dimension is Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here is the macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Sub SortAsc&lt;BR /&gt;chart=ActiveDocument.GetSheetObject("CH01")&lt;BR /&gt;set Prop = chart.GetProperties&lt;BR /&gt;set vars = Prop.Dimensions&lt;BR /&gt;vars.Item(0).SortCriteria.SortByNumeric = 1 'For Asc.&lt;BR /&gt;chart.SetProperties Prop&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sub SortDesc&lt;BR /&gt;chart=ActiveDocument.GetSheetObject("CH01")&lt;BR /&gt;set Prop = chart.GetProperties&lt;BR /&gt;set vars = Prop.Dimensions&lt;BR /&gt;vars.Item(0).SortCriteria.SortByNumeric = -1 'For Desc.&lt;BR /&gt;chart.SetProperties Prop&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now create two button one for asc and second for desc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In first button give action as external-&amp;gt;macro and give name as SortAsc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same way for Desc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Sep 2011 06:24:54 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2011-09-14T06:24:54Z</dc:date>
    <item>
      <title>How to use Button to show a data as an ascending order??</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259492#M97949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I make a pivot table, through which I show a Date &amp;amp; SaleAmount. I want to creat a button, when I click on this button the table show me the data as an ascending order or vice versa. Please help me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anup&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 05:35:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259492#M97949</guid>
      <dc:creator />
      <dc:date>2011-09-14T05:35:37Z</dc:date>
    </item>
    <item>
      <title>How to use Button to show a data as an ascending order??</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259493#M97950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; What dimension you want to sort and by what order. Specify the order of the dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 06:00:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259493#M97950</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-09-14T06:00:26Z</dc:date>
    </item>
    <item>
      <title>How to use Button to show a data as an ascending order??</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259494#M97951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Koushik as a dimenssion I use Date &amp;amp; I sort it as a decending order. But I want make a button through which I want to change the order of my date as an ascending order. That means I want to give the two option to the user who want to view this table!!!!!! Thank You for your responce.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anup&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 06:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259494#M97951</guid>
      <dc:creator />
      <dc:date>2011-09-14T06:15:59Z</dc:date>
    </item>
    <item>
      <title>How to use Button to show a data as an ascending order??</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259495#M97952</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; I assume that the first dimension is Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here is the macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Sub SortAsc&lt;BR /&gt;chart=ActiveDocument.GetSheetObject("CH01")&lt;BR /&gt;set Prop = chart.GetProperties&lt;BR /&gt;set vars = Prop.Dimensions&lt;BR /&gt;vars.Item(0).SortCriteria.SortByNumeric = 1 'For Asc.&lt;BR /&gt;chart.SetProperties Prop&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sub SortDesc&lt;BR /&gt;chart=ActiveDocument.GetSheetObject("CH01")&lt;BR /&gt;set Prop = chart.GetProperties&lt;BR /&gt;set vars = Prop.Dimensions&lt;BR /&gt;vars.Item(0).SortCriteria.SortByNumeric = -1 'For Desc.&lt;BR /&gt;chart.SetProperties Prop&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now create two button one for asc and second for desc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In first button give action as external-&amp;gt;macro and give name as SortAsc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same way for Desc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 06:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259495#M97952</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-09-14T06:24:54Z</dc:date>
    </item>
    <item>
      <title>How to use Button to show a data as an ascending order??</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259496#M97953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anup,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's easier to change the field to sort by than to flip the sort order but try creating 2 variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VSortOrder with a value of 1&lt;/P&gt;&lt;P&gt;vSort with a value of =DateField&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, create a button with 2 sequential actions, both External &amp;gt; Set Variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. vSort - IF(vSortOrder=1,'=DateField*-1','=DateField')&lt;/P&gt;&lt;P&gt;2. vSortOrder - IF(vSortOrder=1,-1,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the sort tab of your pivot table, check the option to use an expression and put vSort in there (might need an = sign)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've not been able to test this so hope it works for you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 06:33:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259496#M97953</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2011-09-14T06:33:04Z</dc:date>
    </item>
    <item>
      <title>How to use Button to show a data as an ascending order??</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259497#M97954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Koushik. Is it possible with out macro???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 06:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259497#M97954</guid>
      <dc:creator />
      <dc:date>2011-09-14T06:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Button to show a data as an ascending order??</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259498#M97955</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;Below attached a working example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Shubhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 07:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259498#M97955</guid>
      <dc:creator />
      <dc:date>2011-09-14T07:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Button to show a data as an ascending order??</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259499#M97956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You to all of you..........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 05:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Button-to-show-a-data-as-an-ascending-order/m-p/259499#M97956</guid>
      <dc:creator />
      <dc:date>2011-09-16T05:32:19Z</dc:date>
    </item>
  </channel>
</rss>

