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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
JagadishNallami
Frequent Visitor

"Select All" option is not setting SlicerState filters in PowerBi JS API

Hi there,

 

I am working on a embedded PowerBi report. I have a requirement to get the selected values from the slicer. I am able to get the data when any of the oprions are selected through getSlicerState method provided by JS api. However, when I click "Select all", I didn't see any data in the filters returned from getSlicerState method. Due to this I am unable to determine if user has selected all or none. It is basically seems same in PowerBi JS api. But I need to find out if "Select All" is selected.

 

Please let me know if any way to find this through PowerBi JS api

 

I am using powerbi-client v2.22.4

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @JagadishNallami ,

 

Selecting "Select All" in the slicer is equivalent to not applying any filter at all, it returns an empty filter and may not return all the individual items in the slicer state.

 

Check the following links to see if they help you:

Solved: Set Slicer selection to "All" via setSlicerState A... - Microsoft Fabric Community

powerbi - getSlicerState() is not working for SelectAll option - Stack Overflow

www.onexception.dev

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @JagadishNallami ,

 

Selecting "Select All" in the slicer is equivalent to not applying any filter at all, it returns an empty filter and may not return all the individual items in the slicer state.

 

Check the following links to see if they help you:

Solved: Set Slicer selection to "All" via setSlicerState A... - Microsoft Fabric Community

powerbi - getSlicerState() is not working for SelectAll option - Stack Overflow

www.onexception.dev

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for the response @v-yangliu-msft. It seems we don't have a api to find out. I will check if any workaround is there based on events.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors