Forum Discussion
MicrosoftUser42
1 year agoFrequent Visitor
PowerBI setSlicerState fails to set Hierarchy Slicer when executed through Python (JavaScript API)
I have a JSON with multiple reports configurations, each item has a slicers key, which again contains multiple slicer definitions that look like this: "slicers": [
{
"slicer_filter": {
...
- 1 year ago
Excuse me I was not using the latest version of powerbi-client. Since hierarchy slicers have only been added in a later release, the target of the slicer was reported incorrectly to the API.
Using the latest stable version of powerbi-client fixed the issue:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/powerbi.min.js"></script>
MicrosoftUser42
1 year agoFrequent Visitor
Excuse me I was not using the latest version of powerbi-client. Since hierarchy slicers have only been added in a later release, the target of the slicer was reported incorrectly to the API.
Using the latest stable version of powerbi-client fixed the issue:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/powerbi.min.js"></script>