Forum Discussion
Error "slicerTargetDoesNotMatch" while embedded report with custom visual slicer loads
Hello,
yes, it is correct. The table name and column name are identical in this case. Changing from custom visual slicer to the standard slicer for this target the error does not occur and the standard slicer is showing the correct values set by the slicer filter from embed configuration and the report is filtered correctly.
Removing the slicer completely so that no visual matches the target error message "slicerTargetDoesNotMatch" also appears. So I think this the type of error is thrown in the case where no visual in a report matches the target.
So I think that the part (probably server side) of power bi which applies slicer filters from embed configuration to the report does not take the custom visual slicer into account. Perhaps because the type of the custom visual slicer is not "slicer" as by the standard slicer but the class name of this custom visual.
Maybe it is a limitation of Power BI embedded at the moment that custom visual slicers are not considered having slicer filters preapplied on report load.
Best regards
Hello,
Well, thanks alot for the investigation. I will transfer this info to a team that is responsible for Embeded API and we will try to find a solution or an answer and then I will share it here.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]
- v-evelk7 years agoMicrosoft Employee
Hello again,
Btw, have you tried to apply a filter using an other way like in this topic and this documentation?
We should check this variant before asking for assistance of embedded team because it looks like your config is just incorrect.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]- FrankSindermann7 years agoFrequent Visitor
Hello,
I did what you suggested and i moved the slicer filter targeting the custom visual slicer to the filter array of embed config. The error does not occur and the report is filtered accordingly.
This is the embed config copied from browser console (some properties are replaced by three dots):
{ "type": "report", "tokenType": 1, "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=...", "permissions": 0, "viewMode": 0, "id": "...", "accessToken": "...", "slicers": [ { "selector": { "__type": "Selector_slicerTargetSelector:#cca", "$schema": "http://powerbi.com/product/schema#slicerTargetSelector", "target": { "column": "Date", "table": "Zeit" } }, "state": { "filters": [ { "__type": "FilterAdvanced:#cca", "$schema": "http://powerbi.com/product/schema#advanced", "filterType": 0, "target": { "column": "Date", "table": "Zeit" }, "conditions": [ { "operator": "LessThan", "value": "2019-05-01T00:00:00" } ], "logicalOperator": "And" } ] } }, { "selector": { "__type": "Selector_slicerTargetSelector:#cca", "$schema": "http://powerbi.com/product/schema#slicerTargetSelector", "target": { "column": "Overduegrenze (Prozent)", "table": "Overduegrenze (Prozent)" } }, "state": { "filters": [ { "__type": "FilterAdvanced:#cca", "$schema": "http://powerbi.com/product/schema#advanced", "filterType": 0, "target": { "column": "Overduegrenze (Prozent)", "table": "Overduegrenze (Prozent)" }, "conditions": [ { "operator": "GreaterThan", "value": 150 } ], "logicalOperator": "And" } ] } }, { "selector": { "__type": "Selector_slicerTargetSelector:#cca", "$schema": "http://powerbi.com/product/schema#slicerTargetSelector", "target": { "column": "Overduegrenze (Tage)", "table": "Overduegrenze (Tage)" } }, "state": { "filters": [ { "__type": "FilterAdvanced:#cca", "$schema": "http://powerbi.com/product/schema#advanced", "filterType": 0, "target": { "column": "Overduegrenze (Tage)", "table": "Overduegrenze (Tage)" }, "conditions": [ { "operator": "GreaterThan", "value": 5 } ], "logicalOperator": "And" } ] } } ], "filters": [ { "__type": "FilterAdvanced:#cca", "$schema": "http://powerbi.com/product/schema#advanced", "filterType": 0, "target": { "column": "Overdue Wesentlichkeit", "table": "Overdue Wesentlichkeit" }, "conditions": [ { "operator": "GreaterThan", "value": 2000 } ], "logicalOperator": "And" } ], "settings": { "background": 1, "filterPaneEnabled": false, "navContentPaneEnabled": false, "layoutType": 1, "extensions": [ { "command": { "name": "export", "title": "command export", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAjdJREFUOE+lUG1PUnEc9TP0Ydq0NKVZ9sjESQIBAl4MlQgoQETHg6QiKIo8LXRBLtfKtTYpEVBQpwES6nTqF+hVzV64tV7o6e9tV03vm9aL87v7n52H3VMG4L/AStpLpi1r8Rm68/oj8+qTGTYNgwuEvWS8ZC+aMLUXQWw3BMOy+tt5zVmwkpac7iC2G0Rw0wNdRjXPpmFAH8d6J2xfDOgpPEVXTgvTiuYouhPE+LYPj1PUj7ZZ+ffWuHRf8UG0zxpgJebXey8wuRtGbCeE6E4AE9t+RLZ8CG0Mw7/uxljJBcn0AyJnCegu6PGKmI9b+wqdMC6poF+koM22kG8rtBklCRiE8E0DkbMEkKVhXFbDmbPQrbosBU1Gjo55KVRpMZRJIbylfqjjSvCid3F/vA63w7XEem5ETVqJ8KYX6oVmtKUleJQSoSUpgGyOD80ChcE1BwbydvTnrbgRqLkY0J5QILDhgSr1p1Ux14TmRCPEn3hoT8uJ0Qbn5x70EnBGq04DyNIgS8Oc0cFH/rUl2US3SmcbIPpYD0Gciz7SKn/3ELVj1b84I5W4NlRxGnBs9hPjKFlal1VhqPgc7rVeuAoOulWZFNOtxEybzoI+1IwEI2QkWYIPT9GJjjhFj8WduAXFtBiOVQtsK12o8V4lcpYA2XvhSetA3kGbGcHNAIeYzbAsGVDpKT/hGdBH/JYPwRQPjZNc1L+8g3uRup+M4Ppo1WH18JXDSnf5QYXr8leGZ/DX49+Bst9hj8Z3qIsn5QAAAABJRU5ErkJggg==", "extend": { "visualContextMenu": { "title": "Ergebnisexport" }, "visualOptionsMenu": { "title": "Ergebnisexport" } } } } ], "localeSettings": { "formatLocale": "de-DE", "language": "en-US" } } }Now this is the embed config where the error occurs:
{ "type": "report", "tokenType": 1, "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=...", "permissions": 0, "viewMode": 0, "id": "...", "accessToken": "...", "slicers": [ { "selector": { "__type": "Selector_slicerTargetSelector:#cca", "$schema": "http://powerbi.com/product/schema#slicerTargetSelector", "target": { "column": "Date", "table": "Zeit" } }, "state": { "filters": [ { "__type": "FilterAdvanced:#cca", "$schema": "http://powerbi.com/product/schema#advanced", "filterType": 0, "target": { "column": "Date", "table": "Zeit" }, "conditions": [ { "operator": "LessThan", "value": "2019-05-01T00:00:00" } ], "logicalOperator": "And" } ] } }, { "selector": { "__type": "Selector_slicerTargetSelector:#cca", "$schema": "http://powerbi.com/product/schema#slicerTargetSelector", "target": { "column": "Overduegrenze (Prozent)", "table": "Overduegrenze (Prozent)" } }, "state": { "filters": [ { "__type": "FilterAdvanced:#cca", "$schema": "http://powerbi.com/product/schema#advanced", "filterType": 0, "target": { "column": "Overduegrenze (Prozent)", "table": "Overduegrenze (Prozent)" }, "conditions": [ { "operator": "GreaterThan", "value": 150 } ], "logicalOperator": "And" } ] } }, { "selector": { "__type": "Selector_slicerTargetSelector:#cca", "$schema": "http://powerbi.com/product/schema#slicerTargetSelector", "target": { "column": "Overduegrenze (Tage)", "table": "Overduegrenze (Tage)" } }, "state": { "filters": [ { "__type": "FilterAdvanced:#cca", "$schema": "http://powerbi.com/product/schema#advanced", "filterType": 0, "target": { "column": "Overduegrenze (Tage)", "table": "Overduegrenze (Tage)" }, "conditions": [ { "operator": "GreaterThan", "value": 5 } ], "logicalOperator": "And" } ] } }, { "selector": { "__type": "Selector_slicerTargetSelector:#cca", "$schema": "http://powerbi.com/product/schema#slicerTargetSelector", "target": { "column": "Overdue Wesentlichkeit", "table": "Overdue Wesentlichkeit" } }, "state": { "filters": [ { "__type": "FilterAdvanced:#cca", "$schema": "http://powerbi.com/product/schema#advanced", "filterType": 0, "target": { "column": "Overdue Wesentlichkeit", "table": "Overdue Wesentlichkeit" }, "conditions": [ { "operator": "GreaterThan", "value": 2000 } ], "logicalOperator": "And" } ] } } ], "filters": [], "settings": { "background": 1, "filterPaneEnabled": false, "navContentPaneEnabled": false, "layoutType": 1, "extensions": [ { "command": { "name": "export", "title": "command export", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAjdJREFUOE+lUG1PUnEc9TP0Ydq0NKVZ9sjESQIBAl4MlQgoQETHg6QiKIo8LXRBLtfKtTYpEVBQpwES6nTqF+hVzV64tV7o6e9tV03vm9aL87v7n52H3VMG4L/AStpLpi1r8Rm68/oj8+qTGTYNgwuEvWS8ZC+aMLUXQWw3BMOy+tt5zVmwkpac7iC2G0Rw0wNdRjXPpmFAH8d6J2xfDOgpPEVXTgvTiuYouhPE+LYPj1PUj7ZZ+ffWuHRf8UG0zxpgJebXey8wuRtGbCeE6E4AE9t+RLZ8CG0Mw7/uxljJBcn0AyJnCegu6PGKmI9b+wqdMC6poF+koM22kG8rtBklCRiE8E0DkbMEkKVhXFbDmbPQrbosBU1Gjo55KVRpMZRJIbylfqjjSvCid3F/vA63w7XEem5ETVqJ8KYX6oVmtKUleJQSoSUpgGyOD80ChcE1BwbydvTnrbgRqLkY0J5QILDhgSr1p1Ux14TmRCPEn3hoT8uJ0Qbn5x70EnBGq04DyNIgS8Oc0cFH/rUl2US3SmcbIPpYD0Gciz7SKn/3ELVj1b84I5W4NlRxGnBs9hPjKFlal1VhqPgc7rVeuAoOulWZFNOtxEybzoI+1IwEI2QkWYIPT9GJjjhFj8WduAXFtBiOVQtsK12o8V4lcpYA2XvhSetA3kGbGcHNAIeYzbAsGVDpKT/hGdBH/JYPwRQPjZNc1L+8g3uRup+M4Ppo1WH18JXDSnf5QYXr8leGZ/DX49+Bst9hj8Z3qIsn5QAAAABJRU5ErkJggg==", "extend": { "visualContextMenu": { "title": "Ergebnisexport" }, "visualOptionsMenu": { "title": "Ergebnisexport" } } } } ], "localeSettings": { "formatLocale": "de-DE", "language": "en-US" } } }Best regards
- v-evelk7 years agoMicrosoft Employee
Hello,
Do I correctly understand that this solution is sutable and your issue is solved or you still need my assitance?
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]