cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
adeepak7 Frequent Visitor
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.

1 REPLY 1
Moderator v-viig
Moderator

Re: 2 targets for host.applyJsonFilter

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
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 45 members 1,348 guests
Please welcome our newest community members: