Skip to main content

"I'm working on a Tableau project where I require a toggle-like parameter selection. The toggle button should offer options for 'Logged-In User' and 'All Users'. The default selection should be 'Logged-In User', which will capture the USERNAME information to filter the data specifically for that user. Users can toggle the parameter to 'All Users', which will switch the entire dashboard to display information for all users. The challenge lies in creating a parameter that acts as a toggle button which will filter the data for specific user and for all users. I'm seeking assistance in implementing this feature within Tableau. Can someone please help.

4 answers
  1. Oct 31, 2023, 8:15 PM

    @Eshwar A​ 

    Hi, my error:

    a. Let's use a boolean parameter for this:

    @Eshwar A​ Hi, my error: a. Let's use a boolean parameter for this:b. Create a calculated field to use as Filter, deploy in the filter shelf in the sheets you may need.b. Create a calculated field to use as Filter, deploy in the filter shelf in the sheets you may need.

    IF [Toggle Parameter] THEN TRUE

    ELSE USERNAME()=[User Id]

    END

    c. Add Custom shapes for toggle button (You may right clic on the images and save the images in a folder under your repository/shapes directory)

    https://www.tableau.com/drive/custom-shapes

    OffOnd. Create Calculated fields:

    imagee. Create your toggle workshee, and assign the custom shapes:

    imagef. Create Dashboard Actions (Dashboard Menu -> Actions):

    imageAttached you will find an example of toggle button.

     

    If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    Regards,

     

    Diego Martinez

    Tableau Visionary and Forums Ambassador

0/9000