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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Muesli
Advocate I
Advocate I

Unable to getSlicerState from Tuple Slicer (Uncaught TypeError)

Hello,

 

i am trying to get the SlicerState from a Tuple-Slicer so that i can store the user-selection.

 

when child elements are selected and also top/fahter-level elements (check screenshot) the powerbi-client will thrown an error.

 

2020-07-20 14_10_43-Markt und Wettbewerb Test.png

 

i am not able to read the current slicer state, what can i do/try?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Muesli 

Looks like the native hierarchy slicer is not supported for use with 'GetSlicerState' yet.
https://github.com/microsoft/PowerBI-JavaScript/wiki/Slicers

 

I am not aware of any workaround - so you might have to settle for another slicer type.
Cheers, Matt

View solution in original post

4 REPLIES 4
brnyza
Regular Visitor

I'm getting the same error "get and set slicer state are not supported for hierarchy slicer".
PowerBI still doesn't have a workaround?

Nope.  The latest news I got a few weeks ago from the Power BI support team: it is on the backlog of the product team, but no ETA can be given... 🙂

Piloos
Advocate I
Advocate I

For some reason, it does return tuple in rare occassion.  But this is not consistent, usually it throws the error...

 

Below is the result of getSlicerState() that I sometimes get...

state: {
filters: [
{"$schema":"http://powerbi.com/product/schema#tuple","filterType":6,"operator":"In","target":[{"column":"FinancialYear","table":"Fact_TransactionLines"},{"column":"FinancialYearPeriod","table":"Fact_TransactionLines"}],"values":[[{"value":"2021"},{"value":"2021-P01"}],[{"value":"2021"},{"value":"2021-P02"}]]}
], 
targets: [
{"column":"FinancialYear","table":"Fact_TransactionLines"}
]
}, 

 

Additional links:

https://community.powerbi.com/t5/Issues/getSlicerState-error/idc-p/1692319#M64661

https://community.powerbi.com/t5/Issues/getSlicerState-not-working-for-slicers-with-hierarchy/idi-p/...

https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-slicers#limitations

 

Once I have more info, I 'll let you know.

Anonymous
Not applicable

Hi @Muesli 

Looks like the native hierarchy slicer is not supported for use with 'GetSlicerState' yet.
https://github.com/microsoft/PowerBI-JavaScript/wiki/Slicers

 

I am not aware of any workaround - so you might have to settle for another slicer type.
Cheers, Matt

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.