Forum Discussion
Remove rows based on the button click
- 2 years ago
I have tried a work around with creating a calculated column with fileds to show unassigned and not unassigned and filter on the visual to show the appropriate check box in order to filter the resource names. Thank yo very much for your detailed steps
To achieve this in Power BI, you can use a combination of measures, buttons, and bookmarks. Here's a step-by-step guide:
Create a Measure to Identify Specialist Data:
- Open Power BI Desktop and go to the "Model" view.
- Create a new measure that identifies the rows you want to hide. For example:
IsSpecialist = IF(SEARCH("* Specialist", 'Resource'[Resource Name], 1, 0) > 0, 1, 0)
- This measure will return 1 for rows where the Resource Name starts with "* Specialist" and 0 otherwise.
Create a Button to Hide Specialist Data:
- Go to the "Home" tab, click on "Buttons," and select a button type (e.g., blank button).
- In the "Visualization" pane, add the "IsSpecialist" measure to the "Values" field well of the button to make it interactive.
- Set the button text to "Clear Specialist Data."
Create a Bookmark to Hide Specialist Data:
- Go to the "View" tab and open the "Bookmarks" pane.
- Create a new bookmark (e.g., "Hide Specialist Data") and set the state of the "IsSpecialist" measure to 1.
Create a Button to Show All Data:
- Add another button for showing all data, and set the button text to "Show All Data."
Create a Bookmark to Show All Data:
- Create a new bookmark (e.g., "Show All Data") and set the state of the "IsSpecialist" measure to 0.
Add Actions to Buttons:
- Select the "Clear Specialist Data" button, go to the "Format" pane, and under the "Action" section, select "Bookmark" and choose the "Hide Specialist Data" bookmark.
- Similarly, set the "Show All Data" button's action to the "Show All Data" bookmark.
Test Your Buttons:
- Go to the "View" tab and click on the "Data" view.
- Test your buttons to ensure they hide and show the data based on the specified conditions.
Add Buttons to All Pages:
- Ensure that the buttons and measures are present on all pages of your report.
By following these steps, you should be able to create a paginated report in Power BI with buttons that allow end-users to easily hide and show data based on your specified conditions.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.