Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

TopN Filter always orders by first column

 
        let tableName = 'table';
        let column = 'column3'

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
);
this.visualHost.applyJsonFilter(advancedFilter, "general", "selfFilter", FilterAction.merge);

 

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.

 

However, for some reason, it is always ordering by column 1 and not ordering the column that I want it to order (column 3).  This means that my column 3 will never get ordered. Can anyone help regarding this? Thanks!

 
1 REPLY 1
v-evelk
Employee
Employee

Hello,

 

I've requested clarification from an appropriate specialist.

As soon as I get a response, I will provide it here.

 

Kind Regards,

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors