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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.