Forum Discussion

codjangmah's avatar
codjangmah
New Member
9 years ago

Passing Multiple Parameter filters in Power BI Embedded

I developed an MVC application and i am able to pass one parameter in a filter dynamically to PowerBI embedded which is working.

ie $filter={table1/column}. However I want to be able to pass multiple PBI tables and columns.

 

Is it possible in Power BI embedded and can it be passed dynamically? ie: $filter={table1/column1}&{table2/column2}..

8 Replies

    • Sunkari's avatar
      Sunkari
      Responsive Resident

      Sad that this feature is pending from a long time and so many people are asking for this feature. I am wondering my Power BI team is not considering this request.

       

      Anyway Eric_Zhang Power BI Javascript is for only Power BI Embedded(azure service) or this can be used for integrating reports using Rest API using Power BI Embedded(azure service)

    • codjangmah's avatar
      codjangmah
      New Member

      Can you please give an example and how will powerbi know how to process the filter you pass in if its concatenated?

      • alihamud's avatar
        alihamud
        New Member

        you can use the JavaScript SDK

        https://github.com/Microsoft/PowerBI-javascript

         

        here is an example:

        setting three filters on three column with multiple values:

         

        filters1 = [
        {
        "$schema": "http://powerbi.com/product/schema#advanced",
        "target": {
        "table": "Date",
        "column": "Date"
        },
        "logicalOperator": "And",
        "conditions": [
        {
        "operator": "GreaterThan",
        "value": "2014-04-11T21:00:00.000Z"
        }
        ]
        },
        {
        "$schema": "http://powerbi.com/product/schema#basic",
        "target": {
        "table": "Department",
        "column": "Department"
        },
        "operator": "NotIn",
        "values": [
        396,
        395,
        399
        ]
        },
        {
        "$schema": "http://powerbi.com/product/schema#basic",
        "target": {
        "table": "Business Area",
        "column": "Business Area"
        },
        "operator": "In",
        "values": [
        "R&D"
        ]
        }
        ]

        report.setFilters(filters1)
        .then(function (result) {
        $("#result").html("Done.
        " + JSON.stringify(result));
        })
        .catch(function (errors) {
        $("#result").html("Error.
        " + JSON.stringify(errors));
        });