The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am trying to getr a pie chart to switch or toggle. When a user selects one "Type" in a slicer, the pie should show "Sub-type". When they select "ALL", the pie should show "Type". The reason for this toggle is because there are too many sub-types when "ALL" is selected. Below link to a dummy re-creation - my method to do this was a distinct count of type. So when "All" is selected the count is >1, but it does not work!
Any ideas how to do this please, or where I went wrong in file below?
thanks
https://www.dropbox.com/s/rzn35c28jqufiv1/pie%20toggle%20example.pbix?dl=0
Solved! Go to Solution.
@DavidWaters100 you should use bookmarks to achieve this
https://www.youtube.com/watch?v=_Afcj8mT5_Q
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
"Type" and "Sub-type" are different dim fields, Slicer is just used to filter data, it could not switch between different dim field in a visual.
So as a workaround, you could unpivot "Type" and "Sub-type"column into one column, then use that column in a visual and use attribute column as a slicer to switch it.
https://radacad.com/pivot-and-unpivot-with-power-bi
Regards,
Lin
Thanks for your comments and replies. In the end I decided to duplicate my sheet and add a button to navigate to that duplicated sheet where "All" was pre-selected and the "Type" pie was showing. I added another button to return to the other sheet where user can choose a Type but not "All" - in this sheet the pie for "Sub-Type" is showing. Bit of a workaround but user just clicks on an "All" button or goes back to choose different Types, and the pie appears to switch like that.
@DavidWaters100you can achieve the desired result by using unpivot feature in power query window. In this way, you will have 3 columns one column which has numeric value, second column which will have main or sub-filter value, and 3rd column which will have all filter values. Below is the screenshot for your reference.
Proud to be a Super User!
@DavidWaters100 , refer if this can help
Dynamically change chart axis in Power BI
https://www.youtube.com/watch?v=6jeSIRpjv0M
@DavidWaters100 you should use bookmarks to achieve this
https://www.youtube.com/watch?v=_Afcj8mT5_Q
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.