Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

PowerBI Embedded Filterpane Bug

When using the report.updateFilters function in PowerBI embedded, the filterpane only shows the changes to the first filter in the filter array argument. To see all the filter changes in the filterpane, you have to close and open the filterpane.

 

This can be seen in the https://playground.powerbi.com/dev-sandbox.

  1. Embed sample report.
  2. Open the filter pane.
  3. Run this codesnippet:

 

 

const filters = [
    {
        $schema: "http://powerbi.com/product/schema#basic",
        target: {
            table: "Product",
            column: "isVanArsdel"
        },
        filterType: 1,
        operator: "In",
        values: ["No"],
    },
    {
        $schema: "http://powerbi.com/product/schema#basic",
        target: {
            table: "Geo",
            column: "Region"
        },
        filterType: 1,
        operator: "In",
        values: ["West"]
    },
];

report.updateFilters(models.FiltersOperations.ReplaceAll, filters);

 

 

 

After you run snippet, you see one filter in the "filters on all pages" in the filterpane, close and open the filter pane, now you see two filters.

 

This is a new bug, which wasn't present before 1. july 2021.

Status: New
Comments
v-yingjl
Community Support

Hi @Evenius ,

Could not reproduce it in my side as far as my test.

When I opened the sample report and the filter pane, there was one filter 'Year' in all page filter:

p1.png

 

After running the code, the report would update and be filtered and when opening the filter pane, the filter would update automatically.

p2.png

 

Best Regards,
Community Support Team _ Yingjie Li

vamsikrishnay
New Member

Yingjie Li I am having the same issue. I have around 10 filters in filter page for all pages. After setting the filters using report.setfilters(filters) i am only seeing the first filter visible. Moreover, the filters are also not filtering the data.

Evenius
Frequent Visitor

Hi @v-yingjl.

 

Thank you for testing and looking into this issue.

Strange that you experience a different result.

 

This is how it looks for me. 

After I open the sample report and the filter pane:

Evenius_2-1628234691596.png

 

After running the snippet:

Evenius_3-1628234752927.png

 

As you see, only the "isVanArsdel" filter is visible.

If I now manually close and open the filterpane, both filters become visible.

 

Best Regards,

Even

v-yingjl
Community Support

Hi @Evenius ,

Seems like I found the way to reproduce this issue.

When opening the sample report and the filter pane, paste the snippet to replace all the initiall codes and run it, it could be reproduced like your mentioned:

p3.png

 

If I pasted this snippet under the initial code and ran it, it could work fine as I previous mentioned before.

 

As a temporary workaround, you can run this snippet under the initial code to show the correct filter pane, I will check it internal to confirm(ICM: 254591687) and would update here as soon as possible if there is any progress.

 

Best Regards,
Community Support Team _ Yingjie Li

Evenius
Frequent Visitor

Hi @v-yingjl.

 

You're right, I deleted the initial script and pasted in the snippet.

 

The workaround is ok for the demo environment, but does not work for our production environment.

 

What I do until this is fixed is to close and open the filter pane with det update settings api.
It's not elegant, but it's better than to confuse our customers with non responding changes to the filter pane.

 

Best Regards,

Even

v-yingjl
Community Support

Hi @Evenius ,

The PG team has confirmed this issue and is deploying a repair plan, which is expected to be completed by the end of this week or early next week.

 

Best Regards,
Community Support Team _ Yingjie Li

 

 

Evenius
Frequent Visitor

Hi @v-yingjl ,

 

Sounds good.

Thank you for excelent support!

 

Best Regards,

Even

v-yingjl
Community Support

Hi @Evenius ,

Currently as far as my test, looks like it has been fixed and you can check it again.

 

Best Regards,
Community Support Team _ Yingjie Li