Forum Discussion

erfansha's avatar
erfansha
New Member
2 years ago

How to filter all visuals in a Power BI custom visual without specifying a table name?

I have a custom visual in Power BI, and I've written the following code to filter other tables based on a column called DateID:

 

  public update(options: VisualUpdateOptions) {
    const filter = {
      $schema: "http://powerbi.com/product/schema#basic",
      target: {
        table: "MRS3 vwMrsFactSales",
        column: "DateID",
      },
      operator: "In",
      values: [13991002, 13991006],
    };
    this.host.applyJsonFilter(
      filter,
      "general",
      "filter",
      powerbi.FilterAction.merge
    );
  }

 

 

it works when i specify table name in target but what i want is to filter all tables in report and i dont know waht are table names and when i remove table from target it broke. what should i do?

I searched a lot, but there is no good documentation or YouTube video about this.

No RepliesBe the first to reply