

# Working with interactive sheets in Amazon Quick Sight


An *Interactive Sheet* is a collection of data expressed in visuals that users can interact with when the sheet is published to a dashboard. Amazon Quick authors can add different layouts, controls, and filters to their interactive sheets that dashboard viewers can use to gain detailed information from the published data. By default, every sheet in an analysis is an interactive sheet. If your account doesn't have the **Pixel perfect reporting Add-on**, you can only create and publish interactive sheets.

For more information on creating an interactive sheet, see [Starting an analysis in Quick Sight](creating-an-analysis.md).

For more information on formatting interactive sheets, see the following topics.

**Topics**
+ [

# Customizing dashboard layouts in Amazon Quick Sight
](customizing-dashboards-and-visuals.md)
+ [

# Parameters in Amazon Quick
](parameters-in-quicksight.md)
+ [

# Using custom actions for filtering and navigating
](quicksight-actions.md)

# Customizing dashboard layouts in Amazon Quick Sight
Customizing dashboard layouts

You can customize a dashboard's layout to organize your data to fit your business requirements. You can choose from three dashboard layouts. You can also change the size, background color, border color, and interactions of a visual to create a fully customized dashboard.

Use the following topics to learn more about customizing dashboards and visuals.

**Topics**
+ [

# Types of layout
](types-of-layout.md)
+ [

# Choosing a layout
](choosing-a-layout.md)
+ [

# Customizing visuals in a free-form layout
](customizing-visuals-in-free-form.md)
+ [

# Conditional rules
](conditional-rules.md)

# Types of layout


There are three dashboard layout designs you can choose from: **Tiled**, **Free-form**, and **Classic**.

## Tiled layout


Visuals in a **Tiled** layout snap to a grid with standard spacing and alignment. You can make visuals any size and place them wherever you want within a dashboard, but visuals can’t overlap. 

![\[alt text not found\]](http://docs.amazonaws.cn/en_us/quick/latest/userguide/images/fixed-layouts-tiled-demo.gif)


Dashboards are displayed as designed, with options to fit to screen or view at actual size. You can also fit an entire dashboard to your window by choosing **Fit to window** for **View** in the top-right corner. This option was previously called **Optimized**.

**Note**  
On mobile devices, tiled layout dashboards appear as a single column in portrait mode or exactly as designed in landscape mode. 

## Free-form layout


Visuals in a **Free-form** layout can be placed anywhere in your dashboard using precise coordinates. You can drag a visual to the exact place you want, or you can enter the coordinates of the visual’s location. Use the following procedure to enter the exact coordinates of the visual's location.

![\[alt text not found\]](http://docs.amazonaws.cn/en_us/quick/latest/userguide/images/fixed-layouts-freeform-placement1.gif)


Dashboards are displayed the way that you choose to design them, with options to fit to screen or to view at its actual size. You can optimize free-form layouts for viewing at specific resolutions, with the default being 1,600 pixels. You can also fit an entire dashboard to a browser's window by choosing **Fit to window** for **View** in the top-right corner.

**Note**  
Dashboards with optimized resolutions might appear bigger or smaller on a viewer's computer if the viewer's computer resolution doesn't equal the set resolution of the dashboard.   
Switching from **Free-form** to another layout might cause some visual elements to shift.  
On mobile devices, **Free-form** dashboards appear as published with no changes to the layout.

## Classic layout


Visuals in a **Classic** layout snap to a grid with standard spacing and alignment. Dashboards hide data or change formatting to fit smaller screen sizes. For example, if you change a visual to make it considerably smaller, the on-visual menu and editors are hidden so that the chart elements have more room to display. Bar chart visuals can also display fewer data points.

If you reduce the size of the browser window, Amazon Quick Sight resizes and if necessary reorders visuals for optimal display. For example, smaller visuals that were side by side might be displayed sequentially. The original layout is restored when the size of the browser window is increased again.

**Note**  
On mobile devices, classic layout dashboards appear as a single column or exactly as designed in landscape mode.

# Choosing a layout


**To change a dashboard's layout**

1. Open the [Quick console](https://quicksight.aws.amazon.com/).

1. From the Quick homepage, choose **Analyses**, and then choose the analysis that you want to change.

1. On the analysis page, choose **Edit** and then choose **Analysis Settings**.

1. Expand **Sheet layout** and choose the layout that you want to use.

1. When finished, choose **Apply**.

# Customizing visuals in a free-form layout


You can use the free-form layout to fully customize the color, size, location, and visibility of each visual in a dashboard.

## Organizing visuals


Besides dragging a visual to its preferred location within a dashboard, there are many different ways to move a visual to the exact location it needs to be.

**To enter the coordinates of the visual's location**

1. Choose the visual that you want.

1. On the menu in the upper-right corner of the visual, select the **Format visual** icon.

1. In the **Properties** pane that opens, choose **Placement**. 

1. Enter the **X** and **Y** coordinates of the location you want to place your visual. You can also adjust the size of the visual by entering **Width** and **Height** values. 

Selected visuals can also be moved pixel-by-pixel using your keyboard's arrow keys.

You can overlay visuals on top of one another to create multi-layered visuals that show data.

Visuals can be organized into multiple layers that can be manually moved to the front and back.

**To move overlaid visuals to the front and back**

1. Choose the visual that you want.

1. On the three-dot menu in the upper-right hand side of the visual, choose **Menu options**.

1. For **Menu options**, choose from the following:
   + **Send to back** sends the visual to the back.
   + **Send backward** sends the visual one layer back.
   + **Bring forward** rings the visual one layer forward.
   + **Bring to front** brings a visual to the front.

## Changing a visual's background color


The colors of a visual’s background, border, and selection frame can be customized in the **Display settings** pane of the **Properties** pane.

**To change the color of a visual's background, border, or selection frame**

1. Choose the visual that you want to change.

1. On the menu in the upper-right hand side of the visual, choose the **Properties** icon.

1. In the **Properties** pane that appears on the left, choose **Display settings**.

1. Navigate to the **Card style** section and perform one or more of the available actions:
   + To change the color of a visual's background, choose the **Background** color box, and then choose the color that you want.
   + To change the color of a visual's border, choose the **Border** color box, and then choose the color that you want.
   + To change the color of a visual's selection frame, choose the **Selection** color box, and then choose the color that you want.

   If you want to use a custom color for your visual's background, border, or selection frame, choose the color box of the property that you want to change, and then choose **Custom color**. In the **Custom color** window that appears, choose your custom color or enter the color's hexadecimal code. When you are finished, choose **Apply**.

You can also reset a visual's customized background back to its default appearance.

**To reset the appearance of a visual**

1. Choose the visual that you want to change.

1. On the menu in the upper-right hand side of the visual, choose the **Properties** icon.

1. In the **Properties** pane that appears on the left, choose **Display settings**.

1. Choose the color that you want to reset, and then choose **Reset to default**.

## Hiding visual backgrounds, borders, and selection colors


You can also choose not to show the background border, or selection color of a visual. This is useful for when you want to overlap multiple visuals. You can hide a visual’s background, border, and selection colors by choosing the eye icon next to the **Border**, **Background**, or **Selection** color boxes. You can also remove a visual’s loading animation by clearing the **Show loading animation** box. 

## Disabling visual menus


Use the **Interactions** panel of the **Properties** pane to hide the **Context** menu and **On-visual** menu from selected visuals. You can hide secondary visual menus to make the visual less crowded or to make a visual act like an overlay. 

The **Context** menu opens on data-point clicks. Common actions in the **Context menu** include **Focus**, **Exclude**, and **Drill-down**.

The **On-visual** menu appears on the top-right side of a visual. The **On-visual **menu is used to access the **Proeprties** pane, **Maximize** the visual, access the **Menu options** panel, and review an **Anomaly insight**.

You can turn off the secondary visual menus by clearing the **Context menu** and **On-visual menu** options.

**Note**  
You can't preview changes to the **Interactions** panel in **Analyses**. Publish the dashboard to view your changes.

# Conditional rules


This feature is currently available with the **Free-form** layout. Conditional rules are used to hide or show visuals when specific conditions are met. This can be useful when you have multiple versions of the same visual overlapped with each other and want the dashboard viewer to see a version that best represents the parameter value they select. 

Conditional rules use parameters and parameter controls to hide and show visuals. Parameters are named variables that can transfer a value for use by an action or an object. This feature supports string and number parameters. To make the parameters accessible to the dashboard viewer, you add a parameter control. A parameter control allows users to choose a value to use in a predefined filter or URL action. For more information about parameters and parameter controls, see [Parameters in Amazon Quick](parameters-in-quicksight.md).

Use the sections below to set up and use conditional rules.

**Topics**
+ [

# Hiding a visual by default
](hiding-a-visual-by-default.title.md)
+ [

# Setting a conditional rule
](setting-a-conditional-rule.title.md)
+ [

# Using conditional rules
](using-conditional-rules.md)

# Hiding a visual by default


In the **Interactions** pane of the **Properties** pane, you can choose to hide a visual by default. Doing this can be useful if you want the viewer to only see visuals based on specific conditions.

**To hide a visual by default**

1. From the Quick homepage, choose **Analyses**, and then choose the analysis that you want to customize.

1. Choose the visual that you want to add a rule to.

1. On the menu in the upper-right hand side of the visual, choose **Properties**.

1. In the **Properties** pane that opens, choose **Interactions** and open the **Rules** dropdown.

1. In the **Rules** menu, choose **Hide this visual by default**.

Hidden visuals appear fully hidden in a viewing dashboard. In the **Analyses** pane, hidden visuals are visible with the message “Hidden based on rule”. With this display, you can see where all of a dashboard's visuals are located.

**Note**  
You can't create conditional rules that hide visuals that are already hidden by default or that show visuals that already appear by default. If you change the default appearance of a visual, existing rules that contradict the new default appearance will be disabled.

# Setting a conditional rule


When you set up a conditional rule, you create a conditional statement that will hide or show a visual when a specific condition is met. You can currently create conditional rules that hide or show a visual. If you want to create a conditional rule that makes a hidden visual appear, choose **Hide this visual by default** in the **Rules** menu of the **Properties** pane. 

**Note**  
Before you begin, make a parameter and a corresponding parameter control to base your new conditional rule on. Supported parameters are string parameters and number parameters. For more information about parameters and parameter controls, see [Parameters in Amazon Quick](parameters-in-quicksight.md).

**To set a conditional rule**

1. From the Quick homepage, choose **Analyses**, and then choose the analysis you want to customize.

1. Choose the visual that you want to add a rule to.

1. On the menu in the upper-right hand side of the visual, choose **Properties**.

1. In the **Properties** pane that appears on the left, choose **Interactions**, and then choose **Rules**.

1. Choose **ADD RULE**.

1. In the first menu in the **Add rule** pane, choose the parameter you want.

1. In the second menu in the **Add rule** pane, choose which condition you want. For string parameters, supported conditions are **Equals**, **Starts with**, **Contains**, and **Does not equal**. For number parameters, supported conditions are **Equals**, **Starts with**, **Contains**, and **Does not equal**.

1. Enter the value you want the conditional rule to meet.
**Note**  
Values are case-sensitive.

1. Choose **Add rule** to apply the new conditional rule to the visual. To cancel the rule, choose **Cancel**.

Conditional rules can also be edited and deleted. 

**To edit a conditional rule**

1. On the menu in the upper-right hand side of the visual, choose **Properties**.

1. In the **Properties** pane that appears on the left, choose **Interactions**, and then choose **Rules**.

1. Choose the menu icon on the right-hand side of the rule you want to edit, and choose **Edit**.

1. Make the changes that you want and choose **Save**.

**To delete a conditional rule**

1. On the menu in the upper-right hand side of the visual, choose **Properties**.

1. In the **Properties** pane that appears on the left, choose **Interactions**, and then choose **Rules**.

1. Choose the menu icon on the right-hand side of the rule you want to edit and choose **Delete**.

# Using conditional rules


Once you have set up a conditional rule that is connected to a parameter and a parameter control, you can use the parameter control to enable or disable the conditional rules you have set. 

**To enable a conditional rule**

1. From the Quick homepage, choose **Analyses**, and then choose the analysis you want to customize.

1. On the **Controls** bar at the top of your workspace, choose the dropdown icon.

1. Choose the parameter control associated with the conditional rule you created.

1. Choose the value associated with the conditional rule that you created from the parameter's menu. You can also enter the value that you want into the **Search value** box.
**Note**  
Values are case-sensitive.

   Selecting the correct value causes the visual to appear or disappear depending on the rule you set.

You can also bring a parameter control to the sheet your visual is on. This is useful when you want a parameter control to be next to the visual it is associated with or when you want to add a conditional rule to the control so it appears only when specific conditions are met. 

**To bring a parameter control to a sheet**

1. From the Quick homepage, choose **Analyses**, and then choose the analysis you want to customize.

1. On the **Controls** bar at the top of your workspace, choose the control that you want to move.

1. At the upper right-hand side of the control, open the **Menu options** menu. 

1. Choose **Move to sheet**.

**To move a parameter control back to the Controls bar**

1. On your dashboard, select the parameter control you want to move. 

1. On the upper right-hand side of the control, open the **Menu options** menu. 

1. Choose **Move to top of sheet**. 

# Parameters in Amazon Quick
Parameters

*Parameters* are named variables that can transfer a value for use by an action or an object. By using parameters, you can create an easier way for a dashboard user to interact with dashboard features in a less technical way. Parameters can also connect one dashboard to another, allowing a dashboard user to drill down into data that's in a different analysis.

For example, a dashboard user can use a list to choose a value. That value sets a parameter that in turn sets a filter, calculation, or URL action to the chosen value. Then the visuals in the dashboard react to the user's choices. 

To make the parameters accessible to the dashboard viewer, you add a parameter control. You can set up cascading controls, so that a selection in one control filters the options that display in another control. A control can appear as a list of options, a slider, or a text entry area. If you don't create a control, you can still pass a value to your parameter in the dashboard URL.

For a parameter to work, it needs to be connected to something in your analysis, regardless of whether it has a related control. You can reference parameters in the following:
+ Calculated fields (except for multivalue parameters)
+ Filters
+ Dashboard and analysis URLs
+ Actions
+ Titles and descriptions throughout an analysis

Some ways that you can use parameters are the following:
+ Using a calculation, you can transform data that is shown in an analysis. 
+ If you add a control with a filter to an analysis you are publishing, the dashboard users can filter the data without creating their own filters.
+ Using controls and custom actions, you can let dashboard users set values for the URL actions. 

**Topics**
+ [

# Setting up parameters in Amazon Quick
](parameters-set-up.md)
+ [

# Using a control with a parameter in Amazon Quick
](parameters-controls.md)
+ [

# Creating parameter defaults in Amazon Quick
](parameters-default-values.md)
+ [

# Connecting to parameters in Amazon Quick
](parameters-connections.md)

# Setting up parameters in Amazon Quick
Setting up parameters

Use the following procedure to create or edit a basic parameter.

**To create or edit a basic parameter**

1. Choose an analysis to work with, then decide which field you want to parameterize.

1. Choose the **Parameters** icon from the icon list at the top of the page.

1. Add a new parameter by choosing the plus sign (**\$1 Add**) near the top of the pane.

   Edit an existing parameter by first choosing the `v`-shaped icon near the parameter name and then choosing **Edit parameter**. 

1. For **Name**, enter an alphanumeric value for the parameter.

1. For **Data type**, choose **String**, **Number**, **Integer**, or **Datetime**, and then complete the following steps.
   + If you choose **String**, **Number**, or **Integer**, do the following:

     1. For **Values**, choose **Single value** or **Multiple values**.

        Choose the single value option for parameters that can contain only one value. Choose multiple values for parameters that can contain one or more values. Multivalue parameters can't be `datetime` data types. They also don't support dynamic default values.

        To switch an existing parameter between single and multiple values, delete and recreate the parameter.

     1. (Optional) For **Static default value** or **Static multiple default values**, enter one or more values.

        This type of static value is used during the first page load if a dynamic default value or URL parameter isn't provided.

     1. (Optional) Choose **Show as blank by default**.

        Select this option to show the default value for multivalue lists as blank. This option only applies to multivalue parameters.
   + If you choose **Datetime**, do the following:

     1. For **Time granularity**, choose **Day**, **Hour**, **Minute**, or **Second**.

     1. For **Default date**, select either **Fixed date** or **Relative date**, and then do the following:
        + If you select **Fixed date**, enter a date and time by using the date and time picker.
        + If you select **Relative date**, choose a rolling date. You can choose **Today**, **Yesterday**, or you can specify the **Filter condition** (start of or end of), **Range** (this, previous, or next), and **Period** (year, quarter, month, week, or day).

1. (Optional) Choose **Set a dynamic default** to create a default that is user-specific.

   A *dynamic default* is a per-user default value for the first page load of the dashboard. Use a dynamic default to create a personalized view for each user.

   Calculated fields can't be used as dynamic defaults.

   Dynamic defaults don't prevent a user from selecting a different value. If you want to secure the data, you can add row-level locking. For more information, see [Using row-level security with user-based rules to restrict access to a datasetUsing user-based rules](restrict-access-to-a-data-set-using-row-level-security.md).

   This option only appears if you choose a single value parameter. Multivalue parameters can't have dynamic defaults.
**Note**  
If you choose a multivalue parameter, the screen changes to remove the default options. Instead, you see a box with the text **Enter values you want to use for this control**. You can enter multiple values in this box, each on a single line. These values are used as the default selected values in the parameter control. The values here are unioned with what you choose to enter for the parameter control. For more information on parameter controls, see [Parameter Controls](parameters-controls.md).

1. (Optional) Set a reserved value to determine the value of the **Select all** value. The *reserved value* of a parameter is the value that is assigned to a parameter when you choose **Select all** as its value. When you set up a specific reserved value for your parameter, that value is no longer considered a valid parameter value in your dataset. The reserved value can't be used in any *parameter consumers*, such as filters, controls, and calculated fields, and custom actions. Also, it does not appear in the parameter control list. You can choose from **Recommended value**, **Null**, and **Custom value**. **Recommended value** is the default. If you choose **Recommended value**, the reserved value is set to the following values based on the value type:
   + Strings: `"ALL_VALUES"`
   + Numbers: `"Long.MIN_VALUE"-9,223,372,036,854,775,808`
   + "Integers: `Int.MIN_VALUE"-2147483648`

   To set a reserved value in your new parameter, choose the **Advanced settings** dropdown list in either the **Create a new parameter** page or the **Edit parameter** page and select the value that you want.

1. Choose **Create** or **Update** to complete creating or updating the parameter.

After you create a parameter, you can use it in a variety of ways. You can create a control (such as a button) so that you can choose a value for your parameter. For more information, see the following sections.

# Using a control with a parameter in Amazon Quick
Parameter controls

In dashboards, parameter controls appear at the top of the data sheet, which contains a set of visuals. Providing a control allows users to choose a value to use in a predefined filter or URL action. Dashboard users can use controls to apply filtering across all visuals datasets on a dashboard, without having to create the filters themselves. 

The following rules apply:
+ To create or edit a control for a parameter, make sure that the parameter exists. 
+ Multiselect list controls are compatible with analysis URLs, dashboard URLs, custom actions, and custom filters. The filter must be either equal or not equal to the values provided. No other comparisons are supported. 
+ Lists show up to 1,000 values. If there are more than 1,000 distinct values, a search box appears so you can filter the list. When the filtered list contains less than 1,001 values, the contents of the list appear as line items.
+ The **Style** option displays only the style types that are appropriate for the parameter's data type and single or multivalue setting. If the style that you want to use isn't in the list, recreate your parameter with the appropriate settings and try again.
+ If your parameter links to a dataset field, it must be an actual field. Calculated fields aren't supported.
+ The values display alphabetically in the control, unless there are more than 1,000 distinct values. Then the control displays a search box instead. Each time you search for the value you want to use, it initiates a new query. If the results contain more than 1,000 values, you can scroll through the values with pagination. Wildcard search is supported. To learn more about wildcard search, see [Using wildcard search](search-filter.md#search-filter-wildcard).

Use the following procedure to create or edit a control for an existing parameter. 

**To create or edit a control for an existing parameter**

1. Choose an existing parameter's context menu, the `v` icon near the parameter name, and choose **Add control**.

1. Enter a name to give the new control a label. This label appears at the top of the workspace, and later at the top of the sheet that a dashboard displays on. 

1. Choose a style for the control from the following:
   + **Text field**

     A text field lets you type in their own value. A text field works with numbers and text (strings).
   + **Text field - multiline**

     A multiline text field lets you type in their own values. With this option, you can choose to separate values you enter into the parameter control by a line break, comma, pipe (\$1), or semicolon. A text field works with numbers and text (strings).
   + **Dropdown**

     A dropdown list control that you can use to select a single value. A list control works with numbers and text (strings). 
   + **Dropdown multiselect**

     A list control that you can use to select multiple values. A list control works with numbers and text (strings). 
   + **List**

     A list control that you can use to select a single value. A list control works with numbers and text (strings). 
   + **List - multiselect**

     A list control that you can use to select multiple values. A list control works with numbers and text (strings). 
   + **Slider**

     A slider lets you select a numeric value by sliding the control from one end of the bar to another. A slider works with numbers.
   + **Date-picker**

     Using a date-picker, you can choose a date from a calendar control. When you choose to add a date-picker control, you can customize how to format dates in the control. To do so, for **Date format**, enter the date format that you want using the tokens described in [Customizing date formats in Quick](format-visual-date-controls.md).

1. (Optional) If you choose a dropdown control, the screen expands so you can choose the values to display. You can either specify a list of values, or use a field in a dataset. Choose one of the following:
   + **Specific values**

     To create a list of specific values, type in one per line, with no separating spaces or commas, as shown in the following screenshot.

     In the control, the values display alphabetically, not in the order that you typed them.
   + **Link to a data set field**

     To link to a field, choose the dataset that contains your field, then choose the field from the list.

     If you change the default values in the parameter, choose **Reset** on the control to show the new values.

   The values that you choose here are unioned with the static default values in the parameter settings.

1. (Optional) Enable the option **Hide [ALL] option from the control if the parameter has a default configured**. Doing this shows only the data values and removes the option to select all items in the control. If you don't configure a static default on the parameter, this option doesn't work. You can add a default after adding a control by choosing the parameter, and selecting **Edit parameter**.

1. (Optional) You can limit the values displayed in the controls, so they only show values that are valid for what is selected in other controls. This is called a cascading control. 

   To create one, choose **Show relevant values only**. Choose one or more controls that can change what displays in this control. 

   When creating cascading controls, the following limitations apply.
   + Cascading controls must be tied to dataset columns from the same dataset.
   + The child control must be a dropdown or list control.
   + For parameter controls, the child control must be linked to a dataset column.
   + For filter controls, the child control must be linked to a filter (instead of showing only specific values).
   + The parent control must be one of the following.
     + A string, integer, or numeric parameter control.
     + A string filter control (EXCLUDING Top-Bottom filters).
     + A non-aggregated numeric filter control.
     + A date filter control (EXCLUDING Top-Bottom filters).

1. When you finish choosing options for your control, choose **Add**.

The finished control appears at the top of the workspace. The context menu, shaped like a `v`, offers four options:
+ **Reset** restores the user's selection to its default state.
+ **Refresh list** applies only to drop-downs that are linked to a field in a dataset. Choosing **Refresh list** queries the data to check for changes. Data used in the control is cached.
+ **Edit** reopens the control creation screen so that you can change your settings.

  Once you have the **Edit control** pane open, you can click on different visuals and controls to view formatting data for the specific visual or control. For more information about formatting a visual, see [Formatting in Amazon Quick](formatting-a-visual.md).
+ **Delete** removes the control. You can recreate it by choosing the parameter context menu.

In the workspace, you can also resize and rearrange your controls. The dashboard users see them as you do, except without being able to edit or delete them.

# Creating parameter defaults in Amazon Quick
Parameter defaults

Use this section to learn more about the types of parameter defaults that are available, and how to set up each of them. 

Each field can have a parameter and a control associated with it. When someone views a dashboard or email report, any sheet control that has a static default value configured uses the static default. The default value can change how data is filtered, how custom actions behave, and what text displays in a dynamic sheet title. Email reports also support dynamic defaults. 

The simplest default is a static (unchanging) default, which shows the same value to everyone. As the designer of the dashboard, you choose the default value. It can't be changed by the person using the dashboard. However, that person can choose any value from the controls. Setting a default doesn't change this. To restrict the values that a person can select, consider using row-level security. For more information, see [Using row-level security with user-based rules to restrict access to a datasetUsing user-based rules](restrict-access-to-a-data-set-using-row-level-security.md). 

**To create or edit a static default value that applies to everyone's dashboard view**

1. Choose the context menu (`v`) by the parameter that you want to edit, or create a new parameter by following the steps in [Setting up parameters in Amazon Quick](parameters-set-up.md). 

1. Enter a value for **Static default value** to set a static default. 

To display a different default depending on who is viewing the dashboard, you create a dynamic default parameter (DDP). Using dynamic defaults involves some preparation to map people to their assigned defaults. First, you need to create a database query or a data file that contains information about the people, the fields, and the default values to display. You add this to a dataset, then add the dataset to your analysis. Following, you can find procedures that you can use to gather information, create the dataset, and add the dynamic default to the parameter.

Use the following guidelines when creating a dataset for dynamic default values:
+ We recommend that you use a single dataset to contain all dynamic default definitions for a logical grouping of users or groups. If you can, maintain them in a single table or file. 
+ We also recommend that the fields in your dataset have names that closely match the field names in the analysis. Not all dataset fields need to be part of the analysis, for example if you're using the same dataset for the defaults in multiple dashboards. The fields can be in any order. 
+ We don't recommend that you combine both user and group names in the same column or even in the same dataset. This kind of configuration is more work to maintain and troubleshoot. 
+ If you use a comma-delimited file to create your dataset, make sure to remove any space between values in the file. The following example shows the correct comma-separated value (CSV) format. Enclose text (strings) that include nonalphanumeric characters—like spaces, apostrophes, and so on—in single or double quotation marks. You can enclose fields that are dates or times in quotation marks, but it isn't required. You can enclose numeric fields in quotation marks, for example if the numbers contain special characters, as shown following. 

  ```
  "Value includes spaces","Field contains ' other characters",12345.6789,"20200808"
  ValueWithoutSpaces,"1000,67","Value 3",2020-AUG-08
  ```
+ After you create the dataset, make sure to double-check the data types that Quick selects for the fields.

Before you begin, you need a list of the user or group names for the people who are going to have dynamic defaults. To generate a list of users or groups, you can use the Amazon CLI to get the information. To run CLI commands, make sure that you have the Amazon CLI installed and configured. For more information, see [Installing the Amazon CLI](https://docs.amazonaws.cn/cli/latest/userguide/cli-chap-install.html) in the *Amazon CLI User Guide*. 

This is just one example of how to get a list of user or group names. Use whatever method works best for you.

**To identify people for a dynamic default parameter (DDP)**
+ List either individual user names or group names:
  + To list individual user names, include a column that identifies the people for your DDP. This column should contain each person's system user name that they use to connect from your identity provider to Quick. This user name is often the same as a person's email alias before the @ sign, but not always. 

    To get a list of users, use the [ListUsers](https://docs.amazonaws.cn/quicksight/latest/APIReference/API_ListUsers.html) Quick API operation or Amazon CLI command. The CLI command is shown in the following example. Specify the Amazon Web Services Region for your identity provider, for example `us-east-1`.

    ```
    awsacct1="111111111111"
    namespace="default"
    region="us-east-1"
    
    aws quicksight list-users --aws-account-id $awsacct1 --namespace $namespace --region $region
    ```

    The following example alters the previous command by adding a query that limits the results to active users.

    ```
    awsacct1="111111111111"
    namespace="default"
    region="us-east-1"
    
    aws quicksight list-users --aws-account-id $awsacct1 --namespace $namespace --region $region --query 'UserList[?Active==`true`]'
    ```

    The result set looks similar to the following sample. This example is an excerpt from JSON output (`--output json`). People who have federated user names have principal IDs that start with the word `federated`.

    ```
    [
        {
            "Arn": "arn:aws-cn:quicksight:us-east-1:111111111111:user/default/anacasilva",
            "UserName": "anacarolinasilva",
            "Email": "anacasilva@example.com",
            "Role": "ADMIN",
            "Active": true,
            "PrincipalId": "federated/iam/AIDAJ64EIEIOPX5CEIEIO"
        },
        {
            "Arn": "arn:aws-cn:quicksight:us-east-1:111111111111:user/default/Reader/liujie-stargate",
            "UserName": "Reader/liujie-stargate",
            "Role": "READER",
            "Active": true,
            "PrincipalId": "federated/iam/AROAIJSEIEIOMXTZEIEIO:liujie-stargate"
        },
        {
            "Arn": "arn:aws-cn:quicksight:us-east-1:111111111111:user/default/embedding/cxoportal",
            "UserName": "embedding/cxoportal",
            "Email": "saanvisarkar@example.com",
            "Role": "AUTHOR",
            "Active": true,
            "PrincipalId": "federated/iam/AROAJTGEIEIOWB6BEIEIO:cxoportal"
        },
        {
            "Arn": "arn:aws-cn:quicksight:us-east-1:111111111111:user/default/zhangwei@example.com",
            "UserName": "zhangwei@example.com",
            "Email": "zhangwei@example.com",
            "Role": "AUTHOR",
            "Active": true,
            "PrincipalId": "user/d-96123-example-id-1123"
        }
    ]
    ```
  + To list group names, include a column that identifies the groups containing the user names for your DDP. This column should contain the system group names that are used to connect from your identity provider to Quick. To identify groups that you can add to the dataset, use one or more of the following Quick API operations or CLI commands: 
    + [ListGroups](https://docs.amazonaws.cn/quicksight/latest/APIReference/API_ListGroups.html) – Lists Quick groups by Amazon Web Services account ID and namespace for the Amazon Web Services Region that contains your identity provider.
    + [ListGroupMemberships](https://docs.amazonaws.cn/quicksight/latest/APIReference/API_ListGroupMemberships.html) – Lists the users in the specified Quick group.
    + [ListUserGroups](https://docs.amazonaws.cn/quicksight/latest/APIReference/API_ListUserGroups.html) – Lists the Quick groups that a Quick user is a member of.

    Or you can ask your network administrator to query your identity provider to get this information. 

The next two procedures provide instructions on how to finish creating a dataset for dynamic default values. The first procedure is for creating a dataset for a single-value DDP. The second one is for creating a dataset for a multivalue DDP. 

**To create a dataset for a single-value DDP**

1. Create dataset columns with single-value parameters. The first column in the query or file should be for the people using the dashboard. This field can contain user names or group names. However, support for groups is only available in Quick Enterprise edition. 

1. For each field that displays a dynamic default for a single-value parameter, add a column to the dataset. The name of the column doesn't matter—you can use the same name as the field or parameter.

   Single-value parameters only work as specified if the combination of user entity and dynamic default is unique for that parameter's field. If there are multiple values a default field for a user entity, the single-value control for that field displays the static default instead. If no static default is defined, the control doesn't display a default value. Be careful if you use group names, because some user names can be members of multiple groups. If those groups have different default values, then this type of user name functions as a duplicate entry. 

   The following example shows a table that appears to contain two single-value parameters. We make this assumption because no user name is paired with multiple default values. To make this table easier to understand, we add the word `'default'` in front of the field names from the analysis. Thus, you can read the table by making the following statement, changing the values for each row: When viewed by `anacarolinasilva`, the controls display a default region `NorthEast` and a default segment `SMB`.    
[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/en_us/quick/latest/userguide/parameters-default-values.html)

1. Import this data into Quick, and save it as a new dataset. 

1. In your analysis, add the dataset that you created. The analysis needs to use at least one other dataset that matches the columns you defined for the defaults. For more information, see [Adding a dataset to an analysis](adding-a-data-set-to-an-analysis.md).

**To create a dataset for a multivalue DDP**

1. Create dataset columns with multivalue parameters. The first column in the query or file should be for the people using the dashboard. This field can contain user names or group names. However, support for groups is only available in Quick Enterprise edition. 

1. For each field that displays a dynamic default for a multivalue parameter, add a column to the dataset. The name of the column doesn't matter—you can use the same name as the field or parameter. 

   Unlike single-value parameters, multivalue parameters allow multiple values in the field that's associated with the parameter. 

   The following example shows a table that appears to contain a single-value parameter and a multivalue parameter. We can make this assumption because each user name has a unique value in one column, and some user names have multiple values in the other column. To make this table easier to understand, we add the word `'default'` in front of the field names from the analysis. Thus, you can read the table by making the following statement, changing the values for each row: When `viewed-by` is `liujie`, the controls display a `default-region` value of `SouthEast`, and a `default-city` value of `Atlanta`. And if we read ahead one row, we see that `liujie` also has `Raleigh` in `default-city`.     
[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/en_us/quick/latest/userguide/parameters-default-values.html)

   In this example, the parameter that we apply `default-region` to works correctly whether it's a single-value or multivalue parameter. If it's a single-value parameter, two entries work for one user because both entries are the same value, `SouthEast`. If it's a multivalue parameter, it still works, except that only one value is selected by default. However, if we change the parameter that's using `default-city` as its default from a multivalue to a single-value parameter, we don't see these defaults selected. Instead, the parameter uses the static default, if there is one defined. For example, if the static default is set to `Atlanta`, `liujie` has `Atlanta` selected in that control, but not `Raleigh`. 

   In some cases, your static default value might also be used as a dynamic default. If so, make sure to test the control for a user name that doesn't use a default value that can be both.

   If a user name belongs to multiple groups, the named user sees a set of default values that is a union of the two groups' default values. 

1. Import this data into Quick, and save it as a new dataset. 

1. In your analysis, add the dataset that you created. The analysis needs to use at least one other dataset that matches the columns you defined for the defaults. For more information, see [Adding a dataset to an analysis](adding-a-data-set-to-an-analysis.md).

Use the following procedure to add a dynamic default parameter to your analysis. Before you begin, make sure that you have a dataset that contains the dynamic defaults for each user name or group name. Also make sure that your analysis is using this dataset. For help with these requirements, see the procedures preceding.

**To add a DDP to your analysis**

1. In the Quick console, choose the **Parameters** icon at the top of the page and choose an existing parameter. Choose **Edit parameter** from the parameter's menu. To add a new parameter, choose the plus (`+`) sign near **Parameters**.

1. Choose **Set a dynamic default**.

1. Configure the following options with your settings:
   + **Dataset with default values and user information** – Choose the dataset that you created and added to your analysis. 
   + **User name column** – To create defaults that are based on user names, choose the column in the dataset that contains the user names.
   + **Group name column** – To create defaults that are based on group names, choose the column in the dataset that contains the group names.
   + **Column for default value** – Choose the column that contains default values for this parameter.

1. Choose **Apply** to save your setting changes, and then choose **Update** to save the parameter changes. To exit without saving changes, choose **Cancel** instead.

1. Add a filter for each field that contains dynamic defaults to make the defaults work. To learn more about using filters with parameters, see [Using filters with parameters in Amazon Quick](parameters-filtering-by.md)

   Amazon Quick uses the static default value for anyone whose user name doesn't exist in the dataset, doesn't have a default assigned, or doesn't have a unique default. Each person can have only one set of defaults. If you don't want to use dynamic defaults, you can set a static default instead. 

# Connecting to parameters in Amazon Quick
Connecting to parameters

Use this section after you have a parameter set up, to connect it and make it work. 

After you create a parameter, you can create consumers of the parameters. *Parameter consumers* are components that consume the value of a parameter, such as filters, controls, calculated fields, or custom actions. 

You can navigate to each of these options in another way, as follows:
+ To create a filter, choose the **Filter** icon at the top of the page. In short, you create a **Custom Filter** and enable **Use parameters**. The list shows only eligible parameters.
+ To add a new control for the parameter, choose the **Parameters** icon at the top of the page. In short, choose your parameter, and then **Add control**. 
+ To use a parameter in a calculated field, either edit an existing calculated field, or add a new one by choosing **Add** at the top left. The parameter list appears below the field list.
**Note**  
You can't use multivalue parameters with calculated fields.
+ To create a URL action, choose the **v**-shaped menu on a visual, and then choose **URL Actions**.

For more information on each of these topics, see the following sections. 

**Topics**
+ [Using filters with parameters](parameters-filtering-by.md)
+ [Using calculated fields with parameters](parameters-calculated-fields.md)
+ [Using custom actions with parameters](parameters-custom-actions.md)
+ [Parameters in URLs](parameters-in-a-url.md)
+ [Parameters in titles and descriptions](parameters-in-titles.md)

# Using filters with parameters in Amazon Quick
Using filters with parameters

Use this section to filter the data in an analysis or dashboard by a single-value parameter value. To use a multivalued parameter—one with a multiselect drop-down control—create a custom filter that is equal (or not equal) to the values. 

Before using a filter with a parameter, you should already know how to work with filters. 

1. Verify that your analysis has a parameter already created. Choose **Edit** from either the parameter or the control menu to find out what settings are in use.

1. Choose the **Filter** pane from the left of the screen. If there is already a filter for the field that you want to use, choose it to open its settings. Otherwise, create a filter for the field that you want to filter by parameter.

1. Choose **Use Parameters**.

1. Choose your parameters from the list or lists below **Use parameters**. For text (string) fields, first choose **Custom Filter**, and then enable **Use Parameters**.

   For date fields, choose the **Start date** and **End date** parameters, as shown in the following screenshot. 

   For fields with other data types, choose **Select a parameter** and then choose your parameter from the list. 
**Note**  
Parameters that can hold multiple values must use equal or not equal as the comparison type.

1. Choose **Apply** to save your changes.

Test your new filter by choosing the control near the top of the analysis. In this example, we use a basic parameter that has no defaults, and a dynamic control that is linked to the **Region** field in the sample dataset named **Sales Pipeline**. The control queries the data, returning all values. 

If you delete or recreate a parameter that you are using in a filter, you can update the filter with the new parameter. To do this, open the filter, choose the new parameter that you want to use, and then choose **Apply**.

If you rename a parameter, you don't need to update the filter or any other consumers.

# Using calculated fields with parameters in Amazon Quick
Using calculated fields with parameters

You can pass the value of a parameter to a calculated field in an analysis. When you create a calculation, you can choose existing parameters from the list of parameters under **Parameter list**. You can't create a calculated field that contains a multivalued parameter—those with a multiselect drop-down control.

For the formula, you can use any of the available functions. You can pass the viewer's selection from the parameter control, to the `ifElse` function. In return, you get a metric. The following shows an example. 

```
ifelse(

${KPIMetric} = 'Sales',sum({Weighted Revenue}),

${KPIMetric} = 'Forecast',sum({Forecasted Monthly Revenue}),

${KPIMetric} = '# Active', distinct_count(ActiveItem),

NULL

)
```

The preceding example creates a metric (a decimal) that you can use in a field well. Then, when a user chooses a value from the parameter control, the visual updates to reflect their selection.

# Using custom actions with parameters in Amazon Quick
Using custom actions with parameters

A *custom action* enables you to launch URLs or filter visuals by selecting a data point in a visual or choosing the action name from the context menu. When you use a URL action with a parameter, you can pass or send parameters dynamically to the URL. To make this work, you set up a parameter, and then use it in the URL when you create a custom action with an action type of **URL action**. The parameters on both the sending and the receiving end must match in name and data type. All parameters are compatible with URL actions.

For details on creating a URL action, see [Creating and editing custom actions in Amazon Quick Sight](custom-actions.md). If you just want to use a parameter in a link without creating a URL action, see [Using parameters in a URL](parameters-in-a-url.md).

# Using parameters in a URL
Parameters in URLs

You can use a parameter name and value in a URL in Amazon Quick to set a default value for that parameter in a dashboard or analysis. 

The following example shows the URL of a dashboard that sets a parameter for another dashboard.

```
https://us-east-2.quicksight.aws.amazon.com/sn/dashboards/abc123-abc1-abc2-abc3-abcdefef1234#p.myParameter=12345
```

In the previous example, the first part is the link to the target dashboard: `https://us-east-2.quicksight.aws.amazon.com/sn/dashboards/abc123-abc1-abc2-abc3-abcdefef1234`. The hash sign (`#)` follows the first part to introduce the *fragments*, which contain the values that you want to set.

The values in the fragments aren't received or logged by Amazon servers. This functionality keeps your data values more secure.

The fragment after `#` follows these rules: 
+ Parameters are prefixed with `p.`. The names are the parameter name, not the control name. You can view the parameter name by opening the analysis, and choosing **Parameter** on the left sidebar.
+ The value is set using equals (`=`). The following rules apply:
  + Literal values don't use quotation marks. 
  + Spaces inside values are automatically encoded by the browser, so you don't need to use escape characters when manually creating a URL. 
  + To return all values, set the parameter equal to `"[ALL]"`.
  + To assign the parameter's value to `null`, set it equal to `%00`. For example, `p.population=%00`.
  + In custom actions, target parameter names begin with `$`, for example: `<<$passThroughParameter>>`
  + In custom actions, parameter values display with angle brackets `<< >>`, for example `<<dashboardParameter1>>`). The dashboard user sees the lookup value, not the variable. 
+ For a custom URL action, multivalue parameters only need one instance of the same parameter in the fragment, for example: `p.city=<<$city>>`
+ For a direct URL, multiple values for a single parameter have two instances of the same parameter in the fragment. For an example, see following.
+ Ampersands (`&`) separate multiple parameters. For an example, see following.

The server converts the date to UTC and sends it to the backend as a string without a time zone. To use Universal Coordinated Time (UTC) dates, exclude the time zone. Following are some examples of date formats that work: 
+ `2017-05-29T00%3A00%3A00` 
+ `2018-04-04 14:51 -08:00`
+ `Wed Apr 04 2018 22:51 GMT+0000`

```
https://us-east-2.quicksight.aws.amazon.com/sn/dashboards/abc123-abc1-abc2-abc3-abcdefef1234#p.shipdate=2018-09-30 08:01&p.city=New York&p.city=Seattle&p.teamMember=12&p.percentageRank=2.3
```

In the browser, this code becomes the following.

```
https://us-east-2.quicksight.aws.amazon.com/sn/dashboards/abc123-abc1-abc2-abc3-abcdefef1234#p.shipdate=2018-09-30%2008:01&p.city=New%20York&p.city=Seattle&p.teamMember=12&p.percentageRank=2.3
```

The previous example sets four parameters:
+ `shipDate` is a date parameter: `Sept 30, 2018`.
+ `city` is a multivalued string parameter: `New York`, and `Seattle`
+ `teamMember` is an integer parameter: `12`.
+ `percentageRank` is a decimal parameter: `2.3`.

The following example shows how to set values for a parameter that accepts multiple values.

```
https://us-east-2.quicksight.aws.amazon.com/sn/dashboards/abc123-abc1-abc2-abc3-abcdefef1234#p.MultiParam=WA&p.MultiParam=OR&p.MultiParam=CA
```

To pass values from one dashboard (or analysis) to another dashboard based on the user's data point selection, use custom URL actions. If you choose, you can also generate these URLs manually, and use them to share a specific view of the data.

For information on creating custom actions, see [Using custom actions for filtering and navigating](quicksight-actions.md).

# Using parameters in titles and descriptions in Amazon Quick
Parameters in titles and descriptions

When you create parameters in Amazon Quick, you can use them in titles and descriptions throughout your charts and analyses to dynamically display parameter values. 

You can use parameters in the following areas of your analysis:
+ Chart titles and subtitles
+ Axis titles
+ Legend titles
+ Parameter control titles
+ Sheet titles and descriptions

The following image shows a chart title that uses a parameter.

![\[Image of the Format visual pane with a parameter in the chart title and a chart with the parameter value in the title circled in red.\]](http://docs.amazonaws.cn/en_us/quick/latest/userguide/images/parameters-in-titles-labels2.png)


Use the following procedures to learn how to add parameters to areas throughout your analysis. For more information about parameters and how to create them, see [Parameters](parameters-in-quicksight.md).

## Adding parameters to chart titles and subtitles
Chart titles

Use the following procedure to learn how to add parameters to chart titles and subtitles.

**To add a parameter to a chart title or subtitle**

1. Open the **Properties** pane for the visual that you want to format.

1. In the **Properties** pane, choose the **Title** tab.

1. Select **Show title** or **Show subtitle**. These options might already be selected.

1. Choose the three dots at the right of **Edit title** or **Edit subtitle**, and then choose a parameter from the list.

   The parameter is added to the title in the **Properties** pane. In the chart, the parameter value is displayed in the title.

   For more information about editing titles and subtitles in visuals, see [Titles and subtitles on visual types in Quick](customizing-a-visual-title.md).

## Adding parameters to axis titles
Axis titles

Use the following procedure to learn how to add parameters to axis titles.

**To add a parameter to an axis title**

1. Open the **Properties** pane for the visual that you want to format.

1. In the **Properties** pane, choose the axis that you want to format.

1. Select **Show title**.

1. Choose the three dots at the right of the default axis title, and then choose a parameter from the list.

   The parameter is added to the axis title in the **Properties** pane. In the chart, the parameter value is displayed in the axis title.

   For more information about editing axis titles, see [Axes and grid lines](showing-hiding-axis-grid-tick.md).

## Adding parameters to legend titles
Legend titles

Use the following procedure to learn how to add parameters to legend titles.

**To add a parameter to a legend title**

1. Open the **Properties** pane for the visual that you want to format.

1. In the **Properties** pane, choose **Legend**.

1. Select **Show legend title**.

1. Choose the three dots at the right of **Legend title**, and then choose a parameter from the list.

   The parameter is added to the legend title in the **Properties** pane. In the chart, the parameter value is displayed in the legend title.

   For more information about formatting legends, see [Legends on visual types in Quick](customizing-visual-legend.md).

## Adding parameters to control titles
Control titles

Use the following procedure to learn how to add parameters to parameter control titles.

**To add a parameter to a parameter control title**

1. Select the parameter control that you want to edit, choose the three dots at the right of the parameter control title, and then choose **Edit**.

1. In the **Edit control** page that opens, select **Show title**.

1. Choose the three dots at the right of **Display name**, and then choose a parameter from the list.

   The parameter is added to the parameter control title.

   For more information about using parameter controls, see [Parameter controls](parameters-controls.md).

## Adding parameters to sheet titles and descriptions
Sheet titles and descriptions

Use the following procedure to learn how to add parameters to sheet titles and descriptions in your analysis.

**To add a parameter to a sheet title or description**

1. On the analysis page, choose **Sheets** in the application bar and then choose **Add title** or **Add description**.

   A sheet title or description appears on the sheet.

1. For **Sheet title** or for **Description**, choose the three dots at right, and then choose a parameter from the list.

   The parameter is added to the sheet title or description and the parameter value appears in the text when you close the text box.

   For more information about adding sheet titles and descriptions, see [Adding a title and description to an analysis](adding-a-title-and-description.md).

# Using custom actions for filtering and navigating
Custom actions

To add interactive options for dashboard subscribers (Quick readers), you create custom actions on one or more visuals in your analysis. Enhancing dashboards with custom actions helps people explore data by adding more context from within the dataset. It can make it easier to drill into the details and to find new insights in the same dashboard, a different dashboard, or a different application. You can add up to 10 custom actions to each visual in a dashboard.

Before you begin, it's helpful to do some planning. For example, identify fields that are good candidates for filtering, for opening a different sheet, for opening a URL, or for sending email. For each sheet, identify the widgets that display these fields. Then decide which widgets are going to contain actions. It's also a good idea to create a naming scheme so the names of the actions are consistent throughout the entire analysis. Consistent names make it easier for the person using your analysis to figure out what the action will do, plus they make it easier for you to maintain actions that you might be duplicating throughout the analysis. 

Actions only exist on the dashboard widget where you create them and they work in the context of that widget's parent sheet and child fields that it displays. You can create actions only on specific types of widget: visuals and insights. You can't add them to other widgets, for example filter or list controls. Custom actions can only be activated from the widget where you create them.

To activate an action, the person using the analysis can left-click (select) or right-click (use the context menu) on a data point. A *data point* is an item in the dataset, for example a point on a line chart, a cell in a pivot table, a slice on a pie chart, and so on. If the person clicks a visual element, the *select* action is activated. This is the action that is currently a member of the **On select** category of the **Actions** in an analysis. If the person instead right-clicks a visual element, they can choose from a list of *menu* actions. Any action listed is currently a member of the **Menu option** category of the **Actions** in an analysis. The **On select** category can contain one and only one member action. 

By default, the first action you create becomes the select action—the one activated by left-clicking. To remove an action from the **On select** category, change the action's **Activation** setting to **Menu option**. After you save that change, you can set a different action's **Activation** setting to **Select**. 

You can choose from three **Action types** when you configure an action:
+ **Filter action** – Filter data included in visual or in the entire sheet. By default, filters are available for all fields in the parent visual. Cascading filters are enabled by default. Filter actions work across multiple datasets by using automatically generated field mappings. 

  If the analysis uses more than one dataset, you can view the automatically generated field mappings for fields that exist in multiple datasets. To do this, choose ****View field mapping**** at the end of the action settings, while you're editing an action. If you are viewing a list of actions, choose ****View field mapping**** from the menu for each action. The field mappings appear in a new screen that shows the mapping between the initial dataset and all the other datasets in the visual. If no fields are automatically mapped, a message displays with a link to [Mapping and Joining Fields](mapping-and-joining-fields.md). 

  
+ **Navigation actions** – Enable navigation between different sheets in the same analysis. 
+ **URL actions** – Open a link to another web page. If you want to open a different dashboard, use a URL action. You can use a URL action to send data points and parameters to other URLs. You can include any available field or parameter. 

  If the URL uses the `mailto` scheme, running the action opens your default email editor. 

**Topics**
+ [

# Adding one-click interactive filters
](quick-actions.md)
+ [

# Creating and editing custom actions in Amazon Quick Sight
](custom-actions.md)
+ [

# Repairing custom actions
](repairing-custom-actions.md)
+ [

# Understanding field mapping for custom actions in Amazon Quick Sight
](quicksight-actions-field-mapping.md)

# Adding one-click interactive filters
Adding interactive filters

*One-click interactive filtering* provides point-and-click filtering that cascades from the clickable visual to all the other visuals and insights on a sheet. Add this to your analysis to start with summaries and drill down into the metrics, all within the same dashboard sheet. 

After you set this up, when you click a data point (for example, a point in a line chart), you instantly filter using all mapped fields on all the other visuals on that sheet. If you have multiple datasets, all target fields must be mapped for this to work. Also, you can only have one action that works by clicking a data point; all other actions work from the context menu. 

Use the following procedure to create a one-click filter in an analysis.

**To create a one-click filter on a visual or insight**

1. In your analysis, choose a visual or insight that you want to add interactive filtering to. 

1. Choose **Actions** from the Menu options dropdown in the upper right corner.

1. Choose **Filter same-sheet visuals.** Doing this immediately adds one-click filtering. 

1. Repeat this process for each visual that you wish to make interactive.

# Creating and editing custom actions in Amazon Quick Sight
Creating and editing custom actions

You create one action for each task that you want to be able to add to a visual. The actions you create become part of the functionality of each visual or insight.

The following table defines when to use each type of action.


|  Action to perform  |  Type of action  | 
| --- | --- | 
|  Add or customize an interactive filter action, including one-click filters  |  Filter action  | 
|  Open another sheet in the same dashboard  |  Navigation action  | 
|  Open a sheet in a different dashboard in the same Amazon Web Services account  |  URL action  | 
|  Open a URL (`https`, `http`)  |  URL action  | 
|  Send an email (`mailto`)  |  URL action  | 

You can set the following attributes and options for a custom action:
+ ****Action name**** – This is a descriptive name that you choose for the action. By default, actions are named **Action 1**, **Action 2**, and so on. If your custom action is activated from a context menu, this name displays in the menu when you right-click on a data point.

  To make the action name dynamic, you can parameterize it. Use the plus icon near the action name header to display a list of available variables. Variables are enclosed in angle brackets `<< >>`. Parameters are prefixed with a `$` , for example `<<$parameterName>>`. Field names have no prefix, for example `<<fieldName>>`.
+ ****Activation**** – Available options are **Select** or **Menu option**. To use an action, you can *select* the data point (left-click) or navigate to the *menu option* in the context menu (right-click). Navigation actions and URL actions listed in the middle of the context menu, just above **Color** options. Actions that are activated by menu are also available from the legend on a visual.
+ ****Action type**** – The type of action that you want. Settings that are specific to an action type only display after you choose the action type. 
  + **Filter action** settings include the following: 
    + ****Filter scope**** – The fields to filter on. To filter on all fields, choose **All fields**. Otherwise, choose **Select fields** and then turn off the items you don't want to target. 

      The default is **All fields**.
    + ****Target visuals**** – The dashboard widgets to target. To apply the filter to all of them, choose **All visuals**. Otherwise, choose **Select visuals** and then turn off the items you don't want to target. When you apply a filter action to other visuals, the effect is called *cascading filters*. 

      The default is **All visuals**.

      A cascading filter applies all the visuals that are set up in the **Target visuals** section of a specific filter action. Amazon Quick Sight initially evaluates your visuals and preconfigures the settings for you. But you can change the defaults if you wish to do so. You can set up multiple cascading filters on multiple visuals in the same sheet or analysis. When you are using the analysis or dashboard, you can use multiple cascading filters at the same time, although you activate each of these one at a time. 

      A filter action requires at least one target visual, because a filter action requires a source and a target. To filter only the current visual, create a regular filter instead by choosing **Filter** at left.
  + **Navigation action** settings include the following: 
    + ****Target sheet**** – The sheet to target. 
    + ****Parameters**** – The parameters to send to the target sheet. Choose the plus icon to add an existing parameter. 
  + **URL action** settings include the following: 
    + ****URL**** – The URL to open. URL actions can be deep links into another application. Valid URL schemes include `https`, `http`, and `mailto`. 
    + ****\$1** (Values)** – (Optional) The parameters to send to the target URL. Parameter names start with a `$`. The parameters on both the sending and the receiving end must match in name and data type. 
    + ****Open in**** – Where to open the URL. You can choose **New browser tab**, **Same browser tab**, or **New browser window**.

Some types of actions enable you to include values from parameters or fields that are available in the visual or insight. You can type these in manually or choose **\$1** to select from a list. For the custom action to work, every field and parameter it references must be actively in use in the parent widget.

Use the following procedure to create, view, or edit a custom action in an analysis.

**To create, view, or edit a custom action**

1. With your analysis open, choose **Actions** from the **Menu options** dropdown in the upper right corner. 

   The existing actions, if any, display by activation type. To turn an existing action on or off, use the box to the right of the action's name.

1. (Optional) To edit or view an existing action, choose the menu icon next to the name of the action. 

   To edit the action, choose **Edit**. 

   To delete it, choose **Delete**.

1. To create a new action, choose either one of the following:
   + The add icon near the **Actions** heading
   + The **Define a custom action** button

1. For **Action name**, define an action name. To make the action name dynamic, use the plus icon to add parameter or field values. 

1. For **Activation**, choose how the action runs.

1. For **Action type**, choose the action type you want to use. 

1. For a **Filter action**, do the following: 

   1. For **Filter scope**, choose the scope of the filter.

   1. For **Target visuals**, choose how far the filter cascades

1. For a **Navigation action**, do the following: 

   1. For **Target sheet**, choose the target sheet.

   1. For **Parameters**, choose the plus icon near the **Parameters** heading, select a parameter, and then choose a parameter value. You can choose all values, enter custom values, or select specific fields.

1. For a **URL action**, do the following: 

   1. For **URL**, enter the hyperlink.

   1. Choose the plus icon near the **URL** heading. Then, add variables from the list.

   1. For **Open in**, choose how to open the URL.

1. After you are finished with the action, choose one of the following at the bottom of the **Actions** panel (you might need to scroll down):
   + **Save** – Save your selections, and create the custom action.
   + **Close** – Close this custom action and discard your changes.
   + **Delete** – Delete this action.

# Repairing custom actions


For a custom action to work, every field and parameter it references must be active in the parent widget. If a field is missing from the source widget, or if a parameter is missing from the analysis, the action for that field or parameter becomes unavailable. Menu actions are no longer included in the context menu. Select actions no longer respond to attempts to interact. However, in all other ways, the widget continues to function. No error displays to your users. You can fix broken filter actions and URL actions by adding the missing fields back to the broken visual or insight.

The following procedure explains how to fix an action that broke because someone removed a field or parameter without updating the action. These steps provide basic guidance how to fix this issue. However, use your own judgment on how or if you should make changes to the analysis. If you're not sure, it's better to ask a Amazon Quick administrator for assistance before you change anything. For example, there might be a way to restore a previous version of the analysis, which might be safer if you aren't sure what happened to it.

**To remove a field from a broken action**

1. From the start page, choose **Analyses**. Then choose the analysis to fix.

1. Choose the visual or insight where the action no longer works. Make sure that it's highlighted on the sheet.

1. Choose **Actions** from the Menu options dropdown in the upper right corner.

1. Locate the action you want to fix and choose **Edit**.

1. If the action type is **Filter action**, and you see an error that says *the field used by this action was removed*, check the settings for **Filter scope**. **Selected fields** can only display fields that are in the visual. To disable selected fields that are removed, choose one of the following:
   + Change the **Filter scope** setting to **All fields**. Doing this enables the widget to filter on every field. 
   + If you want to use a list of **Selected fields**, verify the list of fields. If you need to include another field, you need to add it to the visual first.

1. If the action type is **Navigation action**, follow the guidance on the error message, which reflects the type of change that caused the error.

1. If the action type is **URL action**, check the **URL** setting for variables marked with double angle brackets (`<<FIELD-OR-$PARAMETER>`). Open the list of available variables by choosing the plus icon. Remove any fields or parameters that aren't in the list. Be sure you also remove the matching *URL parameter* and it's separator (`?` for the first URL parameter, or `&` for subsequent parameters). The following examples show (in **bold**) which part is removed if you were removing the field named `Product` from the visual.

   ```
   https://www.example.com/examplefunction?q=<<Product>
   ```

   ```
   https://www.example.com/examplefunction?q=<<Product>&uact=<<$CSN>
   ```

   ```
   https://www.example.com/examplefunction?pass=yes&q=<<Product>+<<City>&oq=<<Product>+<<City>&uact=<<$CSN>
   ```

   Make sure to test the new URL. 

1. (Optional) To delete the action, scroll to the end and choose **Delete**.

1. When you are finished, confirm your changes to the action. Scroll to the bottom of the **Action** pane and choose **Save**. 

   If the error also exists in an associated dashboard, share and publish the dashboard again to propagate the fix.

# Understanding field mapping for custom actions in Amazon Quick Sight
Understanding field mapping

Automated field mapping is based on identical fields. Fields with the same name and data type map automatically across datasets. Their field names and data types must be an exact match. This works similar to a join, except that it is automatically generated based on names and data types for every matching field. If you are missing fields, you can create them by using calculated fields in the dataset that's missing a field. If you don't want to have some of the fields mapped to each other, you can rename or remove them from the dataset. 

It's important to make sure that all target fields are mapped if they are enabled for use with a filter action (in the **Filter scope**). Doing this allows filtering to apply automatically. If some target fields aren't mapped, the automatic filtering doesn't work.

Mapping is generated only when you create or save a custom action. So after every change that affects the mapping, make sure to return to it and save it again. When you create an action, mapping is based on the fields as they exist at that point. When you save an action, any mapped fields that you renamed since you created the custom action stay mapped. However, if you alter the data type of a mapped field, the mapping is removed.

If your mapping is missing some fields, you can do one of the following to fix it:
+ Only target the mapped fields, by removing the unmapped fields from the **Filter scope.**
+ Remove the visual in question from the target visuals.
+ Create calculated fields to supply the missing fields for the mapping, and then save your custom action.
+ Edit the dataset and rename the fields or change their data types, and then save your custom action.
+ Edit the dataset and rename the fields or change their data types, and then resave your custom action.

**Note**  
The information that displays on the mapping screen shows the configuration from the most recent time you saved it. To refresh or update the view, save the action again.

If you add or edit datasets, they aren't automatically mapped or remapped. This causes the filtering to work incorrectly. For example, suppose that you add a new dataset, then create visuals for it. The new visuals won't respond to filter actions, because there is no field mapping to connect them. When you make changes, remember to save your custom actions again to redo the field mappings.

If you remove a parameterized field or any other targeted field from the source visual, the action that uses it breaks. The action for the missing field either doesn't work when you select a data point, or it's hidden from the context menu. 

For information about preparing your dataset for automated field mapping, see [Mapping fields](mapping-and-joining-fields.md#mapping-and-joining-fields-automatic).