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
adeepak7
Frequent Visitor

2 targets for host.applyJsonFilter

Respected Amin,

 

I am using the following code snippet:

 

const target = {
//Table name
table: this.column[0].queryName.substr(0, this.column[0].queryName.indexOf('.')),

//First field in the table which we want to apply filter on:
column: this.column[0].queryName.substr(this.column[0].queryName.indexOf('.') + 1)
};

//Checking for the name.
console.log("Table: " + target.table + "\nColumn: " + target.column);

let filter = new models.AdvancedFilter(
target,
"And",
{
operator: "Is",
value: text
}
);
let action = FilterAction.merge;
this.searchBox[0].value = text;

this.host.applyJsonFilter(filter, "general", "filter", action);

I want to apply filter on the table for 2 columns. That means I will have to use an API that takes 2 targets and filter as arguments.

 

Is there any solution available for this usecase? In short, I want to apply filter on 2 columns of same table.

2 REPLIES 2
andres777
Advocate III
Advocate III

Multi column filters  :  Now they are supported!

https://docs.microsoft.com/en-us/power-bi/developer/visuals/filter-api

 

 

v-viig
Community Champion
Community Champion

Multi column filters are not supported. Current target is end of this year to bring such feature.

 

Ignat Vilesov,

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.