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.

PBI JS API Filtering Error

I have had embedded reports using the PBI Javascript API working for years now. All of a sudden, I am getting an "Uncaught Error" in the browser console saying "Filter property is invalid". I have tried work arounds (like applying filters after report is rendered) but without success. 

Status: New
Comments
v-chuncz-msft
Community Support

@aansellcompass 

 

You may check Constructing Filters and create a support ticket for assistance if necessary.

aansellcompass
Regular Visitor

@v-chuncz-msft 

 

my current filter object looks like this:

 

var IamAFilter = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "Customers",
column: "CustomerParseName"
},
operator: "In",
values: [txtEmbedReportCPN],
filterType: 1
}

 

But, I have also tried using the constructors found in the JS Wiki you've sent. 

For example:

var IamAFilter: 

var IamAFilter: pbi.models.IBasicFilter = {...};
//OR
const IamAFilter: pbi.models.IBasicFilter = {...};
//OR
var IamAFilter: models.IBasicFilter = {...};
//OR
const IamAFilter: models.IBasicFilter = {...};
//OR
var IamAFilter: models.BasicFilter = {...};
//OR
const IamAFilter: models.BasicFilter = {...};

 I'm so stuck doing this trial and error because of the inconsistent js wiki documentation.