This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hello everybody,
I wanted to use advanced filter for array selection, but I have some difficulties. I used following code for date selection:
this.applyDatePeriod(this.start_var, this.end_var, target, true);
public applyDatePeriod(startDate: Date, endDate: Date, target: IFilterColumnTarget, isUserSelection: boolean): void {
this.applyFilter(isUserSelection);
// If startDate and EndDate is null then ClearSelection is triggered
const filter: IAdvancedFilter = new window["powerbi-models"].AdvancedFilter(
target,
"And",
{
operator: "GreaterThan",
value: startDate
? startDate.toJSON()
: null
},
{
operator: "LessThan",
value: endDate
? endDate.toJSON()
: null
});
this.host.applyJsonFilter(
filter,
"general",
"filter",
(startDate && endDate)
? FilterAction.merge
: FilterAction.remove
);
}
How can I use same approach for array selection?
Thanks.
Regards,
Yerkhan
Solved! Go to Solution.
@Anonymous ,
It seems there's no "array" section in the advanced filter object model. You can refer to the model source code.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
You can refer to the sample code here.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-yuta-msft Hello
Thanks for your answer. But this is not exactly what I'm looking for. I need custom visual.
Regards,
Yerkhan
@Anonymous ,
It seems there's no "array" section in the advanced filter object model. You can refer to the model source code.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |