Forum Discussion

Hugo_Gallardo's avatar
5 years ago

Power BI Embedded: multiple filter selection, what if a user doesn't select a form value

Hello Team:

 

We have the following problem:

 

Whe are using a asp.net core 3 webapp, we are embeddind every visual on the webpage, about 20.

 

Thanks to you we managed to set filters to every visual but we have the following problems:

 

1) what if they select multiple variables on one checkbox selector , how do we send the data in one json selection?

2) What if they don't select one selector? we tried sending ["default"], ["isblank"] and only the selector, selected filtered it but the one not selected should show all values selected like in the powerbi.

3) Click default and return to the default values all visuals.

4) If the user wants to save a filter how can we achieve that?

 

Our code goes as follows:

 

function ReplaceFilters() {
var a = $("#In1").val();
var b = $("#In2").val();
var txt = $("#myselect1").val();
const filterList = [{
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "tCalendarioNestleN",
column: "SemanaNestle"
},
logicalOperator: "And",
conditions: [{
operator: "GreaterThanOrEqual",
value: a
}, {
operator: "LessThanOrEqual",
value: b
}]
},
{
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "tProductos",
column: "cveCategoria"
},
operator: "In",
values: ["All"]
}];

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Hugo_Gallardo 

    Here I find a offical blog about how to use filters in Power BI embedding.

    I hope it could help you solve your problem.

    For reference: Control report filters

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.