Hi,
I have two visuals Line chart and a bar chart in a page with columns Release month and Release date respectively.
I'm trying to filter these visuals with javascript api. Both are advanced filter schema. I'm able to apply them indiviually but not both of them together at the same time.Getting invalid filter definition error
Have verified the date formats i'm using and are correct.Cant we apply two advanced date filters at the same time.
Any help is highly appreciated.No luck on this inspite of mulitple trys and efforts.
var monthFilter = {
$schema: "http://powerbi.com/product/schema#advanced",
target: {
table: "Line Chart",
column: "ReleaseMonth"
},
logicalOperator: "AND",
conditions: [
{
operator: "GreaterThanOrEqual",
value: convertDate(selectedFromDate) + "T00:00:00.000Z"
},
{
operator: "LessThanOrEqual",
value: convertDate(selectedToDate) + "T00:00:00.000Z"
}
]
}
var dateFilter = {
$schema: "http://powerbi.com/product/schema#advanced",
target: {
table: "Query1",
column: "ReleaseDate"
},
logicalOperator: "AND",
conditions: [
{
operator: "GreaterThanOrEqual",
value: convertDate(selectedFromDate) + "T00:00:00.000Z"
},
{
operator: "LessThanOrEqual",
value: convertDate(selectedToDate) + "T00:00:00.000Z"
}
]
}
filters.push(monthFilter);
filters.push(dateFilter);
report.setFilters(filters);