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.embed with "slicers" config element stopped working correctly after "powerbi-client" v2.20.1

We are using the NuGet package Microsoft.PowerBi.JavaScript (https://github.com/Microsoft/PowerBI-JavaScript) to implement a Power BI Embedded report solution.  We are using the powerbi.embed config "slicers" setting to pre-set slicer values during report load.  Everything works correctly using versions up to and including v2.20.1.  Starting with v2.21.0 of the package the powerbi.embed config "slicers" setting is no longer functioning properly.

 

In the examples below the powerbi.embed config "slicers" element is set to the "Daytona" property.

v2.20.1 the report initially loads with the correct value set in the slicer and the correct filtered data displayed on the report:

ironklad_0-1666214563013.png

Starting with v2.21.0 (tested through v2.22.0) the report initially loads with the report default value set to "All" and the report showing all available data.

ironklad_1-1666214686893.png

However as soon as you click on the dropdown, it immetiately changes to display "Daytona".  However the report is still displaying all data, it is not filtered by "Daytona" even thought the slicer indicates it should be.

ironklad_2-1666215116806.png

In order to see "Daytona" data correctly you need to uncheck "Daytona" in the slicer, and then re-check it after which the slicer displays "Daytona" and the report shows "Daytona" data.

 

For reference, in the above example the powerbi.embed config "slicers" value is set to:

[

    {

        "selector": {

            "$schema": http://powerbi.com/product/schema#slicerTargetSelector,

            "target": {

                "table": "Property",

                "column": "Property Name"

            }

        },

        "state": {

            "filters": [

                {

                    "$schema": http://powerbi.com/product/schema#basic,

                    "target": {

                        "table": "Property",

                        "column": "Property Name"

                    },

                    "filterType": 1,

                    "operator": "In",

                    "values": [

                        "Daytona"

                    ],

                    "requireSingleSelection": false

                }

            ]

        }

    }

]

 

In summary, it appears that starting with v2.21.0 the powerbi.embed config "slicers" functionality is failing in the following ways:

  • Slicer displays report default value on report load (instead of displaying the "slicers" override value)
  • Slicer filters using report default values on report load (instead of filtering using the "slicers" override value)
  • On clicking slicer dropdown the slicer changes to display the config "slicers" value.  However the report remains filtered using the report default values.
Status: Investigating

Hi @ironklad ,

 

There have been no similar known issues in the recent past, and based on your information situation,

if you are a Power BI Pro licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.

It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.

The link of Power BI Support: Support | Microsoft Power BI

For how to create a support ticket, please refer to How to create a support ticket in Power BI - Microsoft Power BI Community

 

Best regards,

Community Support Team Selina zhu

Comments
v-mengzhu-msft
Community Support
Status changed to: Investigating

Hi @ironklad ,

 

There have been no similar known issues in the recent past, and based on your information situation,

if you are a Power BI Pro licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.

It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.

The link of Power BI Support: Support | Microsoft Power BI

For how to create a support ticket, please refer to How to create a support ticket in Power BI - Microsoft Power BI Community

 

Best regards,

Community Support Team Selina zhu

ironklad
Regular Visitor

Thank you Selina,

 

I have created a support ticket in the Power Platform admin center.  For reference the ticket is: https://admin.powerplatform.microsoft.com/ticket/2210200040004693

 

 

v-mengzhu-msft
Community Support

Hi @ironklad ,

 

We look forward to your questions being solved in a timely manner and welcome you to share any progress to help more community members.

 

Best regards,

Community Support Team Selina zhu