Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
const dataTarget = [{ table , column }];
const dataValues = [value];
try {
let filter = {
$schema: "https://powerbi.com/product/schema#tuple",
filterType: 6,
operator: "In",
target: dataTarget,
values: dataValues,
};
host.applyJsonFilter(
filter,
"general",
"filter",
powerbi.FilterAction.merge
);
} catch (error) {
console.error("Filter error:", error);
}Solved! Go to Solution.
Hi @DavidAnthony ,
Thank you for reaching out to Microsoft Community.
Try local filtering inside your visual logic, where it filters data post dataView load, you must handle the filtering inside your visual logic, not through applyJsonFilter.
While building the visual, apply your own filtering logic to the dataView before rendering.
Refer this document for implementing Data view: Power BI Custom Visual Part 4 - Accessing the DataView - Shetland Data
If this post helps, please give us Kudos and consider marking it Accept as solution to assist other members in finding it more easily.
Regards,
Chaithra.
Hi @DavidAnthony ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra.
Hi @DavidAnthony ,
We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra.
Hi @DavidAnthony ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra.
Hi @DavidAnthony ,
Thank you for reaching out to Microsoft Community.
Try local filtering inside your visual logic, where it filters data post dataView load, you must handle the filtering inside your visual logic, not through applyJsonFilter.
While building the visual, apply your own filtering logic to the dataView before rendering.
Refer this document for implementing Data view: Power BI Custom Visual Part 4 - Accessing the DataView - Shetland Data
If this post helps, please give us Kudos and consider marking it Accept as solution to assist other members in finding it more easily.
Regards,
Chaithra.
Thanks for your reply
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |