Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want to add a button to my report that will filter out any rows on the report where the column titled "Active" = "No." How can I do this? I've tried with bookmarks but it doesn't seem to work...
Thankyou, @MasonMA, @Nasif_Azam, for your response.
Hi LJL123,
We appreciate your query posted on the Microsoft Fabric Community Forum.
Based on my understanding of the issue, please find attached screenshots and a sample PBIX file demonstrating the use of bookmark based buttons to toggle a slicer filter that hides rows where the Active column is set to “No.” We have utilized two buttons with bookmarks to toggle the slicer selection on the Active column for “Yes” and “All,” which dynamically show or hide rows according to the user’s selection.
We hope that the information provided will help resolve the issue. Should you have any further questions, please do not hesitate to reach out to the Microsoft Fabric Community.
Thank you.
Hey ,Bookmarks only store the state of visuals, including slicer selections, but can’t directly filter rows based on a column’s value unless paired with a slicer or another filtering mechanism. Try the following approach using a DAX measure and a button to toggle the filter:
Create a new table for filter control:
ActiveFilter = DATATABLE("Show Active Only", STRING, {{"Yes"}, {"All"}})
Create a slicer on your report using the ActiveFilter[Show Active Only] column.
Create a DAX measure to control visibility:
ShowRows =
VAR SelectedValue = SELECTEDVALUE('ActiveFilter'[Show Active Only], "All")
RETURN
IF(
SelectedValue = "Yes" && 'YourTable'[Active] = "No",
BLANK(),
1
)
Apply this measure as a visual-level filter to all visuals you want to control:
Set the filter to "ShowRows is 1".
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
Hi @LJL123
Not sure if I understand your question 100%, did you mean you have column/field in a table whose name is "Active" as in below picture and you would want to add button to filter out the rows that are 'No'?
If this is what you are looking for, consider using 'Button Slicer'.
Hope this helps:)
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
1 |
User | Count |
---|---|
9 | |
4 | |
4 | |
3 | |
3 |