Parameters are a feature which allows the user to put a value in that changes the data they see or what the chart shows and are used to give the user more control over what they are seeing.
Instead of having 10 charts to show 10 different scenarios, one chart with a parameter would be sufficient to let the user decide what values they would like to see, thus making the dashboard interactive and cleaner.
Parameters in Tableau Desktop
In Tableau Desktop, a parameter is a workbook variable that replaces a constant value in a calculation, filter, or reference line. Parameters can be:
- Numbers
- Dates
- Strings
In order to use parameters in Tableau Desktop, you must:
- Create the initial parameter.
- Use the parameter in an element (calculation, filter, reference line, etc.) to connect it to the data.
- Input the parameter and adjust the parameter value.
Creating a parameter in Tableau Desktop
Using the parameter
In the videos above, a parameter is used to select a specific Sub-Category and the chart changes to highlight the selected Sub-Category in a different color.
Parameters in Power BI
- Create the parameter.
- Click on the 'Modeling' Tab.
- Click the 'New Parameter' button and select 'Fields' from the dropdown menu.
- In the pop-up window, add in details:
- Name
- Fields
- Check the box for 'Add slicer to this page'
- Click 'Create'
- Use the parameter in a chart
Creating a parameter in Power BI
In Power BI, the parameter is used to switch between different fields (Category vs. Sub-Category), not individual rows in the Sub-Category field ('Chairs', 'Phones', 'Storage', etc.)
Data used:
Superstore Sales data
https://public.tableau.com/app/sample-data/sample_-_superstore.xls
