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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Marco57
Helper III
Helper III

BUG API Javascript Property 'table' does not exist on type 'IFilterGeneralTarget'

Hello,

 

I am calling on power bi client javascript library :

 

let newState: pbi.models.IAdvancedFilter;

 

 

on the interfaces, this library states that it extends IFilter interface: 

Marco57_0-1612913942734.png

 IFilter interface has a key called "target": of type IFilterGeneralTarget

Marco57_1-1612913993422.png

IFilterGeneralTarget can be of type IFilterTarget:

 

Marco57_1-1612915149766.png

 
 
 

IFilterTarget can be of type IFilterColumnTarget

image.png

 

IFilterColumnTarget finally has a key "column":

image.png

now the issue is why am I getting that my variable can't have a "column" key ?!:

 

Marco57_0-1612915074836.png

 

 

Many thanks in advance for any support.

Rgds, Marc.

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Marco57 ,

 

See if these will help:

https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/targets 

https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-filters#advanced-fil... 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @V-lianl-msft 

 

This is the issue I have, I define an empty advanced filter :

slicerStateBetween: <pbi.models.IAdvancedFilter>{
        $schema: "http://powerbi.com/product/schema#advanced",
        conditions: [
          {
            operator: "GreaterThanOrEqual",
            value: null
          },
          {
            operator: "LessThanOrEqual",
            value: null
          }],
        filterType: 0,
        logicalOperator: "And",
        target: {
          column: "",
          table: "",
        }
      }

I copy it into another variable :

let newState: pbi.models.IAdvancedFilter;
newState = this.reportAssets.slicer.slicerStateBetween;

newState.target.column = currentFilter.filter.NAME;

 

There is hwere the error happen, I can't assign attribute column to target even if newState is of type IAdvancedFilter and as per documentation it contains target and column key inside of it:

const advancedFilter = {
  $schema: "http://powerbi.com/product/schema#advanced",
  target: {
    table: "Store",
    column: "Name"
  },
  logicalOperator: "Or",
  conditions: [
    {
      operator: "Contains",
      value: "Wash"
    },
    {
      operator: "Contains",
      value: "Park"
    }
  ],
  filterType: models.FilterType.AdvancedFilter
}

 

thanks.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors