<?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: TopN Filter always orders by first column in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/TopN-Filter-always-orders-by-first-column/m-p/806932#M2621</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've requested clarification from an appropriate specialist.&lt;/P&gt;&lt;P&gt;As soon as I get a response, I will provide it here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Evgenii Elkin,&lt;BR /&gt;Software Engineer&lt;BR /&gt;Microsoft Power BI Custom Visuals&lt;BR /&gt;pbicvsupport@microsoft.com&lt;/P&gt;</description>
    <pubDate>Tue, 01 Oct 2019 13:17:52 GMT</pubDate>
    <dc:creator>v-evelk</dc:creator>
    <dc:date>2019-10-01T13:17:52Z</dc:date>
    <item>
      <title>TopN Filter always orders by first column</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/TopN-Filter-always-orders-by-first-column/m-p/805414#M2611</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;        let tableName = 'table';
        let column = 'column3'&lt;BR /&gt;&lt;BR /&gt;        let filterTarget: models.IFilterColumnTarget = {
            table: tableName,
	    column: column
        };
        
        let orderByTarget: any =  {
            table: tableName,
            column: column
        }

	let advancedFilter = new models.TopNFilter(
             filterTarget,
             this.direction,
	     10,
             orderByTarget&lt;BR /&gt;        );
            &lt;BR /&gt;        this.visualHost.applyJsonFilter(advancedFilter, "general", "selfFilter", FilterAction.merge);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have this filter that I created like above and I'm applying this filter to my dataset for a custom visual. I am also ordering the filter by the column that I am filtering (my table has 5 columns), so that the filtered column is sorted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, for some reason, it is always ordering by column 1 and not ordering the column that I want it to order (column 3).&amp;nbsp; This means that my column 3 will never get ordered. Can anyone help regarding this? Thanks!&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Sep 2019 08:14:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/TopN-Filter-always-orders-by-first-column/m-p/805414#M2611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-30T08:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: TopN Filter always orders by first column</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/TopN-Filter-always-orders-by-first-column/m-p/806932#M2621</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've requested clarification from an appropriate specialist.&lt;/P&gt;&lt;P&gt;As soon as I get a response, I will provide it here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Evgenii Elkin,&lt;BR /&gt;Software Engineer&lt;BR /&gt;Microsoft Power BI Custom Visuals&lt;BR /&gt;pbicvsupport@microsoft.com&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 13:17:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/TopN-Filter-always-orders-by-first-column/m-p/806932#M2621</guid>
      <dc:creator>v-evelk</dc:creator>
      <dc:date>2019-10-01T13:17:52Z</dc:date>
    </item>
  </channel>
</rss>

