mestu
mestu

Reputation: 126

Slicer filter on embedded power bi by API

In my embedded power bi report I'm using a component name Smart Filter pro by OKVIZ. I want to select some items using filters by javascript. I tried according to their documentation but its not working.

I tried this to select australia but its not working.

const filter: IHierarchyFilter ={
      $schema: 'http://powerbi.com/product/schema#hierarchy',
      target:[
        {
            "table": "AdminRule",
            "column": "Country"
        }
      ],
      hierarchyData:[
        {
            "operator": "Selected",
            "value": "Austria"
        }
      ],
      filterType:9
    }

But for basic filter

    const filter: IBasicFilter = {
      $schema: 'http://powerbi.com/product/schema#basic',
      target: {
        "table": "AdminRule",
        "column": "Country"
      },
      operator: "In",
      values: ["Australia"],
      filterType: 1
    };

I used this config and its working

Upvotes: 0

Views: 19

Answers (0)

Related Questions