Power BI: creating Clear and Apply buttons instruction
Step-by-step instruction for Clear button creation:
- Insert a blank button: Go to the "Insert" tab, click on "Buttons," and select a blank button.
- Customize the button: Adjust the formatting of the button to your preference.
- Add a bookmark action: Open the bookmarks panel and the selection panel on the view. Organize your slices into different categories.
- Create a bookmark: Double-click on the bookmark area, name it (e.g., "Reset Slices"), and configure the settings. Choose to capture only the data state and selected visuals.
- Clear all slices: Check if all slices are cleared. If not, select the slicer groups or individual slices that you want to clear, then update the bookmark.
- Link the bookmark to the button: Select the button, go to the "Action" tab, and choose the bookmark action you created (e.g., "Reset Slices").
- Test the bookmark: Verify that the button clears all slices when clicked.
- Alternative method for clear all slices button: Delete the previous button and go to "Insert" > "Buttons." Select the "Clear all slices" button and customize its formatting as desired.
- Test the new clear all slices button: Make a selection from the slices, then hold the control key and click on the new button to clear all visible slices.
- Customize the button text: Access the formatting options for the button, go to the "Style" tab, and modify the text to your liking (e.g., "Clear Slices").
- Apply all slices button: Optionally, create another button called "Apply all slices" using the same steps as in the previous instruction.
Step-by-step instruction for Apply button creation:
- Insert the apply all slices button: Go to the "Insert" tab, click on "Buttons," and select the "Apply all slices" button. Drag it to the bottom of the slicer panel.
- Customize the button appearance: Adjust the height of the slicer groups to 250. Resize the apply all slices button to your desired dimensions. Change the button shape to a pill shape for consistency.
- Disabled state indication: When no selections have been made, the button should appear disabled. This is indicated by a clock icon in the header and the absence of filters in the filter section.
- Make selections: Make slicer selections, such as choosing a class or subcategory. The clock icon and the absence of applied filters indicate that the selections have not been applied yet.
- Apply all slices: Once all selections are made, click on the apply all slices button to apply the slices and run the necessary queries.
- Visibility and selection interaction: Note that when you make slices invisible or visible, your selection may be undone. For example, switching between economy and location might clear the selection. Be aware of this behavior.
- Refining the design: To improve the aesthetics, consider making some design tweaks. For example, you can set a white background for the slicer panels and reduce the rounding of the corners. These simple changes can give a cleaner and more modern appearance.
- Disabled state customization for apply all slices button: When the apply all slices button is in the disabled state, you may choose to hide it completely. To do this, select the button, go to the disabled state, and customize the style properties. Set the font color and fill color to white, matching the background color, so that the button becomes invisible when disabled.
- Disabled state for clear all slices button: Similarly, you may want to customize the disabled state for the clear all slices button. However, in this case, the disabled state would be when there are no slices to be cleared. Unfortunately, if the disabled state customization does not work as expected, you can skip this step.
- Update button texts: Modify the button texts to improve clarity. For example, change the apply all slices button text to "Apply," and the clear all slices button text to "Reset" or any other suitable label.
- Enhancing interaction options: Consider providing users with the ability to switch between applying all slices at the end of selection or applying them instantly. This functionality may require further exploration and is not covered in the given instructions.
- Finalize the redesigned slicer panel: Review and ensure that all the changes, including the button customizations and any additional enhancements, are applied correctly.
Комментарии
Отправить комментарий