具有多列的 Power bi 客户端过滤器
Power bi client filter with multiple columns
我有以下 power bi 客户端过滤器代码:
const basicFilter: pbi.models.IBasicFilter = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "Store",
column: "Count"
},
operator: "In",
values: [1,2,3,4],
filterType: pbi.models.FilterType.BasicFilter
}
在我的场景中,一个 table 可以有多个列,所以如果我想按 table 的多个列进行过滤,我该怎么办?上面的代码中只有Count这样的一列有效,但是多列如何配置呢?
您必须为每个条件定义一个过滤器,并在 ReportConfiguration.filters 中传递一个包含所有过滤器的数组 属性:
var embedConfig = {
...
filters: [basicFilter1, basicFilter2, filter3]
};
report.setFilters([basicFilter1, basicFilter2, filter3])
.catch(errors => {
// Handle error
});
我有以下 power bi 客户端过滤器代码:
const basicFilter: pbi.models.IBasicFilter = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "Store",
column: "Count"
},
operator: "In",
values: [1,2,3,4],
filterType: pbi.models.FilterType.BasicFilter
}
在我的场景中,一个 table 可以有多个列,所以如果我想按 table 的多个列进行过滤,我该怎么办?上面的代码中只有Count这样的一列有效,但是多列如何配置呢?
您必须为每个条件定义一个过滤器,并在 ReportConfiguration.filters 中传递一个包含所有过滤器的数组 属性:
var embedConfig = {
...
filters: [basicFilter1, basicFilter2, filter3]
};
report.setFilters([basicFilter1, basicFilter2, filter3])
.catch(errors => {
// Handle error
});