Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
bmar
New Member

Next and Previous Buttons To Navigate Through a Single Select Slicer

Hi everyone

I have a single - select drop down menu, but the drop down has ~1500 names, it's not user friendly to go to the next person. I'd like to include a next and previous button . I have created an index column to use +1/-1 to navigate through my list.

I have separate cards and a table that provides the current name, next name, and previous name, all currently showing the data correctly as I select random names in my drop down (in other words I have the correct DAX statements)

 

I attempted to do this with bookmarks - but because there are so many names and bookmarks are static, this is not a great avenue.

 

I attempted to do this with page navigation but it doesn't leverage the logic from my measures or calculated columns. It works in the sense that it toggles between previously tested names.

 

I am now attempting to click on the name from the table in hopes that the next/previous name may update the slicer

Has anyone come across this exercise before?

2 REPLIES 2
rajasaadk_98
Helper I
Helper I

What you're trying to achieve with a "Next" and "Previous" button functionality for a dropdown with 1500 names can be done using DAX measures and Power BI's visual interactivity, but there isn't a direct way to modify a slicer selection via buttons. However, you can create a navigation mechanism that updates your report visuals without directly modifying the slicer itself.

Here’s a possible approach:

1. Create an Index Column for Navigation

You've already created an index column, which is great! This will be used to navigate between names.

For example:

  • Name Table:Name Index
    Alice1
    Bob2
    Charlie3

2. DAX Measures for Current, Next, and Previous Names

You'll need DAX measures to determine the current, next, and previous names based on the selected name. You might already have this part working, but here’s how you can structure it:

  • Current Name:

    DAX
    Copy code
    SelectedName = SELECTEDVALUE('Names'[Name])
  • Next Name:

    DAX
    Copy code
    NextName = CALCULATE( MIN('Names'[Name]), FILTER( 'Names', 'Names'[Index] > SELECTEDVALUE('Names'[Index]) ) )
  • Previous Name:

    DAX
    Copy code
    PreviousName = CALCULATE( MAX('Names'[Name]), FILTER( 'Names', 'Names'[Index] < SELECTEDVALUE('Names'[Index]) ) )

3. Create Buttons for "Next" and "Previous"

Power BI doesn't have native "Next" or "Previous" buttons that manipulate slicers, but you can simulate the behavior using Bookmarks, DAX measures, and Selection Pane:

  • Next Button:

    • Create a button that uses a DAX measure to calculate the Next Name.
    • Use a conditional formatting rule or set up a custom visual to show the next name when this button is clicked.

    You won't be able to directly change the slicer’s selection, but you can dynamically update visuals (e.g., Cards, Tables) that display the next name.

  • Previous Button:

    • Similar to the Next Button, create a button for the Previous Name using the DAX measure from above.

4. Displaying the Names in Visuals

Rather than trying to directly interact with the slicer, you can have visuals (such as cards or tables) display the current, next, and previous names based on the measures. Clicking "Next" and "Previous" buttons can update these visuals.

5. Use Dynamic Filters or Custom Visuals

If you need more interactivity and flexibility, consider using a custom visual, such as a table or slicer visual that supports more advanced interactions. You could dynamically filter the data based on the measures for current, next, and previous names and update the report content accordingly.

6. Power BI Visual Customizations

Here’s a way to create visual buttons with a conditional action:

  • Place the "Next" and "Previous" buttons in your report.
  • Link these buttons to trigger changes in your visuals, rather than directly manipulating the slicer.
  • Use card visuals to display the names and dynamically change them based on button clicks.

Important Note:

Power BI doesn't support directly modifying slicer selections programmatically, so the most feasible way is to build your navigation system through measures and interact with the visuals via buttons and DAX logic.

Summary:

  • Use your index column and DAX measures to determine the current, next, and previous names.
  • Instead of modifying the slicer, create card visuals or tables that display the names dynamically.
  • Implement Next and Previous buttons with DAX logic to update your report visuals accordingly.

This approach gives the user a similar experience as navigating through names using buttons without needing to interact with the slicer directly.

Hi, I know this is an older post, but I'm replying hoping I can get some clarity on the solution above. I'm trying to add PREV / NEXT buttons to move to the next row of the data table in my visual. I've completed Step 2 and created the DAX measures, but I can't figure out how to format the button to trigger these measures. Could you expand on Step 3? Thank you so much!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors