19. Bookmarks, Selection Pane, Buttons and Navigation
19.4 Pattern 1: Toggle Between Chart and Table View
Steps in Power BI
- Build a bar chart Chart_OrdersByCity and a table Table_OrdersByCity with the same fields. Place them exactly on top of each other (same size and position in General › Properties).
- Insert two buttons (Insert › Buttons › Blank) with icons or text "Chart" and "Table".
- In the Selection pane: show the chart, hide the table. Bookmarks › Add › rename View – Chart.
- Hide the chart, show the table › Add › rename View – Table.
- For both bookmarks: … › untick Data (so slicers are not reset) › keep Display ticked. Choose Selected visuals and select only the chart and table before clicking Update, so other visuals are not affected.
- Select the Chart button › Format button › Action On › Type Bookmark › Bookmark View – Chart. Do the same for the Table button with View – Table.
- Test with Ctrl + click in Desktop.
Ha pattern interview portfolio madhe dakhavnyasathi ekdum chhan aahe. Swatah banvun bagha.
Ravindra Bagale's Tip
Friends, don't make a mistake here: a common mistake with the chart/table toggle is that the two visuals don't use the same fields and filters, so they show different numbers. Build one visual, copy it and change the type, and apply the same visual-level filters. Put both in the same position so the switch looks smooth. This matters for both exams and interviews.
Ravindra Bagale's Tip – मराठी
मित्रांनो, इथे चूक करू नका: chart/table toggle मधली common चूक म्हणजे दोन्ही visuals सारखे fields आणि filters वापरत नाहीत, त्यामुळे ते वेगवेगळे numbers दाखवतात. एक visual बनवा, त्याची copy करून type बदला, आणि तेच visual-level filters लावा. दोन्ही एकाच जागी ठेवा म्हणजे switch सहज दिसेल. हे exam आणि interview दोन्हीसाठी important आहे.
Ravindra Bagale's Tip – हिंदी
दोस्तों, यहाँ गलती मत करना: chart/table toggle की common गलती है कि दोनों visuals एक जैसे fields और filters इस्तेमाल नहीं करते, इसलिए अलग-अलग numbers दिखाते हैं. एक visual बनाओ, उसे copy करके type बदलो, और वही visual-level filters लगाओ. दोनों को एक ही जगह रखो ताकि switch smooth दिखे. यह exam और interview दोनों के लिए ज़रूरी है.