Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have created a custom visual based on a table of data e.g.
Test Id | Name
1 | Task 1
1 | Task 2
2 | Task 1
2 | Task 2
However when I filter in the report view e.g. Test Id = 1 I cannot find a way to get my code to adapt. It always shows the full list.
my code looks something like this (called from update method)
public static converter(dataView: DataView😞 TestRunViewModel {
var table = dataView.table;
for (var t = 0; t < table.rows.length; t++) {
var cell = table.rows[t];
// table rows are not filtered
}
}
Anyone have any knowledge of how the custom visuals can be filtered in ts code...?
I managed to find the issue, the child nodes had to be cleared on update e.g.
private elementRoot: HTMLElement;
public init(options: VisualInitOptions): void {
this.elementRoot = options.element.get(0);
}
public update(options: VisualUpdateOptions) {
while (this.elementRoot.firstChild) {
this.elementRoot.removeChild(this.elementRoot.firstChild);
}
... etc
}
Adding calls to console.info helped to track down that the data update was not the issue
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
7 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |