Skip to main content

Hi all,

 

I created some bar charts using a parameter to allow the user to switch between different measures: Income, Profit and Sales. This work great but i want to make it easier for users to see and switch between these options. Right now, they are just radio buttons in a vertical list in the filter section of the dashboard.

 

What I'd like is to create a nice filter with icons and display that above the charts as a horizontal list (i know that would require custom shapes which i have). Or at least be able to show the current radio buttons horizontally.

 

But I can't seem to find a way to do this. The values for the parameters don't exist in the datasource rows as they are used for the measures in a calculated field and everything i found online seems to require the parameter values to exist as values in a column of the data, such as in this (rather old) post: https://community.tableau.com/s/question/0D54T00000C6jgUSAR/parameter-single-value-selection-in-to-horizontal-line?t=1679495336570

 

My calculated field used in the bar charts is:

IF [Parameter] = 'Income' THEN SUM([Total Amount])

ELSEIF [Parameter] = 'Profit' THEN SUM([Profit Amount])

ELSEIF [Parameter] = 'Sales' THEN COUNT([Order ID])

END

 

Am i missing something obvious or is this not possible?

 

Thank you very much!

4 Antworten
  1. 22. März 2023, 15:14

    @Alex Tamasan​ 

    Hi, in this case open a notepad and create a few lines like:

    //Income

    MIN(1)

     

    //Profit

    MIN(1)

     

    //Sales

    MIN(1)

    Then, create a new sheet, copy lines 1 and 2 at the same time, double clic in the columns shelf and paste the text. Do the same for lines 4 and 5, and for lines 7 and 8.

     

    Once you have create your three pills, drag measure names to the shape and to the label. You should get something like:

     

    @Alex Tamasan​ Hi, in this case open a notepad and create a few lines like://IncomeMIN(1) //ProfitMIN(1) //SalesMIN(1)Then, create a new sheet, copy lines 1 and 2 at the same time, double clic in the 

    Finally you can create a Dashboard with a Parameter Action:

    imageAttached you will find my example with SuperStore.

     

    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