Amazon Quicksight User
Amazon Quicksight User
Amazon Quicksight User
User Guide
Amazon QuickSight User Guide
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not
Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or
discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may
or may not be affiliated with, connected to, or sponsored by Amazon.
Amazon QuickSight User Guide
Table of Contents
What is Amazon QuickSight? ............................................................................................................... 1
Why QuickSight? ........................................................................................................................ 1
Starting work with QuickSight ..................................................................................................... 2
How it works ..................................................................................................................................... 3
Terminology .............................................................................................................................. 3
Using sample data ..................................................................................................................... 4
Reader experience: exploring dashboards .............................................................................................. 5
Interacting with dashboards ........................................................................................................ 5
Using filters ....................................................................................................................... 7
Filtering data during your session ........................................................................................ 9
Using dashboard elements ................................................................................................ 12
Sorting data .................................................................................................................... 13
Exporting data ................................................................................................................. 15
Subscribing to dashboard alerts ................................................................................................. 17
Getting email reports ....................................................................................................... 17
Sign up for anomaly alerts ................................................................................................ 18
Bookmarking views of a dashboard ............................................................................................ 19
Creating bookmarks .......................................................................................................... 19
Updating bookmarks ........................................................................................................ 20
Renaming bookmarks ....................................................................................................... 20
Making a bookmark the default view .................................................................................. 21
Sharing bookmarks ........................................................................................................... 21
Deleting bookmarks .......................................................................................................... 22
Setting up ....................................................................................................................................... 24
Sign up for AWS ...................................................................................................................... 24
Create an IAM user ................................................................................................................... 24
Signing up for a subscription ..................................................................................................... 25
Getting started ................................................................................................................................ 27
Signing in to QuickSight ........................................................................................................... 27
How to sign in to QuickSight ............................................................................................. 27
Quick start: Create an analysis using sample data ......................................................................... 32
Create a dashboard using sample data ........................................................................................ 35
Tutorial: Create a prepared dataset ..................................................................................... 36
Tutorial: Create an analysis ................................................................................................ 44
Tutorial: Modify visuals ..................................................................................................... 47
Tutorial: Create a dashboard .............................................................................................. 56
Using the console ..................................................................................................................... 56
Using the Amazon QuickSight menu and landing page .......................................................... 57
Using the Amazon QuickSight start page ............................................................................ 59
Choosing a language in Amazon QuickSight ........................................................................ 61
Using the Amazon QuickSight mobile app ........................................................................... 63
Connecting to data ........................................................................................................................... 64
Supported data sources ............................................................................................................ 65
Connecting to relational data ............................................................................................ 66
Importing file data ........................................................................................................... 66
Software as a service (SaaS) data ....................................................................................... 68
...................................................................................................................................... 68
Data source quotas ................................................................................................................... 68
SPICE quotas for imported data ......................................................................................... 68
Quotas for direct SQL queries ............................................................................................ 69
Supported data types and values ............................................................................................... 69
String and text data ......................................................................................................... 70
Numeric data ................................................................................................................... 70
Date and time data .......................................................................................................... 71
iii
Amazon QuickSight User Guide
iv
Amazon QuickSight User Guide
v
Amazon QuickSight User Guide
vi
Amazon QuickSight User Guide
vii
Amazon QuickSight User Guide
viii
Amazon QuickSight User Guide
ix
Amazon QuickSight User Guide
Why QuickSight?
QuickSight gives decision-makers the opportunity to explore and interpret information in an interactive
visual environment. They have secure access to dashboards from any device on your network and from
mobile devices.
To learn more about the major components and processes of Amazon QuickSight and the typical
workflow for creating data visualizations, see the following sections. Get started today to unlock the
potential of your data and make the best decisions that you can.
Topics
• Why QuickSight? (p. 1)
• Starting work with QuickSight (p. 2)
Why QuickSight?
Every day, the people in your organization make decisions that affect your business. When they have
the right information at the right time, they can make the choices that move your company in the right
direction.
Here are some of the benefits of using Amazon QuickSight for analytics, data visualization, and
reporting:
For advanced users, QuickSight Enterprise edition offers even more features:
• Saves you time and money with automated and customizable data insights, powered by machine
learning (ML). This enables your organization to do the following, without requiring any knowledge of
machine learning:
• Automatically make reliable forecasts.
• Automatically identify outliers.
• Find hidden trends.
• Act on key business drivers.
• Translate data into easy-to-read narratives, like headline tiles for your dashboard.
1
Amazon QuickSight User Guide
Starting work with QuickSight
To learn more, see the following video, which contains a two-minute introduction to Amazon QuickSight:
Introducing Amazon QuickSight. The audio contains all of the relevant information.
• How Amazon QuickSight works (p. 3)– Learn essential terminology and how QuickSight
components work together.
• Getting started with Amazon QuickSight data analysis (p. 27) – Complete important setup tasks and
learn how to use a dashboard, create an analysis, and publish a dashboard.
• AWS security in Amazon QuickSight (p. 941) – Understand how you can help to secure access to data
in QuickSight.
2
Amazon QuickSight User Guide
Terminology
Terminology
Data preparation is the process of transforming data for use in an analysis. This includes making changes
like the following:
• Filtering out data so that you can focus on what's important to you.
• Renaming fields to make them easier to read.
• Changing data types so that they are more useful.
• Adding calculated fields to enhance analysis.
• Creating SQL queries to refine data.
3
Amazon QuickSight User Guide
Using sample data
SPICE (Super-fast, Parallel, In-memory Calculation Engine) is the robust in-memory engine that
QuickSight uses. SPICE is engineered to rapidly perform advanced calculations and serve data. The
storage and processing capacity available in SPICE speeds up the analytical queries that you run against
your imported data. By using SPICE, you save time because you don't need to retrieve the data every
time that you change an analysis or update a visual.
A data analysis is the basic workspace for creating data visualizations, which are graphical
representations of your data. Each analysis contains a collection of visualizations that you arrange and
customize.
A data visualization, also known as a visual, is a graphical representation of data. There are many types
of visualizations, including diagrams, charts, graphs, and tables. All visuals begin in AutoGraph mode,
which automatically selects the best type of visualization for the fields that you select. You can also take
control and choose your own visuals. You can enhance your analytics by applying filters, changing colors,
adding parameter controls, custom click actions, and more.
Machine learning (ML) Insights propose narrative add-ons that are based on an evaluation of your data.
You can choose one from the list, for example forecasting or anomaly (outlier) detection. Or you can
create your own. You can combine insight calculations, narrative text, colors, images, and conditions that
you define.
A sheet is a page that displays a set of visualizations and insights. You can imagine this as a sheet from a
newspaper, except that it's filled with charts, graphs, tables, and insights. You can add more sheets, and
make them work separately or together in your analysis.
A dashboard is the published version of an analysis. You can share with other users of Amazon
QuickSight for reporting purposes. You specify who has access and what they can do with the dashboard.
Also, a variety of datasets are available free online that you can use with Amazon QuickSight, for
example the AWS public datasets. These datasets come in a variety of formats.
4
Amazon QuickSight User Guide
Interacting with dashboards
In Amazon QuickSight, a data dashboard is a collection of charts, graphs, and insights. It's like a
newspaper that's all about the data that you're interested in, except it has digital pages. Instead of
reading it, you interact with it.
Dashboards come in a wide variety of designs, depending on what you do and the analytics that you
need to do it well. Using QuickSight, you can interact with your data on a webpage or your mobile
device. If you also subscribe by mail, you can see a static preview of it.
The story told by your data reflects the expertise of the analysts and data scientists who built the
dashboards. They refine the data, add calculations, find angles on the story, and decide how to present
it. The publisher designs the dashboard and fills it with interactive data visualizations and controls that
adjust your view. Publishers can customize the level of interactivity that you have, including filter and
search options. You can interact with the active items on the screen to filter, sort, drill down, or jump to
another tool.
When you view a dashboard, you're seeing the most recently received data. As you interact with the
items on the screen, any changes you make change your view of the dashboard, and no one else's. Thus,
your device's privacy is assured, although the publisher can tell what you looked at. After you close the
dashboard, your explorations aren't preserved and neither is the data. As always, while you're an Amazon
QuickSight reader, your monthly subscription is provided by the publishers of the dashboards at no
additional cost to you.
If you're also a dashboard publisher—we call them authors, because they write reports—you can also
save a copy of the dashboard for further analysis. If you find a new feature of the data that you want to
publish, work with the original authors to update it. That way, everyone can see the same version of the
story. However, you can also use your copy to learn how their design works or to inspire your work on
something entirely new. Then, when you're finished, you can publish your analysis as a new dashboard.
To learn to set up dashboards, see Sharing and subscribing to data in Amazon QuickSight (p. 735).
Topics
• Interacting with Amazon QuickSight dashboards (p. 5)
• Subscribing to dashboard alerts (p. 17)
• Bookmarking views of a dashboard (p. 19)
5
Amazon QuickSight User Guide
Interacting with dashboards
To fit the dashboard to your screen, open the View menu at upper right and select Fit to window.
Depending on how the dashboard is configured, you can find all or some of the following elements:
• The menu bar – This displays the name of the dashboard. Also, the menu bar shows what you can do
with the dashboard, including Undo, Redo, and Reset, on the left. As you interact with the dashboard,
you can use these as tools to help you explore, knowing that you can change your view without losing
anything. On the right, you can find options to Print the dashboard, work with Data, choose a different
AWS Region, and open your User Profile. The user profile menu has options so you can choose the
language that Amazon QuickSight displays. It also has links to the Amazon QuickSight Community
and the online documentation (Help).
• The dashboard sheets – If your dashboard has multiple sheets, these display as tabs across the top of
the dashboard.
• The Filter menu – This option displays to the left of the dashboard, if the dashboard publisher allows
filtering.
• The Controls palette – If your dashboard includes controls, you can use them to choose the options
(parameters) that you want to apply to your dashboard. Sometimes a control value is selected for you,
and sometimes it's set to ALL.
• The dashboard title – If your dashboard has a title, it is usually a larger heading. It might have some
status information or instructions below it.
• The dashboard widgets – The items on the screen can include charts, graphs, insights, narratives, or
images. To see them all, you might need to scroll vertically or horizontally. The following screenshot
shows more of the previous example dashboard:
6
Amazon QuickSight User Guide
Using filters
Amazon QuickSight applies all of the enabled filters to the field. For example, suppose that there is
one filter of state = WA and another filter of sales >= 500. In this case, the dataset contains only
records that meet both of those criteria. If you disable one of these, only one filter applies. Take care that
multiple filters applied to the same field aren't mutually exclusive.
Viewing filters
To see the existing filters, choose Filter on the element settings menu, then choose to view filters. The
filters display in the Applied filters panel in order of creation, with the oldest filter on top.
A filter that isn't enabled is grayed out, and you can't select its check box.
7
Amazon QuickSight User Guide
Using filters
One of several scope icons displays to the right of the filter name to indicate the scope set on that filter.
The scope icon resembled four boxes in a square. If all boxes are filled, the filter applies to all visuals on
the analysis sheet. If only one box is filled, the filter applies to the selected visual only. If some boxes are
filled, the filter applies to some of the visuals on the sheet, including the one currently selected.
The scope icons match the ones that display on the filter menu when you are choosing the scope for the
filter.
In the Applied filters view, you can choose any filter to view its details. The filters in this list can change
depending on the scope of the filter, and which visual you currently have selected.
8
Amazon QuickSight User Guide
Filtering data during your session
You can close the Edit filter view by choosing the selector on the right. Doing this resets the Filter view.
1. If your dashboard has controls at the top of the screen, you can use them to filter data by choosing
from a preset list of values.
2. You can use the filter icon on each widget's settings menu.
3. You can create your own filters by using the filter panel on the left side of the page. The filter icon
looks like the following.
The first step is to choose which dashboard element you want to filter.
9
Amazon QuickSight User Guide
Filtering data during your session
Click on the item you choose, so that a highlight appears around the selected item. Also, if any filters are
already there, they display in a list. If there aren't any filters, you can add one by using the plus sign (+)
near Filters.
Filtering options vary depending on the data type of the field you want to filter, and on the options you
choose inside the filter. The following screenshot shows some of the options available for a time-range
date filter.
10
Amazon QuickSight User Guide
Filtering data during your session
11
Amazon QuickSight User Guide
Using dashboard elements
For each filter, you can choose whether to apply it to one, some, or all dashboard elements. You can also
enable or disable filters by using the check box next to the name of the filter. To delete a filter, edit it and
scroll to the bottom to see the options. Remember that your filters aren't saved from one session to the
next.
For more detailed information on creating filters, see Filtering data in Amazon QuickSight (p. 324).
When you choose a data point, several actions are available. You can click or tap on a data point, for
example on a bar in a bar chart, on a point where the line bends on a line chart, and so on. The available
options vary based on what type of item it is. The following screenshot shows a list of actions available
on most chart types.
12
Amazon QuickSight User Guide
Sorting data
• Focus on or exclude.
You can focus on or exclude specific data in a field, for example regions, metrics, or dates.
• Drill up or drill down.
If your dashboard contains data on which you can drill down or up, you can drill up to a higher level or
drill down to explore deeper details.
• Custom URL actions.
If your dashboard contains custom actions, you can activate them by choosing a data point or by right-
clicking it. For example, you might be able to email someone directly from the dashboard. Or you
might open another sheet, website, or application, and send it the value you chose from this one.
• Change chart colors or specific field colors.
You can change all the chart colors to a specific color. Or you can choose a specific field value to
change its color of the element it's part of.
13
Amazon QuickSight User Guide
Sorting data
1. You can hover over the label for the field you want to sort by, and choose the sort icon.
2. You can choose the filter icon at the upper right of one of the dashboard elements.
14
Amazon QuickSight User Guide
Exporting data
3. You can click or tap on the field and choose Sort from the context menu.
Sorting for pivot tables is different; you specify the sort order by using the column sort icon on the pivot
table.
15
Amazon QuickSight User Guide
Exporting data
reason, export files can prompt security warnings. To avoid malicious activity, turn off links and
macros when reading exported files.
To export data from an analysis or dashboard to a comma-separated value (CSV) file, use the settings
menu at the upper right of a widget. Exports only include data that currently displays in the item that
you choose.
In tables and pivot tables, you can export data to a comma-separated value (CSV) file or Microsoft Excel
file. You can choose to export only visible fields or all fields.
To export only visible fields to a CSV or Excel file, choose the menu at upper-right of the visual. Choose
either Export to CSV or Export to Excel, and then choose Export visible fields to CSV or Export visible
fields to Excel.
To export all fields to a CSV or Excel file, choose the menu at upper-right of the visual. Choose either
Export to CSV or Export to Excel, and then choose Export all fields to CSV or Export all fields to Excel.
16
Amazon QuickSight User Guide
Subscribing to dashboard alerts
Topics
• Sign up for dashboard emails (p. 17)
• Sign up for anomaly alerts (p. 18)
3. The Change report preferences page appears. This page shows the current report schedule, and
also the subscription and optimization options.
For Subscription, choose Subscribe to start receiving reports, or Unsubscribe to stop receiving
reports.
• If you usually use a mobile device or you want to view reports in a portrait format, choose
Viewing on a mobile device. When you receive the report, the charts and narratives display in a
single vertical column.
• If you usually use a desktop computer or you want to view reports in a landscape format, choose
Viewing on a desktop. When you receive the report, the charts and narratives display in the same
layout shown in your dashboard on your desktop.
17
Amazon QuickSight User Guide
Sign up for anomaly alerts
4. Choose Update to confirm your choices, or choose Cancel to discard your changes.
• In the dashboard, locate the anomaly widget that you're interested in. Select it so that it has a
highlighted box around it.
• If you're in the dashboard and have the Explore Anomalies page open, you can configure the alert
without returning to the dashboard view.
3. At upper right, choose Configure alert. The Alert configuration screen appears.
4. For Severity, choose the lowest level of significance that you want to see.
For Direction, choose to get alerts about anomalies that are Higher than expected or Lower than
expected. You can also choose [ALL] to receive alerts about all anomalies.
18
Amazon QuickSight User Guide
Bookmarking views of a dashboard
After you create a bookmark, you can set it as the default view of the dashboard that you see when you
open the dashboard in a new session. This doesn't affect anyone else's view of the dashboard.
You can create multiple bookmarks for a dashboard and share them by a URL link with other subscribers
of that dashboard.
Dashboard bookmarks are available on the Amazon QuickSight console. Bookmarks for embedded
dashboards are currently not supported.
Creating bookmarks
Use the following procedure to create a bookmark for a dashboard.
1. Open the published dashboard that you want to view and make changes to the filters or parameters,
or select the sheet that you want. For example, you can filter to the Region that interests you, or you
can select a specific date range using a sheet control on the dashboard.
2. Choose the bookmark icon at upper right, and then choose Add bookmark.
3. In the Add a bookmark pane that opens, enter a name for the bookmark, and then choose Save.
The bookmark is saved, and the dashboard name updates with the bookmark name (at top left).
You can return to the original dashboard view that the author published at any time by selecting
Original dashboard in the Bookmarks pane at right.
19
Amazon QuickSight User Guide
Updating bookmarks
Updating bookmarks
At any time, you can change a bookmark dashboard view and update the bookmark to always reflect
those changes.
To update a bookmark
1. Open the published dashboard and make any changes to the filters or parameters, or select a sheet.
2. Choose the bookmark icon at upper right.
3. In the Bookmarks pane that opens, choose the context menu (the three vertical dots) for the
bookmark that you want to update, and then choose Update.
Renaming bookmarks
Use the following procedure to rename a bookmark.
To rename a bookmark
1. In a published dashboard, choose the bookmark icon at upper right to open the Bookmarks pane.
2. In the Bookmarks pane, choose the context menu (the three vertical dots) for the bookmark that
you want to rename, and then choose rename.
20
Amazon QuickSight User Guide
Making a bookmark the default view
3. In the Rename bookmark pane, enter a name for the bookmark, and then choose Save.
1. In a published dashboard, choose the bookmark icon at upper right to open the Bookmarks pane.
2. In the Bookmarks pane, choose the context menu (the three dots) for the bookmark that you want
to set as your default view, and then choose Set as default.
Sharing bookmarks
After you create a bookmark, you can share a URL link for the view with others who have permission to
view the dashboard. They can then save that view as their own bookmark.
1. In a published dashboard, choose the bookmark icon at upper right to open the Bookmarks pane.
21
Amazon QuickSight User Guide
Deleting bookmarks
2. In the Bookmarks pane, choose the bookmark that you want to share so that the dashboard
updates to that view.
3. Choose the share icon at upper right, and then choose Share this view.
You can copy the URL link that QuickSight provides and paste it in an email or IM message to share
it with others. The recipient of the URL link can then save the view as their own bookmark. For more
information about sharing views of a dashboard, see Sharing your view of a Amazon QuickSight
dashboard (p. 754).
Deleting bookmarks
Use the following procedure to delete a bookmark.
To delete a bookmark
1. In a published dashboard, choose the bookmark icon at upper right to open the Bookmarks pane.
22
Amazon QuickSight User Guide
Deleting bookmarks
2. In the Bookmarks pane, choose the context menu (the three vertical dots) for the bookmark that
you want to delete, and then choose Delete.
3. In the Delete Bookmark pane that opens, choose Yes, Delete Bookmark.
23
Amazon QuickSight User Guide
Sign up for AWS
Topics
• Sign up for AWS (p. 24)
• Create an IAM user (p. 24)
• Signing up for an Amazon QuickSight subscription (p. 25)
1. Open https://portal.aws.amazon.com/billing/signup.
2. Follow the online instructions.
Part of the sign-up procedure involves receiving a phone call and entering a verification code on the
phone keypad.
1. Sign in to the IAM console as the account owner by choosing Root user and entering your AWS
account email address. On the next page, enter your password.
Note
We strongly recommend that you adhere to the best practice of using the Administrator
IAM user that follows and securely lock away the root user credentials. Sign in as the root
user only to perform a few account and service management tasks.
2. In the navigation pane, choose Users and then choose Add users.
3. For User name, enter Administrator.
4. Select the check box next to AWS Management Console access. Then select Custom password, and
then enter your new password in the text box.
5. (Optional) By default, AWS requires the new user to create a new password when first signing in. You
can clear the check box next to User must create a new password at next sign-in to allow the new
user to reset their password after they sign in.
6. Choose Next: Permissions.
7. Under Set permissions, choose Add user to group.
8. Choose Create group.
9. In the Create group dialog box, for Group name enter Administrators.
10. Choose Filter policies, and then select AWS managed - job function to filter the table contents.
24
Amazon QuickSight User Guide
Signing up for a subscription
11. In the policy list, select the check box for AdministratorAccess. Then choose Create group.
Note
You must activate IAM user and role access to Billing before you can use the
AdministratorAccess permissions to access the AWS Billing and Cost Management
console. To do this, follow the instructions in step 1 of the tutorial about delegating access
to the billing console.
12. Back in the list of groups, select the check box for your new group. Choose Refresh if necessary to
see the group in the list.
13. Choose Next: Tags.
14. (Optional) Add metadata to the user by attaching tags as key-value pairs. For more information
about using tags in IAM, see Tagging IAM entities in the IAM User Guide.
15. Choose Next: Review to see the list of group memberships to be added to the new user. When you
are ready to proceed, choose Create user.
You can use this same process to create more groups and users and to give your users access to your AWS
account resources. To learn about using policies that restrict user permissions to specific AWS resources,
see Access management and Example policies.
Before you begin, make sure that you can connect to an existing AWS account. If you don't have an
AWS account, see Sign up for AWS (p. 24). The person who signs up for QuickSight needs to have the
correct AWS Identity and Access Management (IAM) permissions. For more information, see IAM policy
examples for Amazon QuickSight (p. 983).
To test your permissions, you can use the IAM policy simulator; for more information, see Testing IAM
policies with the IAM policy simulator. Also, check whether your AWS account is part of an organization
based on the AWS Organizations service. If so and you sign in as an IAM user, make sure that you didn't
inherit any IAM permissions that deny access to the required permissions. For more information on
Organizations, see What is AWS Organizations?
To subscribe to QuickSight
1. Sign in to your AWS account and open QuickSight from the AWS Management Console. You can find
it under Analytics or by searching for QuickSight.
a. If you choose Standard, choose the method that you want to connect with. Choose one of the
following:
25
Amazon QuickSight User Guide
Signing up for a subscription
To sign up for QuickSight with federated users, you need the correct IAM permissions, defined
as follows:
• To use role-based federation (that is, single sign-on, or SSO) with QuickSight Standard Edition
or QuickSight Enterprise Edition, see IAM identity-based policies for Amazon QuickSight: all
access for Standard edition (p. 987).
• To use Microsoft Active Directory with QuickSight Enterprise Edition, see IAM identity-
based policies for Amazon QuickSight: all access for Enterprise edition (p. 987). QuickSight
Standard Edition doesn't work with Active Directory.
4. For both Standard and Enterprise editions, make choices for the following items:
• Enter a unique account name for QuickSight. Your account name can only contain characters (A–
Z and a–z), digits (0–9), and hyphens (-). Note that if your account begins with the characters D-
or d-, an error occurs. If you use Microsoft AD, and it has a default alias, this alias is used for the
account name.
• Enter a notification email address for the QuickSight account owner or group. This email address
receives service and usage notifications.
• (Optional) Choose the AWS Region that you want to use for your initial data storage capacity,
called SPICE.
• (Optional) Choose whether to allow autodiscovery of your AWS resources. You can change these
options later in Manage Account. For more information, see Allowing autodiscovery of AWS
resources (p. 945).
• (Optional) For IAM Role, choose Use an existing role, and then from the list choose a role
that you want to use. Or enter the IAM Amazon Resource Name (ARN) in the following format:
arn:aws:iam::account-id:role/path/role-name.
Note
Make sure to have your IAM administrator give you permissions to pass any existing
IAM roles in QuickSight. If you don't have permissions, or if you don't know if you have
permissions, choose QuickSight-managed role. This is the default role. You can always
switch to using a different role later if you have the correct permissions. For more
information, see Using an existing IAM role in QuickSight.
5. Review the choices that you made, then choose Finish.
6. (Optional) To open QuickSight, choose Go to QuickSight.
If you're using Enterprise edition, you can manage user groups by choosing Manage access to
QuickSight. Otherwise, close the browser and notify your users how to connect.
7. (Optional) If you're using SSO or federation, choose the users and groups that are going to use
QuickSight.
26
Amazon QuickSight User Guide
Signing in to QuickSight
Before you create your first analysis, make sure to complete the steps in Setting up for Amazon
QuickSight (p. 24).
Topics
• Signing in to Amazon QuickSight (p. 27)
• Quick start: Create an Amazon QuickSight analysis with a single visual using sample data (p. 32)
• Tutorial: Create an Amazon QuickSight dashboard using sample data (p. 35)
• Using the Amazon QuickSight console (p. 56)
If you're a QuickSight administrator, make sure to allow-list the following domains within your
organization's network.
Users who sign in directly through QuickSight and signin.aws and awsapps.com
Active Directory users
Important
We strongly recommend that you don't use the AWS root user for your everyday tasks, even the
administrative ones. Instead, adhere to the best practice of using the root user only to create
your first IAM user. Then securely lock away the root user credentials and use them to perform
only a few account and service management tasks. For more information, see AWS account root
user in the IAM User Guide.
27
Amazon QuickSight User Guide
How to sign in to QuickSight
To sign in to QuickSight
1. Go to https://quicksight.aws.amazon.com/.
2. For QuickSight account name, enter your account name. This is the name that was created when
the QuickSight account was created in AWS.
If you were invited to the QuickSight account by email, you can find the account name inside of that
email. If you don't have the email that invited you to QuickSight, ask the QuickSight administrator in
your organization for the information that you need.
You can also find your QuickSight account name at the top of the menu at upper-right on the
QuickSight console. In some cases, you might not have access to your QuickSight account or have
an administrator who can provide this information, or both. If so, contact AWS Support and open a
ticket that includes your AWS customer ID.
3. For Username, enter your QuickSight user name. User names that contain a semicolon (;) aren't
supported. Choose one of the following:
Your account can be based on IAM credentials or your email address if it's a root email address.
Or it can be used as the user name to invite you into the QuickSight account. If you received an
invitation email from another Amazon QuickSight user, it indicates what type of credentials to use.
• For individual users – The user name that you created for yourself.
28
Amazon QuickSight User Guide
How to sign in to QuickSight
The remaining steps vary depending on the user type you sign in as (directly through QuickSight or as an
Active Directory user, AWS root user, or IAM user). For more information, see the following sections.
To finish signing in to QuickSight if you sign in directly through QuickSight or use Active
Directory credentials
Passwords are case-sensitive and must be 8–64 characters in length. They must also contain each of
the following:
29
Amazon QuickSight User Guide
How to sign in to QuickSight
1. Choose Next.
2. For password, enter your password. For more information about root user passwords, see Changing
the AWS account root user password in the IAM User Guide.
30
Amazon QuickSight User Guide
How to sign in to QuickSight
1. For Password, enter your password. For more information about IAM user passwords, see Default
password policy in the IAM User Guide.
31
Amazon QuickSight User Guide
Quick start: Create an analysis using sample data
If your sign-in process happens automatically and you need to use a different account, use a private or
incognito browser window. Doing this prevents the browser from reusing cached settings.
1. On the Amazon QuickSight start page, choose New analysis. If you don't have the sample data, you
can download it from web-and-social-analytics.csv.zip. Unzip the file so you can use the .csv file.
a. Choose New dataset from the New analysis screen. (Or choose Datasets at left, and then
choose New dataset.)
b. Choose Upload a file.
c. Choose the sample file, web-and-social-analytics.csv, from your drive. If you don't see
it, check that you unzipped the web-and-social-analytics.csv.zip file.
d. Confirm file upload settings by choosing Next on the Confirm file upload settings screen.
e. Choose Visualize on the Data source details screen.
f. Skip the next step. Choosing Visualize brings you to the same screen as the process in Step 2.
2. On the Datasets page, choose the Web and Social Media Analytics dataset, and then choose Use in
Analysis at upper right.
32
Amazon QuickSight User Guide
Quick start: Create an analysis using sample data
3. In the Fields list pane, choose Date, and then choose Mailing list adds.
Amazon QuickSight uses AutoGraph to create the visual, selecting the visual type that it determines
is most compatible with those fields. In this case, it selects a line chart that shows mailing list adds
by day, which is the date granularity default.
33
Amazon QuickSight User Guide
Quick start: Create an analysis using sample data
5. Choose the X axis field well, choose Aggregate, and then choose Month.
The line chart updates to show mailing list adds by month, rather than by the default of by year.
34
Amazon QuickSight User Guide
Create a dashboard using sample data
• Create and prepare a Marketing dataset using the Web and Social Media Analytics sample data.
• Create a Marketing analysis and add several visuals to it.
• Modify the visuals in the analysis, including the following:
• Adding another measure to an existing visual
• Changing chart colors
• Changing date granularity
• Changing the size and layout of the visuals
• Applying a filter
• Publish a dashboard based on the analysis.
Topics
35
Amazon QuickSight User Guide
Tutorial: Create a prepared dataset
36
Amazon QuickSight User Guide
Tutorial: Create a prepared dataset
37
Amazon QuickSight User Guide
Tutorial: Create a prepared dataset
3. In the FROM EXISTING DATA SOURCES section of the Create a Data Set page, choose the Web and
Social Media Analytics Amazon S3 data source and then choose Edit dataset.
In the Fields pane, choose the field menu for the Twitter followers cumulative and Mailing list
cumulative fields, and then choose Exclude field.To select more than one field at a time, press the
Ctrl key while you select (Command key on Mac).
38
Amazon QuickSight User Guide
Tutorial: Create a prepared dataset
6. Rename a field.
In the Dataset preview pane, scroll to the Website Pageviews field and choose the edit icon.
39
Amazon QuickSight User Guide
Tutorial: Create a prepared dataset
In the Edit field page that opens, for Name, enter Website page views, and then choose Apply.
7. Add a calculated field that substitutes a text string for any 0-length string value in the Events field:
a. On the data preparation page, scroll to the top of the Fields pane, and then choose Add
calculated field.
40
Amazon QuickSight User Guide
Tutorial: Create a prepared dataset
b. In the Add calculated field page that opens, for Add name, enter populated_event.
c. In the Functions pane at right, double-click the ifelse function from the list of functions. This
adds the function to the calculated field formula.
41
Amazon QuickSight User Guide
Tutorial: Create a prepared dataset
d. Expand the Field list pane by choosing the drop-down arrow, and then double-click the Events
field. This adds the field to the calculated field formula.
e. In formula editor, enter the following additional functions and parameters required, in bold in
the following: ifelse(strlen({Events})=0, 'Unknown', {Events}).
42
Amazon QuickSight User Guide
Tutorial: Create a prepared dataset
f. Choose Save.
The new calculated field is created, and appears at the top of the Fields pane.
8. Choose Save.
43
Amazon QuickSight User Guide
Tutorial: Create an analysis
Next steps
Create an analysis by using the procedure in Tutorial: Create an Amazon QuickSight analysis (p. 44).
2. On the Datasets page, choose the Business Review sample dataset, and then choose Create
Analysis.
On the analysis page, choose Date and Return visitors in the Fields list pane.
44
Amazon QuickSight User Guide
Tutorial: Create an analysis
1. On the analysis page, choose Add and then Add visual on the application bar. A new, blank visual is
created, and AutoGraph is selected by default.
45
Amazon QuickSight User Guide
Tutorial: Create an analysis
3. Choose fields in the Fields list pane to add to the Field wells pane:
46
Amazon QuickSight User Guide
Tutorial: Modify visuals
Next steps
Modify the visuals in your analysis by using the procedure in Tutorial: Modify Amazon QuickSight
visuals (p. 47).
47
Amazon QuickSight User Guide
Tutorial: Modify visuals
Select the New visitors SEO field in the Fields list pane. This measure is added to the Value field
well, and the line chart updates with a line to represent it. The visual title also updates.
3. Change the color of the line used to represent the Return visitors measure.
Choose the line on the chart that represents Return visitors. To do this, choose the end of the line,
not the middle of the line.
Choose Color Return visitors, and then choose the red icon from the color selector.
48
Amazon QuickSight User Guide
Tutorial: Modify visuals
4. Choose the Date field in the X axis field well, choose Aggregate, and then choose Month.
49
Amazon QuickSight User Guide
Tutorial: Modify visuals
The scatter plot updates to show the measures by month, rather than by the default of by year.
50
Amazon QuickSight User Guide
Tutorial: Modify visuals
51
Amazon QuickSight User Guide
Tutorial: Modify visuals
5. In the Edit filter pane, for Filter type, choose the After comparison type.
52
Amazon QuickSight User Guide
Tutorial: Modify visuals
Choose Date, choose 2014 for the year, January for the month, and then choose 1 on the calendar.
53
Amazon QuickSight User Guide
Tutorial: Modify visuals
7. In the Edit filter pane, choose Apply to apply the filter to the visual.
The filter is applied to the scatter plot visual. This is indicated with a filter icon on the visual drop-
down menu.
54
Amazon QuickSight User Guide
Tutorial: Modify visuals
In the Filter pane at left, choose the Date filter again and choose Only this visual, and then choose
All visuals of this dataset.
Next steps
Create a dashboard from your analysis by using the procedure in Tutorial: Create an Amazon QuickSight
dashboard (p. 56).
55
Amazon QuickSight User Guide
Tutorial: Create a dashboard
1. In your analysis, choose Share in the application bar at upper right, and then choose Publish
dashboard.
2. In the Publish dashboard page that opens, choose Publish new dashboard as, and enter the name
Marketing Dashboard.
Topics
• Using the Amazon QuickSight menu and landing page (p. 57)
• Using the Amazon QuickSight start page (p. 59)
56
Amazon QuickSight User Guide
Using the Amazon QuickSight menu and landing page
Note
Consult your administrator before changing your AWS Region. Your default AWS Region is
configured by your Amazon QuickSight administrator. Changing the AWS Region changes where
your work is stored.
To view videos about Amazon QuickSight, choose your user name at the upper-right of any page, and
then choose Tutorial videos. Choose a video to play it.
57
Amazon QuickSight User Guide
Using the Amazon QuickSight menu and landing page
To access the user profile menu, choose your user icon at the upper right of any page in Amazon
QuickSight. Use this menu to manage Amazon QuickSight features, visit the community, send product
feedback, choose a language, get help from the documentation, or sign out of Amazon QuickSight.
The following options are available from the user profile menu:
• Manage QuickSight – If you have appropriate permissions, you can access administrative functions
such as managing users, subscriptions, SPICE (p. 132) capacity, and account settings.
• Community – Choose this option to visit the Amazon QuickSight online community.
• Send feedback – This is your direct connection to the product team. Use this simple form to report
problems, request features, or tell us how you are using Amazon QuickSight.
58
Amazon QuickSight User Guide
Using the Amazon QuickSight start page
• What's new – Find out what new features are available in Amazon QuickSight.
• Language setting – Choose the language you want to use in the Amazon QuickSight user interface.
• Region setting – Choose the AWS Region that you want to work in.
Note
Consult your administrator before changing your AWS Region. Your default AWS Region is
configured by your Amazon QuickSight administrator. Changing the AWS Region changes
where your work is stored.
• Tutorial videos – This will open the Tutorial videos page where you can watch videos about Amazon
QuickSight.
• Help – This will open the official AWS documentation, which you can view online, in Kindle, or as a
PDF.
• Sign out – Choose this option to sign out of Amazon QuickSight and your AWS session.
To see available analyses, choose Analyses at left. This is the default page when Amazon QuickSight
opens. Choose any analysis to open it.
To see your list of favorite dashboards and analyses, choose Favorites. You can add items to your
favorites by selecting the star near the title of the dashboard or analysis, so that the star is filled in. Clear
the star to remove the item from your favorites.
To create a new analysis, choose New analysis, near the top left. This takes you to Datasets. Choose one
to start analyzing it.
To see current datasets, or to create a new dataset, choose Datasets. This takes you to the Datasets
page, which displays the datasets that you have access to. (If they don't all fit on one page, you can
navigate between pages.) From here, you can choose a dataset to analyze.
59
Amazon QuickSight User Guide
Using the Amazon QuickSight start page
To create a new dataset, choose New dataset. From here, you can upload a file, or you can create a new
dataset based on a data source (a connection to external data). Icons for new data sources are at the top
of the screen under From new data sources. Icons for existing data sources are displayed below them,
under From existing data sources.
60
Amazon QuickSight User Guide
Choosing a language in Amazon QuickSight
After you locate the item that you're looking for, you can open it directly from the search results. You can
modify a data set, create an analysis from a data set, or access an analysis or dashboard. Choose an item
from the search results to open it.
Dansk da Danish
Deutsch de German
English en English
Español es Spanish
Français fr French
Italiano it Italian
Nederlands nl Dutch
Norsk nb Norwegian
Português pt Portuguese
Suomi fi Finnish
Svenska sv Swedish
61
Amazon QuickSight User Guide
Choosing a language in Amazon QuickSight
日本語 ja Japanese
한국어 ko Korean
Choosing a language translates only user interface elements. It doesn't translate the following:
Use the following procedure to change the language in the Amazon QuickSight interface.
62
Amazon QuickSight User Guide
Using the Amazon QuickSight mobile app
For a quick tour of the app, see Amazon QuickSight announces the all-new QuickSight mobile app on the
AWS Big Data Blog.
63
Amazon QuickSight User Guide
After your data is available in QuickSight Standard edition, you can do the following:
• Transform the dataset with field formatting, hierarchies, data type conversions, and calculations.
• Create one or more data analyses based on your newly created dataset.
• Share your analysis with other people so they can help design it.
• Add charts, graphs, more datasets, and multiple pages (called sheets) to your data analysis.
• Create visual appeal with customized formatting and themes.
• Make them interactive by using parameters, controls, filters, and custom actions.
• Combine data from multiple data sources, and then build new hierarchies for drilling down and
calculations only available during analytics, like aggregations, window functions, and more.
• Publish your analysis as an interactive data dashboard.
• Share the dashboard so other people can use the dashboard, even if they don't use the analysis that
it's based on.
• Add more data to create more analyses and dashboards.
After your data is available in QuickSight Enterprise edition, you can do different things depending on
your role. If you can build datasets, design analyses, and publish dashboards, you can do all of the things
people using Standard edition can do.
In addition, these are some examples of additional tasks that you can do:
• Create analyses that use QuickSight insights, including machine learning (ML) powered insights for
forecasting, anomaly and outlier detection, and key driver identification.
• Design narrative insights with text, colors, images, and calculations.
• Add data from virtual private clouds (VPCs) and on-premises data sources, with data encryption at
rest.
• Control access in datasets by adding row and column level security.
• Refresh imported datasets every hour.
• Share emailed reports.
If you develop applications or use the AWS SDKs and AWS Command Line Interface (AWS CLI), you can
do the following and more:
• Add embedded analytics and embedded interactive dashboards to websites and applications.
• Use API operations to manage data sources and datasets.
• Refresh imported data more frequently by using the data ingestion API operations.
• Script, transfer, and make templates from analyses and dashboards by using API operations.
64
Amazon QuickSight User Guide
Supported data sources
• Programmatically assign people to security roles based on settings managed by system administrators.
If you perform administrative functions in QuickSight, you can do the following and more:
• Manage security with shared folders to organize your teams' work and help them collaborate using
dashboards, analytics, and datasets.
• Add QuickSight to your VPC to enable access to data in VPC and on-premises data sources.
• Protect sensitive data with finely grained access control to AWS data sources.
• Manually assign people to the QuickSight author security role so they can prepare datasets, design
analytics, and publish data dashboards at a fixed cost per month.
• Manually assign people to the QuickSight reader security role so they can securely interact with
published data dashboards on a pay-per-session basis.
After you connect to or import data, you create a dataset to shape and prepare data to share and reuse.
You can view your available datasets on the Datasets page, which you reach by choosing Manage data
on the Amazon QuickSight start page. You can view available data sources and create a new dataset on
the Create a Data Set page, which you reach by choosing New data set on the Datasets page.
Topics
• Supported data sources (p. 65)
• Data source quotas (p. 68)
• Supported data types and values (p. 69)
• Amazon QuickSight Connection examples (p. 76)
• Creating datasets (p. 94)
• Editing datasets (p. 104)
• Reverting datasets back to previous published versions (p. 104)
• Duplicating datasets (p. 106)
• Changing datasets (p. 106)
• Sharing datasets (p. 107)
• Tracking dashboards and analyses that use a dataset (p. 108)
• Using row-level security (RLS) in Amazon QuickSight (p. 109)
• Using column-level security (CLS) to restrict access to a dataset (p. 121)
• Deleting datasets (p. 122)
• Adding a dataset to an analysis (p. 123)
• Working with data sources in Amazon QuickSight (p. 127)
65
Amazon QuickSight User Guide
Connecting to relational data
• Amazon Athena
• Amazon Aurora
• Amazon OpenSearch Service
• Amazon Redshift
• Amazon Redshift Spectrum
• Amazon S3
• Amazon S3 Analytics
• Apache Spark 2.0 or later
• AWS IoT Analytics
• Exasol 7.1.2 or later
• MariaDB 10.0 or later
• Microsoft SQL Server 2012 or later
• MySQL 5.1 or later
• Oracle 12c or later
• PostgreSQL 9.3.1 or later
• Presto 0.167 or later
• Snowflake
• Teradata 14.0 or later
• Timestream
Note
You can access additional data sources not listed here by linking or importing them through
supported data sources.
Amazon Redshift clusters, Amazon Athena databases, and Amazon RDS instances must be in AWS.
Other database instances must be in one of the following environments to be accessible from Amazon
QuickSight:
• Amazon EC2
• Local (on-premises) databases
• Data in a data center or some other internet-accessible environment
For more information, see Infrastructure security in Amazon QuickSight (p. 1036).
66
Amazon QuickSight User Guide
Importing file data
QuickSight supports UTF-8 file encoding, but not UTF-8 (with BOM).
Files in Amazon S3 that have been compressed with zip, or gzip (www.gzip.org), can be imported as-is. If
you used another compression program for files in Amazon S3, or if the files are on your local network,
remove compression before importing them.
JSON data
Amazon QuickSight natively supports JSON flat files and JSON semistructured data files.
You can either upload a JSON file or connect to your Amazon S3 bucket that contains JSON data.
Amazon QuickSight automatically performs schema and type inference on JSON files and embedded
JSON objects. Then it flattens the JSON, so you can analyze and visualize application-generated data.
You can also use the parseJson function to extract values from JSON objects in a text file. For example,
if your CSV file has a JSON object embedded in one of the fields, you can extract a value from a specified
key-value pair (KVP). For more information on how to do this, see parseJson (p. 207).
You can use the parseJson function to parse flat files during data preparation. This function extracts
elements from valid JSON structures and lists.
• JSON object
• String (double quoted)
• Number (integer and float)
• Boolean
• NULL
67
Amazon QuickSight User Guide
Software as a service (SaaS) data
• Jira
• ServiceNow
SaaS sources that use OAuth require that you authorize the connection on the SaaS website. For this to
work, QuickSight must be able to access the SaaS data source over the network. These sources include
the following:
• Adobe Analytics
• GitHub
• Salesforce
You can use reports or objects in the following editions of Salesforce as data sources for Amazon
QuickSight:
• Enterprise Edition
• Unlimited Edition
• Developer Edition
• Twitter (Twitter Standard Search API returns data for 7 days only)
To connect to on premises data sources, you need to add your data sources and a QuickSight-specific
network interface to Amazon Virtual Private Cloud (Amazon VPC). When configured properly, a VPC
based on Amazon VPC resembles a traditional network that you operate in your own data center.
It enables you to secure and isolate traffic between resources. You define and control the network
elements to suit your requirements, while still getting the benefit of cloud networking and the scalable
infrastructure of AWS.
For detailed information, see Infrastructure security in Amazon QuickSight (p. 1036).
Topics
• SPICE quotas for imported data (p. 68)
• Quotas for direct SQL queries (p. 69)
To retrieve a subset of data from a larger set, you can deselect columns or apply filters to reduce the size
of the data. If you are importing from Amazon S3, each manifest can specify up to 1,000 files.
68
Amazon QuickSight User Guide
Quotas for direct SQL queries
In rare cases, if you're ingesting large rows into SPICE, you might reach the quota for gigabytes per
dataset before you reach the quota on rows. The size is based on the SPICE capacity the data occupies
after ingestion into SPICE. You can calculate your capacity by using the formula described in Capacity
planning for SPICE datasets (p. 132).
However, not all database drivers react to the 2-minute timeout, for example Amazon Redshift. In these
cases, the query runs for as long as it takes for the response to return, which can result in long-running
queries on your database. When this happens, you can cancel the query from the database server to
free up database resources. Follow the instructions for your database server about how to do this. For
example, for more information on how to cancel queries in Amazon Redshift, see Canceling a query in
Amazon Redshift, and Implementing workload management in Amazon Redshift in the Amazon Redshift
Database Developer Guide.
Each result set from a direct query can have up to 2,000 columns. Each column name can have up to 127
Unicode characters. If you want to retrieve data from a larger table, you can use one of several methods
to reduce the size of the data. You can deselect columns, or apply filters. In a SQL query, you can also use
predicates, such as WHERE, HAVING. If your visuals time out during a direct query, you can simplify your
query to optimize execution time or you can import the data into SPICE.
Make sure that any table or file that you use as a data source contains only fields that can be implicitly
converted to these data types. Amazon QuickSight skips any fields or columns that can't be converted.
69
Amazon QuickSight User Guide
String and text data
If you get an error that says "fields were skipped because they use unsupported data types", alter your
query or table to remove or recast unsupported data types.
The first time you query or import the data, QuickSight tries to interpret the data that it identifies as
other types, for example dates and numbers. It's a good idea to verify that the data types assigned to
your fields or columns are correct.
For each string field in imported data, QuickSight uses a field length of 8 bytes plus the UTF-8 encoded
character length. Amazon QuickSight supports UTF-8 file encoding, but not UTF-8 (with BOM).
Numeric data
Numeric data includes integers and decimals. Integers with a data type of INT are negative or positive
numbers that don't have a decimal place. QuickSight doesn't distinguish between large and small
integers. Integers over a value of 9007199254740991 or 2^53 - 1 might not display exactly or
correctly in a visual.
Decimals with a data type of DECIMAL are negative or positive numbers that contain at least one decimal
place, before or after the decimal point. Truncation of data occurs beyond the fourth decimal place to
the right. QuickSight supports displaying of no more than four decimal places to the right of the decimal
point. The full value is still used in all calculations, but it doesn't display.
• When you create or edit a dataset, you can use your data in its original state to create calculations on
decimal data.
• When this data is imported into SPICE.
QuickSight enables you to create calculations that are based on DECIMAL data having more than four
decimal places to the right of the decimal point. However, QuickSight can display no more than four
decimal places to the right of the decimal point. The value is truncated, not rounded, when displayed
in data preparation or analyses and when imported into SPICE. For example, 13.00049 is truncated to
13.0004.
As an example, take a decimal field with a value of 0.00006, which displays in the user interface as 0.0.
The full value 0.00006 is still used in all calculations. The following examples show how the true value
functions in calculations:
For each INT and DECIMAL field in imported data, QuickSight uses a field length of 8 bytes. QuickSight
supports UTF-8 file encoding, but not UTF-8 (with BOM).
70
Amazon QuickSight User Guide
Date and time data
QuickSight uses UTC time for querying, filtering, and displaying date data. When date data doesn't
specify a time zone, QuickSight assumes UTC values. When date data does specify a time zone,
QuickSight converts it to display in UTC time. For example, a date field with a time zone offset
like 2015-11-01T03:00:00-08:00 is converted to UTC and displayed in Amazon QuickSight as
2015-11-01T15:30:00.
For each DATE field in imported data, QuickSight uses a field length of 8 bytes. QuickSight supports
UTF-8 file encoding, but not UTF-8 (with BOM).
Database engine Numeric data String data types Datetime data Boolean data
or source types types types
71
Amazon QuickSight User Guide
Supported data types from other data sources
Database engine Numeric data String data types Datetime data Boolean data
or source types types types
• numeric
• real
• smallint
• smallmoney
• tinyint
72
Amazon QuickSight User Guide
Supported data types from other data sources
Database engine Numeric data String data types Datetime data Boolean data
or source types types types
The supported formats vary depending on the data source type, as follows:
File uploads Both 24- Supported date and time formats are described in
hour and the Joda API documentation.
Amazon S3 sources 12-hour
clocks For a complete list of Joda date formats, see Class
Athena DateTimeFormat on the Joda website.
Relational databases sources 24-hour The following data and time formats:
clock only
1. dd/MM/yyyy HH:mm:ss, for example
31/12/2016 15:30:00.
2. dd/MM/yyyy, for example 31/12/2016.
3. dd/MMM/yyyy HH:mm:ss, for example 31/
DEC/2016 15:30:00.
4. dd/MMM/yyyy, for example 31/DEC/2016.
5. dd-MMM-yyyy HH:mm:ss, for example 31-
DEC-2016 15:30:00.
6. dd-MMM-yyyy, for example 31-DEC-2016.
7. dd-MM-yyyy HH:mm:ss, for example 31-12-2016
15:30:00.
8. dd-MM-yyyy, for example 31-12-2016.
9. MM/dd/yyyy HH:mm:ss, for example
12/31/2016 15:30:00.
10.MM/dd/yyyy, for example 12/31/2016.
73
Amazon QuickSight User Guide
Supported data types from other data sources
74
Amazon QuickSight User Guide
Supported data types from other data sources
Amazon QuickSight interprets Sales Date as a date field and drops the row containing a nondate
value, so only the following rows are imported.
In some cases, a database field might contain values that the JDBC driver can't interpret for the source
database engine. In such cases, the uninterpretable values are replaced by null so that the rows can be
imported. The only known occurrence of this issue is with MySQL date, datetime, and timestamp fields
that have all-zero values, for example 0000-00-00 00:00:00. For example, take the following source
data.
75
Amazon QuickSight User Guide
Connection examples
Topics
• Creating a dataset using Amazon Athena data (p. 76)
• Using Amazon OpenSearch Service with Amazon QuickSight (p. 77)
• Creating a dataset using Amazon S3 files (p. 79)
• Creating a data source using Apache Spark (p. 87)
• Creating a dataset using a Microsoft Excel file (p. 87)
• Creating a data source using Presto (p. 88)
• Creating a data source and data set from SaaS sources (p. 89)
• Creating a dataset from Salesforce (p. 91)
• Creating a dataset using a local text file (p. 91)
• Using Amazon Timestream data with Amazon QuickSight (p. 92)
1. Begin by creating a new dataset. Choose Datasets from the navigation pane at left, then choose
New dataset.
2. a. To use an existing Athena connection profile (common), scroll down to the FROM EXISTING
DATA SOURCES section, and choose the card for the existing data source that you want to use.
Choose Create dataset.
Cards are labeled with the Athena data source icon and the name provided by the person who
created the connection.
b. To create a new Athena connection profile (less common), use the following steps:
1. In the FROM NEW DATA SOURCES section, choose the Athena data source card.
2. For Data source name, enter a descriptive name.
3. For Athena workgroup, choose your workgroup.
4. Choose Validate connection to test the connection.
5. Choose Create data source.
3. On the Choose your table screen, do the following:
• If you are using Athena Federated Query, choose the catalog you want to use.
• Otherwise, choose AwsDataCatalog.
b. Choose one of the following:
76
Amazon QuickSight User Guide
Amazon OpenSearch Service
If you don't have the right permissions, you receive the following error message: "You don't have
sufficient permissions to connect to this dataset or run this query." Contact your QuickSight
administrator for assistance. For more information, see Authorizing connections to Amazon
Athena (p. 963).
4. Choose Edit/preview data.
5. Create a dataset and analyze the data using the table by choosing Visualize. For more information,
see Visualizing data in Amazon QuickSight (p. 379).
Before you can proceed, Amazon QuickSight needs to be authorized to connect to Amazon OpenSearch
Service. If connections aren't enabled, you get an error when you try to connect. A QuickSight
administrator can authorize connections to AWS resources.
1. Open the menu by clicking on your profile icon at top right, then choose Manage QuickSight. If you
don't see the Manage QuickSight option on your profile menu, ask your QuickSight administrator
for assistance.
2. Choose Security & permissions, Add or remove.
3. Enable the option for OpenSearch.
4. Choose Update.
After OpenSearch Service is accessible, you create a data source so people can use the specified domains.
1. Begin by creating a new dataset. Choose Datasets from the navigation pane at left, then choose
New Dataset.
2. Choose the Amazon OpenSearch data source card.
3. For Data source name, enter a descriptive name for your OpenSearch Service data source
connection, for example OpenSearch Service ML Data. Because you can create many datasets
from a connection to OpenSearch Service, it's best to keep the name simple.
4. For Connection type, choose the network you want to use. This can be a virtual private cloud (VPC)
based on Amazon VPC or a public network. The list of VPCs contains the names of VPC connections,
rather than VPC IDs. These names are defined by the QuickSight administrator.
5. For Domain, choose the OpenSearch Service domain that you want to connect to.
6. Choose Validate connection to check that you can successfully connect to OpenSearch Service.
7. Choose Create data source to proceed.
8. For Tables, choose the one you want to use, then choose Select to continue.
77
Amazon QuickSight User Guide
Amazon OpenSearch Service
• To import your data into the QuickSight in-memory engine (called SPICE), choose Import to
SPICE for quicker analytics. For information about how to enable importing OpenSearch data,
see Authorizing connections to Amazon OpenSearch Service (p. 961).
• To allow QuickSight to run a query against your data each time you refresh the dataset or use the
analysis or dashboard, choose Directly query your data.
To enable autorefresh on a published dashboard that uses OpenSearch Service data, the
OpenSearch Service dataset needs to use a direct query.
10. Choose Edit/Preview and then Save to save your dataset and close it.
1. Choose Datasets at left, then scroll down to find the data source card for your Amazon OpenSearch
Service connection. An example might be US Amazon OpenSearch Service Data.
2. Choose the Amazon OpenSearch dataset.
3. On the dataset details page that opens, choose the Permissionstab.
78
Amazon QuickSight User Guide
Amazon S3 files
5. Choose Edit/Preview.
6. Choose Save to save and close the dataset.
For information on using OpenSearch Service in visualizations, see Limitations for using OpenSearch
Service (p. 79).
4. For more information, see Working with analyses.
• OpenSearch Service datasets support a subset of the visual types, sort options, and filter options.
• To enable autorefresh on a published dashboard that uses OpenSearch Service data, the OpenSearch
Service dataset needs to use a direct query.
• Multiple subquery operations aren't supported. To avoid errors during visualization, don't add multiple
fields to a field well, use one or two fields per visualization, and avoid using the Color field well.
• Custom SQL isn't supported.
• Crossdataset joins and self joins aren't supported.
• Calculated fields aren't supported.
• Text fields aren't supported.
• The "other" category isn't supported. If you use an OpenSearch Service dataset with a visualization
that supports the "other" category, disable the "other" category by using the menu on the visual.
You must grant Amazon QuickSight access to any Amazon S3 buckets that you want to read files
from. For information about granting Amazon QuickSight access to AWS resources, see Accessing data
sources (p. 944).
79
Amazon QuickSight User Guide
Amazon S3 files
1. Check Data source quotas (p. 68) to make sure that your target file set doesn't exceed data source
quotas.
2. Create a manifest file to identify the text files that you want to import, using one of the formats
specified in Supported formats for Amazon S3 manifest files (p. 82).
3. Save the manifest file to a local directory, or upload it into Amazon S3.
4. On the Amazon QuickSight start page, choose Datasets.
5. On the Datasets page, choose New dataset.
6. In the FROM NEW DATA SOURCES section of the Create a Data Set page, choose the Amazon S3
icon.
7. For Data source name, enter a description of the data source. This name should be something that
helps you distinguish this data source from others.
8. For Upload a manifest file, do one of the following:
• To use a local manifest file, choose Upload, and then choose Upload a JSON manifest file. For
Open, choose a file, and then choose Open.
• To use a manifest file from Amazon S3, choose URL, and enter the URL for the manifest file. To
find the URL of a pre-existing manifest file in the Amazon S3 console, navigate to the appropriate
file and choose it. A properties panel displays, including the link URL. You can copy the URL and
paste it into Amazon QuickSight.
9. Choose Connect.
10. To make sure that the connection is complete, choose Edit/Preview data. Otherwise, choose
Visualize to create an analysis using the data as-is.
If you choose Edit/Preview data, you can specify a dataset name as part of preparing the data.
Otherwise, the dataset name matches the name of the manifest file.
To learn more about data preparation, see Preparing data in Amazon QuickSight (p. 147).
• Combine files by using a manifest – In this case, the files must have the same number of fields
(columns). The data types must match between fields in the same position in the file. For example, the
first field must have the same data type in each file. The same goes for the second field, and the third
field, and so on. Amazon QuickSight takes field names from the first file.
The files must be listed explicitly in the manifest. However, they don't have to be inside the same S3
bucket.
In addition, the files must follow the rules described in Supported formats for Amazon S3 manifest
files (p. 82).
For more details about combining files using a manifest, see Creating a dataset using Amazon S3
files (p. 79).
• Merge files without using a manifest – To merge multiple files into one without having to list them
individually in the manifest, you can use Athena. With this method, you can simply query your text
files, like they are in a table in a database. For more information, see the post Analyzing data in
Amazon S3 using Athena in the Big Data blog.
• Use a script to append files before importing – You can use a script designed to combine your files
before uploading.
80
Amazon QuickSight User Guide
Amazon S3 files
For you to access files in another account, the owner of the other account must first set Amazon S3
to grant you permissions to read the file. Then, in Amazon QuickSight, you must set up access to the
buckets that were shared with you. After both of these steps are finished, you can use a manifest to
create a dataset.
Note
To access files that are shared with the public, you don't need to set up any special security.
However, you still need a manifest file.
Topics
• Setting up Amazon S3 to allow access from a different Amazon QuickSight account (p. 81)
• Setting up Amazon QuickSight to access Amazon S3 files in another AWS account (p. 82)
For information on accessing another account's Amazon S3 files from your Amazon QuickSight account,
see Setting up Amazon QuickSight to access Amazon S3 files in another AWS account (p. 82). For
more information about S3 permissions, see Managing access permissions to your Amazon S3 resources
and How do I set permissions on an object?
You can use the following procedure to set this access from the S3 console. Or you can grant permissions
by using the AWS CLI or by writing a script. If you have a lot of files to share, you can instead create an S3
bucket policy on the s3:GetObject action. To use a bucket policy, add it to the bucket permissions, not
to the file permissions. For information on bucket policies, see Bucket policy examples in the Amazon S3
Developer Guide.
1. Get the email address of the AWS account email that you want to share with. Or you can get and use
the canonical user ID. For more information on canonical user IDs, see AWS account identifiers in the
AWS General Reference.
2. Sign in to the AWS Management Console and open the Amazon S3 console at https://
console.aws.amazon.com/s3/.
3. Find the Amazon S3 bucket that you want to share with Amazon QuickSight. Choose Permissions.
4. Choose Add Account, and then enter an email address, or paste in a canonical user ID, for the AWS
account that you want to share with. This email address should be the primary one for the AWS
account.
5. Choose Yes for both Read bucket permissions and List objects.
81
Amazon QuickSight User Guide
Amazon S3 files
Use the following procedure to access another account's Amazon S3 files from Amazon QuickSight.
Before you can use this procedure, the users in the other AWS account must share the files in their
Amazon S3 bucket with you.
1. Verify that the user or users in the other AWS account gave your account read and write permission
to the S3 bucket in question.
2. Choose your profile icon, and then choose Manage Amazon QuickSight.
3. Choose Security & permissions.
4. Under QuickSight access to AWS services, choose Manage.
5. Choose Select S3 buckets.
6. On the Select Amazon S3 buckets screen, choose the S3 buckets you can access across AWS tab.
The default tab is named S3 buckets linked to Amazon QuickSight account. It shows all the
buckets your Amazon QuickSight account has access to.
7. Do one of the following:
• To add all the buckets that you have permission to use, choose Choose accessible buckets from
other AWS accounts.
• If you have one or more Amazon S3 buckets that you want to add, enter their names. Each must
exactly match the unique name of the Amazon S3 bucket.
If you don't have the appropriate permissions, you see the error message "We can't connect to this
S3 bucket. Make sure that any S3 buckets you specify are associated with the AWS account used
to create this Amazon QuickSight account." This error message appears if you don't have either
account permissions or Amazon QuickSight permissions.
Note
To use Amazon Athena, Amazon QuickSight needs to access the Amazon S3 buckets that
Athena uses.
You can add them here one by one, or use the Choose accessible buckets from other AWS
accounts option.
8. Choose Select buckets to confirm your selection.
9. Create a new dataset based on Amazon S3, and upload your manifest file. For more information
Amazon S3 datasets, see Creating a dataset using Amazon S3 files (p. 79).
82
Amazon QuickSight User Guide
Amazon S3 files
If you use an Amazon QuickSight manifest file, it must have a .json extension, for example
my_manifest.json. If you use an Amazon Redshift manifest file, it can have any extension.
If you use an Amazon Redshift manifest file, Amazon QuickSight processes the optional mandatory
option as Amazon Redshift does. If the associated file isn't found, Amazon QuickSight ends the import
process and returns an error.
Files that you select for import must be delimited text (for example, .csv or .tsv), log (.clf), or extended
log (.elf) format, or JSON (.json). All files identified in one manifest file must use the same file
format. Plus, they must have the same number and type of columns. Amazon QuickSight supports
UTF-8 file encoding, but not UTF-8 (with ap-south-1). If you are importing JSON files, then for
globalUploadSettings specify format, but not delimiter, textqualifier, or containsHeader.
Make sure that any files that you specify are in Amazon S3 buckets that you have granted Amazon
QuickSight access to. For information about granting Amazon QuickSight access to AWS resources, see
Accessing data sources (p. 944).
{
"fileLocations": [
{
"URIs": [
"uri1",
"uri2",
"uri3"
]
},
{
"URIPrefixes": [
"prefix1",
"prefix2",
"prefix3"
]
}
],
"globalUploadSettings": {
"format": "JSON",
"delimiter": ",",
"textqualifier": "'",
"containsHeader": "true"
}
}
Use the fields in the fileLocations element to specify the files to import, and the fields in the
globalUploadSettings element to specify import settings for those files, such as field delimiters.
• fileLocations – Use this element to specify the files to import. You can use either or both of the URIs
and URIPrefixes arrays to do this. You must specify at least one value in one or the other of them.
• URIs – Use this array to list URIs for specific files to import.
Amazon QuickSight can access Amazon S3 files that are in any AWS Region. However, you must use
a URI format that identifies the AWS Region of the Amazon S3 bucket if it's different from that used
by your Amazon QuickSight account.
83
Amazon QuickSight User Guide
Amazon S3 files
• URIPrefixes – Use this array to list URI prefixes for S3 buckets and folders. All files in a specified
bucket or folder are imported. Amazon QuickSight recursively retrieves files from child folders.
QuickSight can access Amazon S3 buckets or folders that are in any AWS Region. Make sure to use a
URI prefix format that identifies the S3 bucket's AWS Region if it's different from that used by your
QuickSight account.
https://<bucket https://
name>.s3.amazonaws.com awsexamplebucket.s3.amazonaws.com
84
Amazon QuickSight User Guide
Amazon S3 files
The following are some examples of completed Amazon QuickSight manifest files.
The following example shows a manifest file that identifies two specific .csv files for import. These files
use double quotes for text qualifiers. The format, delimiter, and containsHeader fields are skipped
because the default values are acceptable.
{
"fileLocations": [
{
"URIs": [
"https://yourBucket.s3.amazonaws.com/data-file.csv",
"https://yourBucket.s3.amazonaws.com/data-file-2.csv"
]
}
],
"globalUploadSettings": {
"textqualifier": "\""
}
}
The following example shows a manifest file that identifies one specific .tsv file for import. This
file also includes a bucket in another AWS Region that contains additional .tsv files for import. The
textqualifier and containsHeader fields are skipped because the default values are acceptable.
85
Amazon QuickSight User Guide
Amazon S3 files
{
"fileLocations": [
{
"URIs": [
"https://s3.amazonaws.com/awsexamplebucket/data.tsv"
]
},
{
"URIPrefixes": [
"https://s3-us-east-1.amazonaws.com/awsexamplebucket/"
]
}
],
"globalUploadSettings": {
"format": "TSV",
"delimiter": "\t"
}
}
The following example identifies two buckets that contain .clf files for import. One is in the same
AWS Region as the Amazon QuickSight account, and one in a different AWS Region. The delimiter,
textqualifier, and containsHeader fields are skipped because they are not applicable to log files.
{
"fileLocations": [
{
"URIPrefixes": [
"https://awsexamplebucket.your-s3-url.com",
"s3://awsexamplebucket2/"
]
}
],
"globalUploadSettings": {
"format": "CLF"
}
}
The following example uses the Amazon Redshift format to identify a .csv file for import.
{
"entries": [
{
"url": "https://awsexamplebucket.your-s3-url.com/myalias-test/file-to-
import.csv",
"mandatory": true
}
]
}
The following example uses the Amazon Redshift format to identify two JSON files for import.
{
"fileLocations": [
{
"URIs": [
"https://yourBucket.s3.amazonaws.com/data-file.json",
"https://yourBucket.s3.amazonaws.com/data-file-2.json"
]
}
],
"globalUploadSettings": {
86
Amazon QuickSight User Guide
Apache Spark
"format": "JSON"
}
}
Before you use Amazon QuickSight with Spark products, you must configure Spark for Amazon
QuickSight.
Amazon QuickSight requires your Spark server to be secured and authenticated using LDAP, which is
available to Spark version 2.0 or later. If Spark is configured to allow unauthenticated access, Amazon
QuickSight refuses the connection to the server. To use Amazon QuickSight as a Spark client, you must
configure LDAP authentication to work with Spark.
The Spark documentation contains information on how to set this up. To start, you need to configure it
to enable front-end LDAP authentication over HTTPS. For general information on Spark, see the Apache
spark website. For information specifically on Spark and security, see Spark security documentation.
To make sure that you have configured your server for Amazon QuickSight access, follow the instructions
in Network and database configuration requirements (p. 1036).
For more information about creating new Amazon S3 datasets using Amazon S3 data sources, see
Creating a dataset using an existing Amazon S3 data source (p. 99) or Creating a dataset using
Amazon S3 files (p. 79).
1. Check Data source quotas (p. 68) to make sure that your target file doesn't exceed data source
quotas.
2. On the Amazon QuickSight start page, choose Datasets.
3. On the Datasets page, choose New dataset.
4. In the FROM NEW DATA SOURCES section of the Create a Data Set page, choose Upload a file.
5. In the Open dialog box, choose a file, and then choose Open.
Choose Select to confirm your settings. Or you can choose Edit/Preview data to prepare the data
immediately.
87
Amazon QuickSight User Guide
Presto
A preview of the data appears on the next screen. You can't make changes directly to the data
preview.
8. If the data headings and content don't look correct, choose Edit settings and prepare data to
correct the file upload settings.
If you don't need to prepare the data, you can choose to create an analysis using the data as-is.
Choose Visualize. Doing this names the dataset the same as the source file, and takes you to the
Analysis screen. To learn more about data preparation and excel upload settings, see Preparing data
in Amazon QuickSight (p. 147).
Note
If at anytime you want to make changes to the file, such as adding a new field,you must
make the change in Microsoft Excel and create a new dataset using the updated version in
QuickSight. For more information about possible implications of changing datasets, see
Changing datasets (p. 106) .
The results of the queries that you run through the Presto query engine can be turned into Amazon
QuickSight datasets. Presto processes the analytic queries on the backend databases. Then it returns
results to the Amazon QuickSight client. You can directly query your data through Presto, or you can
import the results of your query into SPICE.
Before you use Amazon QuickSight as a Presto client to run queries, make sure that you configure data
source profiles. You need a data source profile in Amazon QuickSight for each Presto data source that
you want to access. Use the following procedure to create a connection to Presto.
To create a new connection to a presto data source from Amazon QuickSight (console)
1. On the Amazon QuickSight start page, choose Datasets at top right. Then choose New dataset.
2. Choose the Presto tile.
Note
In most browsers, you can use Ctrl-F or Cmd-F to open a search box and enter presto to
locate it.
3. Add the settings for the new data source:
• Data source name – Enter a descriptive name for your data source connection. This name appears
in the Existing data sources section at the bottom of the Data sets screen.
88
Amazon QuickSight User Guide
SaaS sources
• Connection type – Choose the connection type that you need to use to connect to Presto.
If you use a public network, your Presto server must be secured and authenticated using
Lightweight Directory Access Protocol (LDAP). For information on configuring Presto to use LDAP,
see LDAP authentication in the Presto documentation.
To connect through a virtual private connection, choose the appropriate VPC name from the VPC
connections list.
If your Presto server allows unauthenticated access, AWS requires that you connect to it securely
by using a private VPC connection. For information on configuring a new VPC, see Connecting to a
VPC with Amazon QuickSight (p. 1040).
• Database server – The name of the database server.
• Port – The port that the server using to accept incoming connections from Amazon QuickSight
• Catalog – The name of the catalog that you want to use.
• Authentication required – (Optional) This option only appears if you choose a VPC connection
type. If the Presto data source that you're connecting to doesn't require authentication, choose
No. Otherwise, keep the default setting (Yes).
• Username – Enter a user name to use to connect to Presto. Amazon QuickSight applies the
same user name and password to all connections that use this data source profile. If you want to
monitor Amazon QuickSight separately from other user accounts, create a Presto account for each
Amazon QuickSight data source profile.
The Presto account that you use needs be able to access to the database and run SELECT
statements on at least one table.
• Password – The password to use with the Presto user name. Amazon QuickSight encrypts all
credentials that you use in data source profile. For more information, see Data encryption in
Amazon QuickSight (p. 942).
• Enable SSL – SSL is enabled by default.
4. Choose Validate connection to test your settings.
5. After you validate your settings, choose Create data source to complete the connection.
You can use either a cloud-based or server-based instance of a SaaS application. To connect to an SaaS
application that is running on your corporate network, make sure that Amazon QuickSight can access the
application's Domain Name System (DNS) name over the network. If Amazon QuickSight can't access the
SaaS application, it generates an unknown host error.
Here are examples of some ways that you can use SaaS data:
• Engineering teams who use Jira to track issues and bugs can report on developer efficiency and bug
burndown.
• Marketing organizations can integrate Amazon QuickSight with Adobe Analytics to build consolidated
dashboards to visualize their online and web marketing data.
89
Amazon QuickSight User Guide
SaaS sources
• Teams using social media can access Twitter data to analyze and understand their customers'
sentiment.
Use the following procedure to create a data source and dataset by connecting to sources available
through Software as a Service (SaaS). In this procedure, we use a connection to GitHub as an example.
Other SaaS data sources follow the same process, although the screens—especially the SaaS screens—
might look different.
For sources using OAuth, the connector takes you to the SaaS site to authorize the connection
before you can create the data source.
4. Choose a name for the data source, and enter that. If there are more screen prompts, enter the
appropriate information. Then choose Create data source.
5. If you are prompted to do so, enter your credentials on the SaaS login page.
6. When prompted, authorize the connection between your SaaS data source and Amazon QuickSight.
The following example shows the authorization for Amazon QuickSight to access the GitHub
account for the Amazon QuickSight documentation.
Note
Amazon QuickSight documentation is now available on GitHub. If you want to make
changes to this user guide, you can use GitHub to edit it directly.
(Optional) If your SaaS account is part of an organizational account, you might be asked to request
organization access as part of authorizing Amazon QuickSight. If you want to do this, follow the
prompts on your SaaS screen, then choose to authorize Amazon QuickSight.
7. After authorization is complete, choose a table or object to connect to. Then choose Select.
8. On the Finish data set creation screen, choose one of these options:
• To save the data source and dataset, choose Edit/Preview data. Then choose Save from the top
menu bar.
• To create a dataset and an analysis using the data as-is, choose Visualize. This option
automatically saves the data source and the dataset.
You can also choose Edit/Preview data to prepare the data before creating an analysis. This opens
the data preparation screen. For more information about data preparation, see Preparing dataset
examples (p. 374).
• The SaaS source must support REST API operations for Amazon QuickSight to connect to it.
• If you are connecting to Jira, the URL must be public address.
• If you are connecting to Twitter, the Twitter standard search API returns data for the previous seven
days only. In other words, no tweets are found for a date older than one week.
• If you don't have enough SPICE (p. 132) capacity, choose Edit/Preview data. In the data preparation
screen, you can remove fields from the dataset to decrease its size or apply a filter that reduces
the number of rows returned. For more information about data preparation, see Preparing dataset
examples (p. 374).
90
Amazon QuickSight User Guide
Salesforce
1. Check Data source quotas (p. 68) to make sure that your target report or object doesn't exceed
data source quotas.
2. On the Amazon QuickSight start page, choose Datasets.
3. On the Datasets page, choose New dataset.
4. In the FROM NEW DATA SOURCES section of the Create a Data Set page, choose the Salesforce
icon.
5. Enter a name for the data source and then choose Create data source.
6. On the Salesforce login page, enter your Salesforce credentials.
7. For Data elements: contain your data, choose Select and then choose either REPORT or OBJECT.
Note
Joined reports aren't supported as Amazon QuickSight data sources.
8. Choose one of the following options:
• To prepare the data before creating an analysis, choose Edit/Preview data to open
data preparation. For more information about data preparation, see Preparing dataset
examples (p. 374).
• Otherwise, choose a report or object and then choose Select.
9. Choose one of the following options:
• To create a dataset and an analysis using the data as-is, choose Visualize.
Note
If you don't have enough SPICE (p. 132) capacity, choose Edit/Preview data. In data
preparation, you can remove fields from the dataset to decrease its size or apply a filter
that reduces the number of rows returned. For more information about data preparation,
see Preparing dataset examples (p. 374).
• To prepare the data before creating an analysis, choose Edit/Preview data to open data
preparation for the selected report or object. For more information about data preparation, see
Preparing dataset examples (p. 374).
1. Check Data source quotas (p. 68) to make sure that your target file doesn't exceed data source
quotas.
Supported file types include .csv, .tsv, .json, .clf, or .elf files.
2. On the Amazon QuickSight start page, choose Datasets.
3. On the Datasets page, choose New dataset.
4. In the FROM NEW DATA SOURCES section of the Create a Data Set page, choose Upload a file.
5. In the Open dialog box, browse to a file, select it, and then choose Open.
91
Amazon QuickSight User Guide
Timestream data
If you choose the former, you can specify a dataset name as part of preparing the data. If you choose
the latter, a dataset with the same name as the source file is created. To learn more about data
preparation, see Preparing data in Amazon QuickSight (p. 147).
Before you can proceed, Amazon QuickSight needs to be authorized to connect to Amazon Timestream.
If connections aren't enabled, you get an error when you try to connect. A QuickSight administrator can
authorize connections to AWS resources. To authorize, open the menu by clicking on your profile icon at
top right. Choose Manage QuickSight, Security & permissions, Add or remove. Then enable the check
box for Amazon Timestream, then choose Update to confirm. For more information, see Accessing data
sources (p. 944).
1. Begin by creating a new dataset. Choose Datasets from the navigation pane at left, then choose
New Dataset.
2. Choose the Timestream data source card.
3. For Data source name, enter a descriptive name for your Timestream data source connection, for
example US Timestream Data. Because you can create many datasets from a connection to
Timestream, it's best to keep the name simple.
4. Choose Validate connection to check that you can successfully connect to Timestream.
5. Choose Create data source to proceed.
6. For Database, choose Select to view the list of available options.
7. Choose the one you want to use, then choose Select to continue.
8. Do one of the following:
• To import your data into QuickSight's in-memory engine (called SPICE), choose Import to SPICE
for quicker analytics.
• To allow QuickSight to run a query against your data each time you refresh the dataset or use the
analysis or dashboard, choose Directly query your data.
If you want to enable autorefresh on a published dashboard that uses Timestream data, the
Timestream dataset needs to use a direct query.
9. Choose Edit/Preview and then Save to save your dataset and close it.
10. Repeat these steps for the number of concurrent direct connections to Timestream that you want
to open in a dataset. For example, let's say you want to use four tables in a QuickSight dataset.
92
Amazon QuickSight User Guide
Timestream data
Currently, QuickSight datasets connect to only one table at a time from a Timestream data source.
To use four tables in the same dataset, you need to add four data source connections in QuickSight.
1. Choose Datasets at left, then scroll down to find the dataset for your Timestream connection. An
example might be US Timestream Data.
2. Choose the Timestream dataset to open it.
3. On the dataset details page that opens, choose the Permissionstab.
Currently, you can use a Timestream connection only for a single table in a dataset. To add data from
multiple Timestream tables in a single dataset, create an additional QuickSight data source connection
for each table.
1. Choose Datasets at left, then scroll down to find the data source card for your Timestream
connection. If you have many data sources, you can use the search bar at the top of the page to find
your data source with a partial match on the name.
2. Choose the Timestream data source card, and then choose Create data set.
3. For Database, choose Select to view a list of available databases and choose the one that you want
to use.
4. For Tables, choose the table that you want to use.
5. Choose Edit/Preview.
6. (Optional) To add more data, use the following steps:
93
Amazon QuickSight User Guide
Creating datasets
Creating datasets
To create a dataset, choose New data set on the Datasets page. You can then create a dataset based on
an existing dataset or data source, or connect to a new data source and base the dataset on that.
Topics
• Creating datasets using new data sources (p. 94)
• Creating a dataset using an existing data source (p. 98)
• Creating a dataset using an existing dataset in Amazon QuickSight (p. 101)
• For local text or Microsoft Excel files, you can simply identify the file location and upload the file.
• For Amazon S3, provide a manifest identifying the files or buckets that you want to use, and also the
import settings for the target files.
• For Amazon Athena, all Athena databases for your AWS account are returned. No additional
credentials are required.
• For Salesforce, provide credentials to connect with.
94
Amazon QuickSight User Guide
From new data sources
• For Amazon Redshift, Amazon RDS, Amazon EC2, or other database data sources, provide information
about the server and database that host the data. Also provide valid credentials for that database
instance.
When creating a new database dataset, you can select one table, join several tables, or create a SQL
query to retrieve the data that you want. You can also change whether the dataset uses a direct query or
instead stores data in SPICE (p. 132).
When you create a dataset based on an AWS service like Amazon RDS, Amazon Redshift, or Amazon EC2,
data transfer charges might apply when consuming data from that source. Those charges might also vary
depending on whether that AWS resource is in the home AWS Region that you chose for your Amazon
QuickSight account. For details on pricing, see the pricing page for the service in question.
Topics
• Creating a dataset from a database (p. 95)
Creating a dataset from an autodiscovered Amazon Redshift cluster or Amazon RDS instance
Use the following procedure to create a connection to an autodiscovered AWS data source.
1. Check Data source quotas (p. 68) to make sure that your target table or query doesn't exceed data
source quotas.
2. Confirm that the database credentials you plan to use have appropriate permissions as described in
Required permissions (p. 944).
3. Make sure that you have configured the cluster or instance for Amazon QuickSight access by
following the instructions in Network and database configuration requirements (p. 1036).
4. On the Amazon QuickSight start page, choose Datasets.
5. On the Datasets page, choose New dataset.
6. In the FROM NEW DATA SOURCES section of the Create a Data Set page, choose either the RDS or
the Redshift Auto-discovered icon, depending on the AWS service that you want to connect to.
7. Enter the connection information for the data source, as follows:
• For Data source name, enter a name for the data source.
• For Instance ID, choose the name of the instance or cluster that you want to connect to.
• Database name shows the default database for the Instance ID cluster or instance. To use a
different database on that cluster or instance, enter its name.
• For UserName, enter the user name of an account that has permissions to do the following:
• Access the target database.
95
Amazon QuickSight User Guide
From new data sources
• Read (perform a SELECT statement on) any tables in that database that you want to use.
• For Password, enter the password for the user account that you entered.
8. Choose Validate connection to verify your connection information is correct.
9. If the connection validates, choose Create data source. If not, correct the connection information
and try validating again.
Note
Amazon QuickSight automatically secures connections to Amazon RDS instances and
Amazon Redshift clusters by using Secure Sockets Layer (SSL). You don't need to do
anything to enable this.
10. Choose one of the following:
• Custom SQL
On the next screen, you can choose to write a query with the Use custom SQL option. Doing this
opens a screen named Enter custom SQL query, where you can enter a name for your query, and
then enter the SQL. For best results, compose the query in a SQL editor, and then paste it into
this window. After you name and enter the query, you can choose Edit/Preview data or Confirm
query. Choose Edit/Preview data to immediately go to data preparation. Choose Confirm query
to validate the SQL and make sure that there are no errors.
• Choose tables
To connect to specific tables, for Schema: contain sets of tables, choose Select and then choose
a schema. In some cases where there is only a single schema in the database, that schema is
automatically chosen, and the schema selection option isn't displayed.
To prepare the data before creating an analysis, choose Edit/Preview data to open data
preparation. Use this option if you want to join to more tables.
• Prepare the data before creating an analysis. To do this, choose Edit/Preview data to open data
preparation for the selected table. For more information about data preparation, see Preparing
dataset examples (p. 374).
• Create a dataset and analysis using the table data as-is and to import the dataset data into SPICE
for improved performance (recommended). To do this, check the table size and the SPICE indicator
to see if you have enough capacity.
If you have enough SPICE capacity, choose Import to SPICE for quicker analytics, and then create
an analysis by choosing Visualize.
Note
If you want to use SPICE and you don't have enough space, choose Edit/Preview data. In
data preparation, you can remove fields from the dataset to decrease its size. You can also
apply a filter or write a SQL query that reduces the number of rows or columns returned.
For more information about data preparation, see Preparing dataset examples (p. 374).
• To create a dataset and an analysis using the table data as-is, and to have the data queried directly
from the database, choose the Directly query your data option. Then create an analysis by
choosing Visualize.
Use the following procedure to create a connection to any database other than an autodiscovered
Amazon Redshift cluster or Amazon RDS instance. Such databases include Amazon Redshift clusters and
Amazon RDS instances that are in a different AWS Region or are associated with a different AWS account.
96
Amazon QuickSight User Guide
From new data sources
They also include MariaDB, Microsoft SQL Server, MySQL, Oracle, and PostgreSQL instances that are on-
premises, in Amazon EC2, or in some other accessible environment.
1. Check Data source quotas (p. 68) to make sure that your target table or query doesn't exceed data
source quotas.
2. Confirm that the database credentials that you plan to use have appropriate permissions as
described in Required permissions (p. 944).
3. Make sure that you have configured the cluster or instance for Amazon QuickSight access by
following the instructions in Network and database configuration requirements (p. 1036).
4. On the Amazon QuickSight start page, choose Manage data.
5. On the Datasets page, choose New data set.
6. In the FROM NEW DATA SOURCES section of the Create a Data Set page, choose the Redshift
Manual connect icon if you want to connect to an Amazon Redshift cluster in another AWS Region
or associated with a different AWS account. Or choose the appropriate database management
system icon to connect to an instance of Amazon Aurora, MariaDB, Microsoft SQL Server, MySQL,
Oracle, or PostgreSQL.
7. Enter the connection information for the data source, as follows:
• For Data source name, enter a name for the data source.
• For Database server, enter one of the following values:
• For an Amazon Redshift cluster or Amazon RDS instance, enter the endpoint of the
cluster or instance without the port number. For example, if the endpoint value is
clustername.1234abcd.us-west-2.redshift.amazonaws.com:1234, then enter
clustername.1234abcd.us-west-2.redshift.amazonaws.com. You can get the
endpoint value from the Endpoint field on the cluster or instance detail page in the AWS
console.
• For an Amazon EC2 instance of MariaDB, Microsoft SQL Server, MySQL, Oracle, or PostgreSQL,
enter the public DNS address. You can get the public DNS value from the Public DNS field on
the instance detail pane in the Amazon EC2 console.
• For a non-Amazon EC2 instance of MariaDB, Microsoft SQL Server, MySQL, Oracle, or
PostgreSQL, enter the hostname or public IP address of the database server. If you are using
Secure Sockets Layer (SSL) for a secured connection (recommended), you likely need to provide
the hostname to match the information required by the SSL certificate. For a list of accepted
certificates see QuickSight SSL and CA certificates (p. 1038).
• For Port, enter the port that the cluster or instance uses for connections.
• For Database name, enter the name of the database that you want to use.
• For UserName, enter the user name of an account that has permissions to do the following:
• Access the target database.
• Read (perform a SELECT statement on) any tables in that database that you want to use.
• For Password, enter the password associated with the user account you entered.
8. (Optional) If you are connecting to anything other than an Amazon Redshift cluster and you don't
want a secured connection, make sure that Enable SSL is clear. We strongly recommend leaving this
checked, because an unsecured connection can be open to tampering.
For more information on how the target instance uses SSL to secure connections, see the
documentation for the target database management system. Amazon QuickSight doesn't accept
self-signed SSL certificates as valid. For a list of accepted certificates, see QuickSight SSL and CA
certificates (p. 1038).
97
Amazon QuickSight User Guide
From existing data sources
Amazon QuickSight automatically secures connections to Amazon Redshift clusters by using SSL.
You don't need to do anything to enable this.
Some databases, such as Presto and Apache Spark, must meet additional requirements before
Amazon QuickSight can connect. For more information, see Creating a data source using
Presto (p. 88), or Creating a data source using Apache Spark (p. 87).
9. (Optional) Choose Validate connection to verify your connection information is correct.
10. If the connection validates, choose Create data source. If not, correct the connection information
and try validating again.
11. Choose one of the following:
• Custom SQL
On the next screen, you can choose to write a query with the Use custom SQL option. Doing this
opens a screen named Enter custom SQL query, where you can enter a name for your query, and
then enter the SQL. For best results, compose the query in a SQL editor, and then paste it into
this window. After you name and enter the query, you can choose Edit/Preview data or Confirm
query. Choose Edit/Preview data to immediately go to data preparation. Choose Confirm query
to validate the SQL and make sure that there are no errors.
• Choose tables
To connect to specific tables, for Schema: contain sets of tables, choose Select and then choose
a schema. In some cases where there is only a single schema in the database, that schema is
automatically chosen, and the schema selection option isn't displayed.
To prepare the data before creating an analysis, choose Edit/Preview data to open data
preparation. Use this option if you want to join to more tables.
• Prepare the data before creating an analysis. To do this, choose Edit/Preview data to open data
preparation for the selected table. For more information about data preparation, see Preparing
dataset examples (p. 374).
• Create a dataset and an analysis using the table data as-is and import the dataset data into SPICE
for improved performance (recommended). To do this, check the table size and the SPICE indicator
to see if you have enough space.
If you have enough SPICE capacity, choose Import to SPICE for quicker analytics, and then create
an analysis by choosing Visualize.
Note
If you want to use SPICE and you don't have enough space, choose Edit/Preview data. In
data preparation, you can remove fields from the dataset to decrease its size. You can also
apply a filter or write a SQL query that reduces the number of rows or columns returned.
For more information about data preparation, see Preparing dataset examples (p. 374).
• Create a dataset and an analysis using the table data as-is and have the data queried directly from
the database. To do this, choose the Directly query your data option. Then create an analysis by
choosing Visualize.
98
Amazon QuickSight User Guide
From existing data sources
DATA SOURCES section of the Create a Data Set page. You can use these existing data sources to create
new datasets without respecifying connection information.
In the FROM EXISTING DATA SOURCES section of the Create a Data Set page, choose the
connection profile icon for the existing data source that you want to use. Connection profiles are
labeled with the data source icon and the name provided by the person who created the connection.
3. Choose Create data set.
Amazon QuickSight creates a connection profile for this data source based only on the Athena
workgroup. The database and table aren't saved.
4. On the Choose your table screen, do one of the following:
• Custom SQL
99
Amazon QuickSight User Guide
From existing data sources
On the next screen, you can choose to write a query with the Use custom SQL option. Doing this
opens a screen named Enter custom SQL query, where you can enter a name for your query, and
then enter the SQL. For best results, compose the query in a SQL editor, and then paste it into
this window. After you name and enter the query, you can choose Edit/Preview data or Confirm
query. Choose Edit/Preview data to immediately go to data preparation. Choose Confirm query
to validate the SQL and make sure that there are no errors.
• Choose tables
To connect to specific tables, for Data elements: contain your data, choose Select and then
choose either REPORT or OBJECT.
To prepare the data before creating an analysis, choose Edit/Preview data to open data
preparation. Use this option if you want to join to more tables.
• To create a dataset and an analysis using the data as-is, choose Visualize.
Note
If you don't have enough SPICE (p. 132) capacity, choose Edit/Preview data. In data
preparation, you can remove fields from the dataset to decrease its size or apply a filter
that reduces the number of rows returned. For more information about data preparation,
see Preparing dataset examples (p. 374).
• To prepare the data before creating an analysis, choose Edit/Preview data to open data
preparation for the selected report or object. For more information about data preparation, see
Preparing dataset examples (p. 374).
• Custom SQL
On the next screen, you can choose to write a query with the Use custom SQL option. Doing this
opens a screen named Enter custom SQL query, where you can enter a name for your query, and
then enter the SQL. For best results, compose the query in a SQL editor, and then paste it into
this window. After you name and enter the query, you can choose Edit/Preview data or Confirm
query. Choose Edit/Preview data to immediately go to data preparation. Choose Confirm query
to validate the SQL and make sure that there are no errors.
• Choose tables
To connect to specific tables, for Schema: contain sets of tables, choose Select and then choose
a schema. In some cases where there is only a single schema in the database, that schema is
automatically chosen, and the schema selection option isn't displayed.
To prepare the data before creating an analysis, choose Edit/Preview data to open data
preparation. Use this option if you want to join to more tables.
100
Amazon QuickSight User Guide
From existing datasets
• Prepare the data before creating an analysis. To do this, choose Edit/Preview data to open data
preparation for the selected table. For more information about data preparation, see Preparing
dataset examples (p. 374).
• Create a dataset and an analysis using the table data as-is and import the dataset data into
SPICE (p. 132) for improved performance (recommended). To do this, check the SPICE indicator
to see if you have enough space.
If you have enough SPICE capacity, choose Import to SPICE for quicker analytics, and then create
an analysis by choosing Visualize.
Note
If you want to use SPICE and you don't have enough space, choose Edit/Preview data. In
data preparation, you can remove fields from the dataset to decrease its size. You can also
apply a filter or write a SQL query that reduces the number of rows or columns returned.
For more information about data preparation, see Preparing dataset examples (p. 374).
• Create a dataset and an analysis using the table data as-is and have the data queried directly from
the database. To do this, choose the Directly query your data option. Then create an analysis by
choosing Visualize.
Creating datasets from existing QuickSight datasets has the following advantages:
• Central management of datasets – Data engineers can easily scale to the needs of multiple teams
within their organization. To do this, they can develop and maintain a few general-purpose datasets
that describe the organization's main data models.
• Reduction of data source management – Business analysts (BAs) often spend lots of time and effort
requesting access to databases, managing database credentials, finding the right tables, and managing
QuickSight data refresh schedules. Building new datasets from existing datasets means that BAs don't
have to start from scratch with raw data from databases. They can start with curated data.
• Predefined key metrics – By creating datasets from existing datasets, data engineers can centrally
define and maintain critical data definitions across their company's many organizations. Examples
might be sales growth and net marginal return. With this feature, data engineers can also distribute
changes to those definitions. This approach means that their business analysts can get started with
visualizing the right data more quickly and reliably.
• Flexibility to customize data – By creating datasets from existing datasets, business analysts get more
flexibility to customize datasets for their own business needs. They can avoid worry about disrupting
data for other teams.
For example, let's say that you're part of an ecommerce central team of five data engineers. You and
your team has access to sales, orders, cancellations, and returns data in a database. You have created a
QuickSight dataset by joining 18 other dimension tables through a schema. A key metric that your team
101
Amazon QuickSight User Guide
From existing datasets
has created is the calculated field, order product sales (OPS). Its definition is: OPS = product quantity x
price.
Your team serves over 100 business analysts across 10 different teams in eight countries. These are the
Coupons team, the Outbound Marketing team, the Mobile Platform team, and the Recommendations
team. All of these teams use the OPS metric as a base to analyze their own business line.
Rather than manually creating and maintaining hundreds of unconnected datasets, your team reuses
datasets to create multiple levels of datasets for teams across the organization. Doing this centralizes
data management and allows each team to customize the data for their own needs. At the same
time, this syncs updates to the data, such as updates to metric definitions, and maintains row-level
and column-level security. For example, individual teams in your organization can use the centralized
datasets. They can then combine them with the data specific to their team to create new datasets and
build analyses on top of them.
Along with using the key OPS metric, other teams in your organization can reuse column metadata from
the centralized datasets that you created. For example, the Data Engineering team can define metadata,
such as name, description, data type, and folders, in a centralized dataset. All subsequent teams can use it.
Note
Amazon QuickSight supports creating up to two additional levels of datasets from a single
dataset.
For example, from a parent dataset, you can create a child dataset and then a grandchild
dataset for a total of three dataset levels.
1. From the QuickSight start page, choose Datasets in the pane at left.
2. On the Datasets page, choose the dataset that you want to use to create a new dataset.
3. On the page that opens for that dataset, choose the drop-down menu for Use in analysis, and then
choose Use in dataset.
The data preparation page opens and preloads everything from the parent dataset, including
calculated fields, joins, and security settings.
4. On the data preparation page that opens, for Query mode at bottom left, choose how you want
the dataset to pull in changes and updates from the original, parent dataset. You can choose the
following options:
• Direct query – This is the default query mode. If you choose this option, the data for this dataset
automatically refreshes when you open an associated dataset, analysis, or dashboard. However,
the following limitations apply:
• If the parent dataset allows direct querying, you can use direct query mode in the child dataset.
• If you have multiple parent datasets in a join, you can choose direct query mode for your child
dataset only if all the parents are from the same underlying data source. For example, the same
Amazon Redshift connection.
102
Amazon QuickSight User Guide
From existing datasets
• Direct query is supported for a single SPICE parent dataset. It is not supported for multiple
SPICE parent datasets in a join.
• SPICE – If you choose this option, you can set up a schedule for your new dataset to sync with the
parent dataset. For more information about creating SPICE refresh schedules for datasets, see
Refreshing SPICE data (p. 133).
5. (Optional) Prepare your data for analysis. For more information about preparing data, see Preparing
data in Amazon QuickSight (p. 147).
6. (Optional) Set up row-level or column-level security (RLS/CLS) to restrict access to the dataset. For
more information about setting up RLS, see Using row-level security (RLS) with user-based rules to
restrict access to a dataset (p. 109). For more information about setting up CLS, see Using column-
level security (CLS) to restrict access to a dataset (p. 121).
Note
You can set up RLS/CLS on child datasets only. RLS/CLS on parent datasets is not
supported.
7. When you're finished, choose Save & publish to save your changes and publish the new child
dataset. Or choose Publish & visualize to publish the new child dataset and begin visualizing your
data.
Use the following procedure to learn how to restrict others from creating new datasets from your
dataset.
1. From the QuickSight start page, choose Datasets in the pane at left.
2. On the Datasets page, choose the dataset that you want to restrict creating new datasets from.
3. On the page that opens for that dataset, choose Edit dataset.
4. On the data preparation page that opens, choose Manage at upper right, and then choose
Properties.
5. In the Dataset properties pane that opens, choose from the following options:
• To restrict anyone from creating any type of new datasets from this dataset, turn off Allow new
datasets to be created from this one.
The toggle is blue when creating new datasets is allowed. It's gray when creating new datasets
isn't allowed.
• To restrict others from creating direct query datasets, clear Allow direct query.
• To restrict others from creating SPICE copies of your dataset, clear Allow SPICE copies.
For more information about SPICE datasets, see Importing data into SPICE (p. 132).
103
Amazon QuickSight User Guide
Editing datasets
Editing datasets
You can edit an existing dataset to perform data preparation. For more information about Amazon
QuickSight data preparation functionality, see Preparing data in Amazon QuickSight (p. 147).
You can open a dataset for editing from the Datasets page, or from the analysis page. Editing a dataset
from either location modifies the dataset for all analyses that use it.
The data preparation page opens. For more information about the types of edits you can make to
datasets, see Preparing data in Amazon QuickSight (p. 147).
1. In your analysis, choose the pencil icon at the top of the Fields list pane.
2. In Data sets in this analysis page that opens, choose the three dots at right of the dataset that you
want to edit, and then choose Edit.
The dataset opens in the data preparation page.For more information about the types of edits you
can make to datasets, see Preparing data in Amazon QuickSight (p. 147).
• Only the most recent 1,000 versions of a dataset are shown in the publishing history, and are available
for versioning.
104
Amazon QuickSight User Guide
Troubleshooting
• After you exceed 1,000 published versions, the oldest versions are automatically removed from the
publishing history, and the dataset can no longer be reverted back to them.
For more information about editing datasets, see Editing datasets (p. 104).
3. On the dataset preparation page that opens, choose the Manage icon in the blue toolbar at upper
right, and then choose Publishing history.
The dataset is reverted and a confirmation message appears. The Publishing history pane also
updates to show the active version of the dataset.
• The dataset uses one or more data sources that were deleted.
If this error occurs, you can't revert the dataset to a previous version.
• Reverting would make a calculated field not valid.
If this error occurs, you can edit or remove the calculated field, and then save the dataset. Doing this
creates a new version of the dataset.
• One or more columns are missing in the data source.
If this error occurs, QuickSight shows the latest schema from the data source in the preview to
reconcile differences between versions. Any calculated field, field name, field type, and filter changes
shown in the schema preview are from the version that you want to revert to. You can save this
105
Amazon QuickSight User Guide
Duplicating datasets
reconciled schema as a new version of the dataset. Or you can return to the active (latest) version by
choosing Preview on the top (latest) version in the publishing history.
Duplicating datasets
You can duplicate an existing dataset to save a copy of it with a new name. The new dataset is a
completely separate copy.
The Duplicate dataset option is available if both of the following are true: you own the dataset and you
have permission to the data source.
To duplicate a dataset
4. On the Duplicate dataset page that opens, give the duplicated dataset a name, and then choose
Duplicate.
The duplicated dataset details page opens. From this page, you can edit the dataset, set up a refresh
schedule, and more.
Changing datasets
In two situations, changes to a dataset might cause concern. One is if you deliberately edit the dataset.
The other is if your data source has changed so much that it affects the analyses based on it.
Important
Analyses that are in production usage should be protected so they continue to function
correctly.
• Document your data sources and datasets, and the visuals that rely upon them. Documentation should
include screenshots, fields used, placement in field wells, filters, sorts, calculations, colors, formatting,
and so on. Record everything that you need to recreate the visual. You can also track which QuickSight
resources use a dataset in the dataset management options. For more information, see Tracking
dashboards and analyses that use a dataset (p. 108).
• When you edit a dataset, try not to make changes that might break existing visuals. For example, don't
remove columns that are being used in a visual. If you must remove a column, create a calculated
column in its place. The replacement column should have the same name and data type as the original.
• If your data source or dataset changes in your source database, adapt your visual to accommodate the
change, as described previously. Or you can try to adapt the source database. For example, you might
create a view of the source table (document). Then if the table changes, you can adjust the view to
include or exclude columns (attributes), change data types, fill null values, and so on. Or, in another
106
Amazon QuickSight User Guide
Sharing datasets
circumstance, if your dataset is based on a slow SQL query, you might create a table to hold the results
of the query.
If you can't sufficiently adapt the source of the data, recreate the visuals based on your documentation
of the analysis.
• If you no longer have access to a data source, your analyses based on that source are empty. The
visuals that you created still exist, but they can't display until they have some data to show. This result
can happen if permissions are changed by your administrator.
• If you remove the dataset a visual is based on, you might need to recreate it from your documentation.
You can edit the visual and select a new dataset to use with it. If you need to consistently use a new
file to replace an older one, store your data in a location that is consistently available. For example,
you might store your .csv file in Amazon S3 and create an S3 dataset to use for your visuals. For more
information on access files stored in S3, see Creating a dataset using Amazon S3 files (p. 79).
Or you can import the data into a table, and base your visual on a query. This way, the data structures
don't change, even if the data contained in them changes.
• To centralize data management, consider creating general, multiple-purpose datasets that others can
use to create their own datasets from. For more information, see Creating a dataset using an existing
dataset in Amazon QuickSight (p. 101).
Sharing datasets
You can give other Amazon QuickSight users and groups access to a dataset by sharing it with them.
Then they can create analyses from it. If you make them co-owners, they can also refresh, edit, delete, or
reshare the dataset.
Sharing a dataset
If you have owner permissions on a dataset, use the following procedure to share it.
To share a dataset
4. Enter the user or group that you want to share this dataset with, and then choose Add. You can only
invite users who belong to the same QuickSight account.
Repeat this step until you have entered information for everyone you want to share the dataset
with.
5. For the Permissions column, choose a role for each user or group to give them permissions on the
dataset.
Choose Viewer to allow the user to create analyses and datasets from the dataset. Choose Owner to
allow the user to do that and also refresh, edit, delete, and reshare the dataset.
107
Amazon QuickSight User Guide
Viewing and editing the permissions
of users that a dataset is shared with
Users receive emails with a link to the dataset. Groups don't receive invitation emails.
To view, edit, or change user access to a dataset if you have owner permissions for it
A list of all users and groups with access to the dataset is displayed.
4. (Optional) To change permission roles for a user or group, choose the drop-down menu in the
Permissions column for the user or group. Then choose either Viewer or Owner.
A list of all users and groups with access to the dataset is displayed.
4. In the Actions column for the user or group, choose Revoke access.
Use the following procedure to see which dashboards and analyses use a dataset.
1. From the QuickSight start page, choose Datasets in the pane at left.
2. On the Datasets page, choose the dataset that you want to track resources for.
3. In the page that opens for that dataset, choose Edit dataset.
108
Amazon QuickSight User Guide
Using row-level security (RLS)
4. In the data preparation page that opens, choose Manage at upper right, and then choose Usage.
5. The dashboards and analyses that use the dataset are listed in the pane that opens.
In the Enterprise edition of Amazon QuickSight, you can restrict access to a dataset by configuring row-
level security (RLS) on it. You can do this before or after you have shared the dataset. When you share
a dataset with RLS with dataset owners, they can still see all the data. When you share it with readers,
however, they can only see the data restricted by the permission dataset rules.
Also, when you embed Amazon QuickSight dashboards in your application for unregistered users of
QuickSight, you can use row-level security (RLS) with tags. In this case, you use tags to specify which data
your users can see in the dashboard depending on who they are.
You can restrict access to a dataset using user name or group-based rules, tag-based rules, or both.
Choose user-based rules if you want to secure data for users or groups provisioned (registered) in
QuickSight. To do so, select a permissions dataset that contains rules set by columns for each user or
group accessing the data. Only users or groups identified in the rules have access to data.
Choose tag-based rules only if you are using embedded dashboards and want to secure data for users
not provisioned (unregistered users) in QuickSight. To do so, define tags on columns to secure data.
Values to tags must be passed when embedding dashboards.
Topics
• Using row-level security (RLS) with user-based rules to restrict access to a dataset (p. 109)
• Using row-level security (RLS) with tag-based rules to restrict access to a dataset when embedding
dashboards for anonymous users (p. 114)
In the Enterprise edition of Amazon QuickSight, you can restrict access to a dataset by configuring row-
level security (RLS) on it. You can do this before or after you have shared the dataset. When you share
a dataset with RLS with dataset owners, they can still see all the data. When you share it with readers,
however, they can only see the data restricted by the permission dataset rules. By adding row-level
security, you can further control their access.
Note
When applying SPICE datasets to row-level security, each field in the dataset can contain
up to 2,047 Unicode characters. Fields that contain more than this quota are truncated
109
Amazon QuickSight User Guide
Using user-based rules
during ingestion. To learn more about SPICE data quotas, see SPICE quotas for imported
data (p. 68).
To do this, you create a query or file that has one column named UserName, GroupName, or both. Or
you can create a query or file that has one column named UserARN, GroupARN, or both. You can think
of this as adding a rule for that user or group. Then you can add one column to the query or file for each
field that you want to grant or restrict access to. For each user or group name that you add, you add the
values for each field. You can use NULL (no value) to mean all values. To see examples of dataset rules,
see Creating dataset rules for row-level security (p. 111).
To apply the dataset rules, you add the rules as a permissions dataset to your dataset. Keep in mind the
following points:
• The permissions dataset can't contain duplicate values. Duplicates are ignored when evaluating how to
apply the rules.
• Each user or group specified can see only the rows that match the field values in the dataset rules.
• If you add a rule for a user or group and leave all other columns with no value (NULL), you grant them
access to all the data.
• If you don't add a rule for a user or group, that user or group can't see any of the data.
• The full set of rule records that are applied per user must not exceed 999. This limitation applies to the
total number of rules that are directly assigned to a user name, plus any rules that are assigned to the
user through group names.
• If a field includes a comma (,) Amazon QuickSight treats each word separated from another by a
comma as an individual value in the filter. For example, in ('AWS', 'INC'), AWS,INC is considered
as two strings: AWS and INC. To filter with AWS,INC, wrap the string with double quotation marks in
the permissions dataset.
If the restricted dataset is a SPICE dataset, the number of filter values applied per user can't exceed
192,000 for each restricted field. This applies to the total number of filter values that are directly
assigned to a user name, plus any filter values that are assigned to the user through group names.
If the restricted dataset is a direct query dataset, the number of filter values applied per user varies
from data sources.
Exceeding the filter value limit may cause the visual rendering to fail. We recommend adding an
additional column to your restricted dataset to divide the rows into groups based on the original
restricted column so that the filter list can be shortened.
Amazon QuickSight treats spaces as literal values. If you have a space in a field that you are restricting,
the dataset rule applies to those rows. Amazon QuickSight treats both NULLs and blanks (empty strings
"") as "no value". A NULL is an empty field value.
Depending on what data source your dataset is coming from, you can configure a direct query to access a
table of permissions. Terms with spaces inside them don't need to be delimited with quotes. If you use a
direct query, you can easily change the query in the original data source.
Or you can upload dataset rules from a text file or spreadsheet. If you are using a comma-separated
value (CSV) file, don't include any spaces on the given line. Terms with spaces inside them need to
be delimited with quotation marks. If you use dataset rules that are file-based, apply any changes by
overwriting the existing rules in the dataset's permissions settings.
Datasets that are restricted are marked with the word RESTRICTED in the Datasets screen.
Row-level security works only for fields containing textual data (string, char, varchar, and so on). It
doesn't currently work for dates or numeric fields. Anomaly detection is not supported for datasets that
use row-level security (RLS).
110
Amazon QuickSight User Guide
Using user-based rules
1. Create a file or a query that contains the dataset rules (permissions) for row-level security.
It doesn't matter what order the fields are in. However, all the fields are case-sensitive. Make sure
that they exactly match the field names and values.
The structure should look similar to one of the following. Make sure that you have at least one field
that identifies either users or groups. You can include both, but only one is required, and only one is
used at a time. The field that you use for users or groups can have any name you choose.
Note
If you are specifying groups, use only Amazon QuickSight groups or Microsoft AD groups.
US-Sales US Enterprise
US-Sales US Startup
Corporate-Reporting
MarthaRivera US Enterprise
NikhilJayashankar US SMB,Startup
PauloSantos US Startup
sales-
[email protected]
The following example shows a table with user and group Amazon Resource Names (ARNs).
111
Amazon QuickSight User Guide
Using user-based rules
arn:aws:quicksight:us- arn:aws:quicksight:us- US
east-1:123456789012:user/ east-1:123456789012:group/
default/Sam default/group-2
Or if you use a .csv file, the structure should look similar to one of the following.
UserName,Region,Segment
AlejandroRosalez,EMEA,"Enterprise,SMB,Startup"
MarthaRivera,US,Enterprise
NikhilJayashankars,US,SMB
PauloSantos,US,Startup
SaanviSarkar,APAC,"SMB,Startup"
[email protected],"",""
ZhangWei,APAC-Sales,"Enterprise,Startup"
GroupName,Region,Segment
EMEA-Sales,EMEA,"Enterprise,SMB,Startup"
US-Sales,US,Enterprise
US-Sales,US,SMB
US-Sales,US,Startup
APAC-Sales,APAC,"SMB,Startup"
Corporate-Reporting,"",""
APAC-Sales,APAC,"Enterprise,Startup"
UserARN,GroupARN,Region
arn:aws:quicksight:us-east-1:123456789012:user/Bob,arn:aws:quicksight:us-
east-1:123456789012:group/group-1,APAC
arn:aws:quicksight:us-east-1:123456789012:user/Sam,arn:aws:quicksight:us-
east-1:123456789012:group/group-2,US
/* for users*/
select User as UserName, Region, Segment
from tps-permissions;
/* for groups*/
select Group as GroupName, Region, Segment
from tps-permissions;
2. Create a dataset for the dataset rules. To make sure that you can easily find it, give it a meaningful
name, for example Permissions-Sales-Pipeline.
112
Amazon QuickSight User Guide
Using user-based rules
1. Confirm that you have added your rules as a new dataset. If you added them, but don't see them
under the list of datasets, refresh the screen.
2. On the Datasets page, choose the dataset
3. On the dataset details page that opens, for Row-level security, choose Set up.
4. On the Set up row-level security page that opens, choose User-based rules.
5. From the list of datasets that appears, choose your permissions dataset.
If your permissions dataset doesn't appear on this screen, return to your datasets, and refresh the
page.
6. For Permissions policy choose Grant access to dataset. Each dataset has only one active
permissions dataset. If you try to add a second permissions dataset, it overwrites the existing one.
Important
Some restrictions apply to NULL and empty string values when working with row-level
security:
• If your dataset has NULL values or empty strings ("") in the restricted fields, these rows
are ignored when the restrictions are applied.
• Inside the permissions dataset, NULL values and empty strings are treated the same. For
more information, see the following table.
• To prevent accidentally exposing sensitive information, Amazon QuickSight skips empty
RLS rules that grant access to everyone. An empty RLS rule occurs when all columns of
a row have no value. QuickSight RLS treats NULL, empty strings (""), or empty comma
separated strings (for example ",,,") as no value.
• After skipping empty rules, other nonempty RLS rules still apply.
• If a permission dataset has only empty rules and all of them were skipped, no one will
have access to any data restricted by this permission dataset.
113
Amazon QuickSight User Guide
Using tag-based rules
Anyone whom you shared your dashboard with can see all the data in it, unless the dataset is
restricted by dataset rules.
7. Choose Apply dataset to save your changes. Then, on the Save data set rules? page, choose Apply
and activate. Changes in permissions apply immediately to existing users.
8. (Optional) To remove permissions, first remove the dataset rules from the dataset.
Make certain that the dataset rules are removed. Then, choose the permissions dataset and choose
Remove data set.
To overwrite permissions, choose a new permissions dataset and apply it. You can reuse the same
dataset name. However, make sure to apply the new permissions in the Permissions screen to
make these permissions active. SQL queries dynamically update, so these can be managed outside
of Amazon QuickSight. For queries, the permissions are updated when the direct query cache is
automatically refreshed.
If you delete a file-based permissions dataset before you remove it from the target dataset, restricted
users can't access the dataset. While the dataset is in this state, it remains marked as RESTRICTED.
However, when you view Permissions for that dataset, you can see that it has no selected dataset rules.
To fix this, specify new dataset rules. Creating a dataset with the same name is not enough to fix this.
You must choose the new permissions dataset on the Permissions screen. This restriction doesn't apply
to direct SQL queries.
When you embed Amazon QuickSight dashboards in your application for users who are not provisioned
(registered) in QuickSight, you can use row-level security (RLS) with tags. In this case, you use tags to
specify which data your users can see in the dashboard depending on who they are.
For example, let's say you're a logistics company that has a customer-facing application for various
retailers. Thousands of users from these retailers access your application to see metrics related to how
their orders are getting shipped from your warehouse.
114
Amazon QuickSight User Guide
Using tag-based rules
You don't want to manage thousands of users in QuickSight, so you use anonymous embedding to
embed the selected dashboards in your application that your authenticated and authorized users can
see. However, you want to make sure retailers see only data that is for their business and not for others.
You can use RLS with tags to make sure your customers only see data that's relevant to them.
For more information about embedding dashboards for anonymous users using the
GenerateEmbedUrlForAnonymousUser API operation, see Embedding QuickSight data dashboards
for everyone (p. 794).
Before you can use RLS with tags, keep in mind the following points:
• Using RLS with tags is currently only supported for anonymous embedding, specifically for embedded
dashboards that use the GenerateEmbedUrlForAnonymousUser API operation.
• Using RLS with tags isn't supported for embedded dashboards that use the
GenerateEmbedURLForRegisteredUser API operation or the old GetDashboardEmbedUrl API
operation.
• RLS tags aren't supported with AWS Identity and Access Management (IAM) or the QuickSight identity
type.
• When applying SPICE datasets to row-level security, each field in the dataset can contain up to 2,047
Unicode characters. Fields that contain more than this quota are truncated during ingestion. To learn
more about SPICE data quotas, see SPICE quotas for imported data (p. 68).
115
Amazon QuickSight User Guide
Using tag-based rules
4. On the Set up row-level security page that opens, choose Tag-based rules.
5. For Column, choose a column that you want to add tag rules to.
For example, in the case for the logistics company, the retailer_id column is used.
For example, in the case for the logistics company, the tag key tag_retailer_id is used. Doing
this sets row-level security based on the retailer that's accessing the application.
7. (Optional) For Delimiter, choose a delimiter from the list, or enter your own.
You can use delimiters to separate text strings when assigning more than one value to a tag. The
value for a delimiter can be 10 characters long, at most.
8. (Optional) For Match all, choose the *, or enter your own character or characters.
This option can be any character that you want to use when you want to filter by all the values in
that column in the dataset. Instead of listing the values one by one, you can use the character. If this
value is specified, it can be at least one character, or at most 256 characters long
9. Choose Add.
The tag rule is added to the dataset and is listed at bottom, but it's not applied yet. To add another
tag rule to the dataset, repeat steps 5–9. To edit a tag rule, choose the pencil icon at right of the
rule. To delete a tag rule, choose the delete icon at right of the rule.
10. When you're ready to apply the tag rules to the dataset, choose Apply rules.
11. On the Turn on tag-based security? page that opens, choose Apply and activate.
The tag-based rules are now active. On the Set up row-level securitypage, a toggle appears for you
to turn tag rules on and off for the dataset.
To turn off all tag-based rules for the dataset, switch the Tag-Based toggle off, and then enter
"confirm" in the text box that appears.
116
Amazon QuickSight User Guide
Using tag-based rules
On the Datasets page, a lock icon appears in the dataset row to indicate that tag rules are enabled.
You can now use tag rules to set tag values at runtime, described in Step 2: Assign values to RLS tags
at runtime (p. 119). The rules only affect QuickSight readers when active.
Important
After tags are assigned and enabled on the dataset, make sure to give QuickSight authors
permissions to see any of the data in the dataset when authoring a dashboard.
To give QuickSight authors permission to see data in the dataset, create a permissions file
or query to use as dataset rules. For more information, see Creating dataset rules for row-
level security (p. 111).
CreateDataSet
The following is an example for creating a dataset that uses RLS with tags. It assumes the
scenario of the logistics company described previously. The tags are defined in the row-
level-permission-tag-configuration element. The tags are defined on the columns
that you want to secure the data for. For more information about this optional element, see
RowLevelPermissionTagConfiguration in the Amazon QuickSight API Reference.
create-data-set
--aws-account-id <value>
--data-set-id <value>
--name <value>
--physical-table-map <value>
[--logical-table-map <value>]
--import-mode <value>
[--column-groups <value>]
[--field-folders <value>]
[--permissions <value>]
[--row-level-permission-data-set <value>]
[--column-level-permission-rules <value>]
[--tags <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--row-level-permission-tag-configuration
'{
117
Amazon QuickSight User Guide
Using tag-based rules
"Status": "ENABLED",
"TagRules":
[
{
"TagKey": "tag_retailer_id",
"ColumnName": "retailer_id",
"TagMultiValueDelimiter": ",",
"MatchAllValue": "*"
},
{
"TagKey": "tag_role",
"ColumnName": "role"
}
]
}'
]
The tags in this example are defined in the TagRules part of the element. In this example, two tags
are defined based on two columns:
• The tag_retailer_id tag key is defined for the retailer_id column. In this case for
the logistics company, this sets row-level security based on the retailer that's accessing the
application.
• The tag_role tag key is defined for the role column. In this case for the logistics company,
this sets an additional layer of row-level security based on the role of the user accessing your
application from a specific retailer. An example is store_supervisor or manager.
For each tag, you can define TagMultiValueDelimiter and MatchAllValue. These are optional.
• TagMultiValueDelimiter – This option can be any string that you want to use to delimit the
values when you pass them at runtime. The value can be 10 characters long, at most. In this case,
a comma is used as the delimiter value.
• MatchAllValue – This option can be any character that you want to use when you want to filter
by all the values in that column in the dataset. Instead of listing the values one by one, you can
use the character. If specified, this value can be at least one character, or at most 256 characters
long. In this case, an asterisk is used as the match all value.
While configuring the tags for dataset columns, turn them on or off using the mandatory property
Status. For enabling the tag rules use the value ENABLED for this property. By turning on tag rules,
you can use them to set tag values at runtime, described in Step 2: Assign values to RLS tags at
runtime (p. 119).
{
"Status": 201,
"Arn": "arn:aws:quicksight:us-west-2:11112222333:dataset/RLS-Dataset",
"DataSetId": "RLS-Dataset",
"RequestId": "aa4f3c00-b937-4175-859a-543f250f8bb2"
}
UpdateDataSet
UpdateDataSet
You can use the UpdateDataSet API operation to add or update RLS tags for an existing dataset.
The following is an example of updating a dataset with RLS tags. It assumes the scenario of the
logistics company described previously.
118
Amazon QuickSight User Guide
Using tag-based rules
update-data-set
--aws-account-id <value>
--data-set-id <value>
--name <value>
--physical-table-map <value>
[--logical-table-map <value>]
--import-mode <value>
[--column-groups <value>
[--field-folders <value>]
[--row-level-permission-data-set <value>]
[--column-level-permission-rules <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--row-level-permission-tag-configuration
'{
"Status": "ENABLED",
"TagRules":
[
{
"TagKey": "tag_retailer_id",
"ColumnName": "retailer_id",
"TagMultiValueDelimiter": ",",
"MatchAllValue": "*"
},
{
"TagKey": "tag_role",
"ColumnName": "role"
}
]
}'
]
{
"Status": 201,
"Arn": "arn:aws:quicksight:us-west-2:11112222333:dataset/RLS-Dataset",
"DataSetId": "RLS-Dataset",
"RequestId": "aa4f3c00-b937-4175-859a-543f250f8bb2"
}
Important
After tags are assigned and enabled on the dataset, make sure to give QuickSight authors
permissions to see any of the data in the dataset when authoring a dashboard.
To give QuickSight authors permission to see data in the dataset, create a permissions file or
query to use as dataset rules. For more information, see Creating dataset rules for row-level
security (p. 111).
The following example shows how to assign values to RLS tags that were defined in the dataset in the
previous step.
POST /accounts/AwsAccountId/embed-url/anonymous-user
119
Amazon QuickSight User Guide
Using tag-based rules
HTTP/1.1
Content-type: application/json
{
“AwsAccountId”: “string”,
“SessionLifetimeInMinutes”: integer,
“Namespace”: “string”, // The namespace to which the anonymous end user virtually belongs
“SessionTags”: // Optional: Can be used for row-level security
[
{
“Key”: “tag_retailer_id”,
“Value”: “West,Central,South”
}
{
“Key”: “tag_role”,
“Value”: “shift_manager”
}
],
“AuthorizedResourceArns”:
[
“string”
],
“ExperienceConfiguration”:
{
“Dashboard”:
{
“InitialDashboardId”: “string”
// This is the initial dashboard ID the customer wants the user to land on. This ID
goes in the output URL.
}
}
}
HTTP/1.1 Status
Content-type: application/json
{
"EmbedUrl": "string",
"RequestId": "string"
}
• Values West, Central, and South are assigned to the tag_retailer_id tag at runtime. A comma
is used for the delimiter, which was defined in TagMultipleValueDelimiter in the dataset. To use
call values in the column, you can set the value to *, which was defined as the MatchAllValue when
creating the tag.
• The value shift_manager is assigned to the tag_role tag.
The user using the generated URL can view only the rows having the shift_manager value in the role
column. That user can view only the value West, Central, or South in the retailer_id column.
For more information about embedding dashboards for anonymous users using
the GenerateEmbedUrlForAnonymousUser API operation, see ??? (p. 794), or
GenerateEmbedUrlForAnonymousUser in the Amazon QuickSight API Reference
120
Amazon QuickSight User Guide
Column-level security (CLS)
If you use an analysis or dashboard that contains datasets with CLS restrictions that you don't have
access to, you can't create, view, or edit visuals that use the restricted fields. For most visual types, if a
visual has restricted columns that you don't have access to, you can't see the visual in your analysis or
dashboard.
Tables and pivot tables behave differently. If a table or pivot table uses restricted columns in the Rows
or Columns field wells, and you don't have access to these restricted columns, you can't see the visual
in an analysis or dashboard. If a table or pivot table has restricted columns in the Values field well, you
can see the table in an analysis or dashboard with only the values that you have access to. The values for
restricted columns show as Not Authorized.
4. Select the columns that you want to restrict, and then choose Next. By default, all groups and users
have access to all columns.
121
Amazon QuickSight User Guide
Deleting datasets
5. Choose who can access each column, and then choose Apply to save your changes.
• To create a new dashboard, choose Publish new dashboard as and enter a name for the new
dashboard.
• To replace an existing dashboard, choose Replace an existing dashboard and choose the
dashboard from the list.
Additionally, you can choose Advanced publish options. For more information, see Publishing
dashboards (p. 738).
5. Choose Publish dashboard.
6. (Optional) Do one of the following:
• To publish a dashboard without sharing, choose x at the upper right of the Share dashboard with
users screen when it appears. You can share the dashboard later by choosing Share from the
application bar.
• To share the dashboard, follow the procedure in Sharing Amazon QuickSight
dashboards (p. 740).
Deleting datasets
Important
Currently, deleting a dataset is irreversible and can cause irreversible loss of work. Deletes don't
cascade to delete dependent objects. Instead, dependent objects stop working, even if you
replace the deleted dataset with an identical dataset.
Before you delete a dataset, we strongly recommend that you first point each dependent analysis or
dashboard to a new dataset.
Currently, when you delete a dataset while dependent visuals still exist, the analyses and dashboards
that contain those visuals have no way to assimilate new metadata. They remain visible, but they can't
function. They can't be repaired by adding an identical dataset.
This is because datasets include metadata that is integral to the analyses and dashboards that depend
on that dataset. This metadata is uniquely generated for each dataset. Although the Amazon QuickSight
engine can read the metadata, it isn't readable by humans (for example, it doesn't contain field names).
So, an exact replica of the dataset has different metadata. Each dataset's metadata is unique, even for
multiple datasets that share the same name and the same fields.
To delete a dataset
1. Make sure that the dataset isn't being used by any analysis or dashboard that someone wants to
keep using.
On the Datasets page, choose the dataset that you no longer need. Then choose Delete Dataset at
upper-right.
122
Amazon QuickSight User Guide
Adding a dataset to an analysis
2. If you receive a warning if this dataset is in use, track down all dependent analyses and dashboards
and point them at a different dataset. If this isn't feasible, try one or more of these best practices
instead of deleting it:
We recommend that you use whatever means you can to inform owners of dependent objects that
this dataset is being deprecated. Also, make sure that you provide sufficient time for them to take
action.
3. After you make sure that there are no dependent objects that will stop functioning after the dataset
is deleted, choose the dataset and choose Delete Data Set. Confirm your choice, or choose Cancel.
Important
Currently, deleting a dataset is irreversible and can cause irreversible loss of work. Deletes don't
cascade to delete dependent objects. Instead, dependent objects stop working, even if you
replace the deleted dataset with an identical dataset.
After you have created an analysis, you can add more datasets to the analysis. Then, you can use them to
create more visuals.
From within the analysis, you can open any dataset for editing, for example to add or remove fields, or
perform other data preparation. You can also remove or replace data sets.
The currently selected dataset displays at the top of the Fields list pane. This is the dataset that is used
by the currently selected visual. Each visual can use only one dataset. Choosing a different visual changes
the selected dataset to the one used by that visual.
To change the selected dataset manually, choose the dataset list at the top of the Fields list pane and
then choose a different dataset. This deselects the currently selected visual if it doesn't use this dataset.
Then, choose a visual that uses the selected dataset. Or choose Add on the application bar and then Add
Visual to create a new visual using the selected dataset.
123
Amazon QuickSight User Guide
Add or edit a dataset
If you choose Suggested on the tool bar to see suggested visuals, you'll see visuals based on the
currently selected dataset.
Only filters for the currently selected dataset are shown in the Filter pane, and you can only create filters
on the currently selected dataset.
1. On the analysis page, choose the pencil-shaped edit icon at the top of the Fields list pane.
2. Choose Add dataset to add a dataset. Or, choose the pencil-shaped edit icon to edit a dataset. For
more information about editing a dataset, see Editing datasets (p. 104).
3. A list of your datasets appears. Choose a dataset and then choose Select. To cancel, choose Cancel.
124
Amazon QuickSight User Guide
Replacing datasets
Replacing datasets
In an analysis, you can add, edit, replace, or remove datasets. Use this section to learn how to replace
your dataset.
When you replace a dataset, the new dataset should have similar columns, if you expect the visual
to work the way you designed it. Replacing the dataset also clears the undo and redo history for the
analysis. This means you can't use the undo and redo buttons on the application bar to navigate your
changes. So, when you decide to change the dataset, your analysis design should be somewhat stable—
not in the middle of an editing phase.
To replace a dataset
1. On the analysis screen, choose the pencil icon above the dataset drop-down menu.
2. In the Data sets in this analysis page that opens, choose the ellipses next to the dataset that you
want to replace, and then choose Replace.
3. In the Select replacement dataset page, choose a dataset from the list, and then choose Select.
Note
Replacing a dataset clears the undo and redo history for this analysis.
4. In the Replacing dataset page, choose Replace.
The dataset is replaced with the new one. The field list and visuals are updated with the new dataset.
At this point, you can choose to add a new dataset, edit the new dataset, or replace it with a different
one. Choose Close to exit.
125
Amazon QuickSight User Guide
Remove a dataset from an analysis
If this happens, you can update the field mapping between the two datasets.
If the field is missing from the new dataset, choose Ignore this field.
3. Choose Confirm to confirm your updates.
4. Choose Close to close the page and return to your analysis.
The dataset is replaced with the new one. The fields list and visuals are updated with the new dataset.
Any visuals that were using a field that's now missing from the new dataset update to blank. You can
readd fields to the visual or remove the visual from your analysis.
If you change your mind after replacing the dataset, you can still recover. Let's say you replace the
dataset and then find that it's too difficult to change your analysis to match the new dataset. You can
undo any changes you made to your analysis. You can then replace the new dataset with the original
one, or with a dataset that more closely matches the requirements of the analysis.
1. On the analysis page, choose the dataset list at the top of the Fields list pane, and then choose Edit
analysis datasets.
2. In the Data sets in this analysis dialog box, choose the dataset that you want to delete, and then
choose the delete icon. You can't delete a dataset if it's the only one in the analysis.
126
Amazon QuickSight User Guide
Working with data sources
Topics
• Creating a data source (p. 127)
• Editing a data source (p. 129)
• Deleting a data source (p. 130)
As an analysis author in Amazon QuickSight, you don't need to understand anything about the
infrastructure that you use to connect to your data. You set up a new data source only once.
After a data source is set up, you can access it from its tile in the Amazon QuickSight console. You can
use it to create one or more datasets. After a dataset is set up, you can also access the dataset from its
tile. By abstracting away the technical details, Amazon QuickSight simplifies data connections.
Note
You don't need to store connection settings for files that you plan to upload manually. For more
information about file uploads, see Creating datasets (p. 94).
Before you begin adding a new data-source connection profile to Amazon QuickSight, first collect the
information that you need to connect to the data source. In some cases, you might plan to copy and
paste settings from a file. If so, make sure that the file doesn't contain formatting characters (list bullets
or numbers) or blank space characters (spaces, tabs). Also make sure that the file doesn't contain nontext
"gremlin" characters such as non-ASCII, null (ASCII 0), and control characters.
The following list includes the information to collect the most commonly used settings:
127
Amazon QuickSight User Guide
Creating a data source
Make sure that you know which source that you need to connect to for reporting. This source might be
different than the source that stores, processes, or provides access to the data.
For example, let's say that you're a new analyst in a large company. You want to analyze data from
your ordering system, which you know uses Oracle. However, you can't directly query the online
transaction processing (OLTP) data. A subset of data is extracted and stored in a bucket on Amazon S3,
but you don't have access to that either. Your new co-workers explain that they use AWS Glue crawlers
to read the files and AWS Lake Formation to access them. With more research, you learn that you need
to use an Amazon Athena query as your data source in Amazon QuickSight. The point here is that it
isn't always obvious which type of data source to choose.
• A descriptive name for the new data source tile.
Each new data source connection needs a unique and descriptive name. This name displays on the
Amazon QuickSight list of existing data sources, which is at the bottom of the Create a Data Set
screen. Use a name that makes it easy to distinguish your data sources from other similar data sources.
Your new Amazon QuickSight data source profile displays both the database software logo and the
custom name that you assign.
• The name of the server or instance to connect to.
A unique name or other identifier identifies the server connector of the data source on your network.
The descriptors vary depending on which one you're connecting to, but it's usually one or more of the
following:
• Hostname
• IP address
• Cluster ID
• Instance ID
• Connector
• Site-based URL
• The name of the collection of data that you want to use.
The descriptor varies depending on the data source, but it's usually one of the following:
• Database
• Warehouse
• S3 bucket
• Catalog
• Schema
Every time Amazon QuickSight connects using this data source profile (tile), it uses the user name from
the connection settings. In some cases, this might be your personal login. But if you're going to share
this with other people, ask the system administrator about creating credentials to use for Amazon
QuickSight connections.
• What type of connection to use. You can choose a public network or a VPC connection. If you have
more than one VPC connection available, identify which one to use to reach your source of data.
• Additional settings, such as Secure Sockets Layer (SSL) or API tokens, are required by some data
sources.
After you save the connection settings as a data source profile, you can create a dataset by selecting its
tile. The connections are stored as data source connection profiles in Amazon QuickSight.
128
Amazon QuickSight User Guide
Editing a data source
To view your existing connection profiles, open the Amazon QuickSight start page, choose Datasets,
choose New Dataset, and then scroll to the heading FROM EXISTING DATA SOURCES.
1. From the QuickSight start page, choose Datasets at left, and then choose New dataset.
2. Scroll down to the FROM EXISTING DATA SOURCES section and choose a database data source.
3. Choose Edit Data Source.
4. Modify the data source information:
• If you are editing an autodiscovered database data source, you can modify any of the following
settings:
• For Data source name, enter a name for the data source.
• For Instance ID, choose the name of the instance or cluster that you want to connect to from
the list provided.
• Database name shows the default database for the Instance ID cluster or instance. If you want
to use a different database on that cluster or instance, enter its name.
• For UserName, enter the user name of an account that has permissions to do the following:
• Access the target database.
• Read (perform a SELECT statement on) any tables in that database that you want to use.
• For Password, enter the password for the user account that you entered.
• If you are editing an external database data source, you can modify any of the following settings:
• For Data source name, enter a name for the data source.
• For Database server, enter one of the following values:
• For an Amazon Redshift cluster, enter the endpoint of the cluster without the port
number. For example, if the endpoint value is clustername.1234abcd.us-
west-2.redshift.amazonaws.com:1234, then enter clustername.1234abcd.us-
west-2.redshift.amazonaws.com. You can get the endpoint value from the Endpoint
field on the cluster detail page on the Amazon Redshift console.
• For an Amazon EC2 instance of PostgreSQL, MySQL, or SQL Server, enter the public DNS
address. You can get the public DNS value from the Public DNS field on the instance detail
pane in the EC2 console.
129
Amazon QuickSight User Guide
Deleting a data source
• For a non–Amazon EC2 instance of PostgreSQL, MySQL, or SQL Server, enter the hostname or
public IP address of the database server.
• For Port, enter the port that the cluster or instance uses for connections.
• For Database name, enter the name of the database that you want to use.
• For UserName, enter the user name of an account that has permissions to do the following:
• Access the target database.
• Read (perform a SELECT statement on) any tables in that database that you want to use.
• For Password, enter the password for the user account that you entered.
5. Choose Validate connection.
6. If the connection validates, choose Update data source. If not, correct the connection information
and try validating again.
7. If you want to create a new dataset using the updated data source, proceed with the instructions at
Creating a dataset from a database (p. 95). Otherwise, close the Choose your table dialog box.
1. From the QuickSight start page, choose Datasets at left, and then choose New dataset.
2. Scroll down to the FROM EXISTING DATA SOURCES section, and then choose an Athena data
source.
3. Choose Edit Data Source.
4. For Data source name, enter a new name.
5. The Manage data source sharing screen appears. On the Users tab, locate the user that you want to
remove.
6. If you want to create a new dataset using the updated data source, proceed with the instructions at
Creating a dataset using Amazon Athena data (p. 76). Otherwise, close the Choose your table
dialog box.
1. In the FROM EXISTING DATA SOURCES section of the Create a Data Set page, choose the data
source that you want to delete.
2. Choose Delete.
130
Amazon QuickSight User Guide
If QuickSight connects to the data store by using a direct query, the data automatically refreshes when
you open an associated dataset, analysis, or dashboard. Filter controls are refreshed automatically every
24 hours.
To refresh SPICE datasets, QuickSight must independently authenticate using stored credentials to
connect to the data. QuickSight can't refresh manually uploaded data—even from S3 buckets, even
though it's stored in SPICE—because QuickSight doesn't store its connection and location metadata. If
you want to automatically refresh data that's stored in an S3 bucket, create a dataset by using the S3
data source card.
For files that you manually uploaded to SPICE, you refresh these manually by importing the file again.
If you want to reuse the name of the original dataset for the new file, first rename or delete the original
dataset. Then give the preferred name to the new dataset. Also, check that the field names are the same
name and data type. Open your analysis, and replace the original dataset with the new dataset. For more
information, see Replacing datasets (p. 125).
You can refresh your SPICE (p. 132) datasets at any time. Refreshing imports the data into SPICE again,
so the data includes any changes since the last import.
For Amazon QuickSight Standard Edition, you can do a full refresh of your SPICE data at any time. For
Amazon QuickSight Enterprise Edition, you can do a full refresh or an incremental refresh (SQL-based
data sources only) at any time.
Note
If your dataset uses CustomSQL, refreshing incrementally might not benefit you. If the SQL
query is complex, your database may not be able to optimize the filter with the look-back
window. This can cause the query that pulls in the data to take longer than a full refresh. We
recommend that you try reducing query execution time by refactoring the custom SQL. Note
that results might vary depending on the type of optimization you make.
You can refresh SPICE data by using any of the following approaches:
When you create or edit a SPICE dataset, you can enable email notifications about data loading status.
This option notifies the owners of the dataset if the data fails to load or refresh. To turn on notifications,
select the Email owners when a refresh fails option that appears on the Finish data set creation screen.
This option isn't available for datasets that you create by using Upload a File on the datasets page.
In the following topics, you can find an explanation of different approaches to refreshing and working
with SPICE data.
131
Amazon QuickSight User Guide
Importing data into SPICE
Topics
• Importing data into SPICE (p. 132)
• Refreshing SPICE data (p. 133)
• Using SPICE data in an analysis (p. 138)
• View SPICE ingestion history (p. 139)
• Troubleshooting skipped row errors (p. 141)
• SPICE ingestion error codes (p. 142)
• Updating files in a dataset (p. 145)
When you create or edit a dataset, you choose to use either SPICE or a direct query, unless the dataset
contains uploaded files. Importing (also called ingesting) your data into SPICE can save time and money:
SPICE capacity is allocated separately for each AWS Region. Default SPICE capacity is automatically
allocated to your home AWS Region. For each AWS account, SPICE capacity is shared by all the people
using QuickSight in a single AWS Region. The other AWS Regions have no SPICE capacity unless you
choose to purchase some. QuickSight administrators can view how much SPICE (p. 132) capacity you
have in each AWS Region and how much of it is currently in use. A QuickSight administrator can purchase
more SPICE capacity or release unused SPICE capacity as needed. For more information, see Managing
SPICE capacity (p. 920).
Topics
• Capacity planning for SPICE datasets (p. 132)
In capacity planning for SPICE, consider what data types you plan to define in the dataset. For example,
the file you want to import might contain all strings (text). But for these to be used in a meaningful way
in an analysis, you prepare the data by changing the data types to their proper form. For example, fields
containing prices are changed from strings to decimals, and fields containing dates are changed from
strings to dates. If you create a calculation to make the conversion, you can remove the original field
from the dataset and substitute the formatted calculated field. In that case, you don't need to include
the size of the original field in your capacity planning. Only included fields are stored in SPICE.
132
Amazon QuickSight User Guide
Refreshing SPICE data
Note
Geospatial data types use metadata to interpret the physical data type. Latitude and longitude
are numeric. All other geospatial categories are strings.
To calculate how much SPICE capacity your dataset needs, multiply the number of rows by the number
of bytes SPICE uses per row. Currently, SPICE needs 8 bytes per field for decimal, int, and date fields. For
each string field (text), SPICE needs 8 bytes plus the UTF-8 encoded character length. The formula looks
like the following.
Total bytes of data = Number of rows * Total logical row size in bytes
For example, let's say you have a table with 5,000,000 rows that you want to import into SPICE. It has
30 numeric fields, 20 date fields, and10 string fields of 100 bytes each. Your formula looks like the
following.
133
Amazon QuickSight User Guide
Incrementally refreshing a dataset
• To use the same manifest file you last provided to Amazon QuickSight, choose Existing Manifest.
If you have changed the manifest file at the file location or URL that you last provided, the data
returned reflects those changes.
• To specify a new manifest file by uploading it from your local network, choose Upload Manifest,
and then choose Upload manifest file. For Open, choose a file, and then choose Open.
• To specify a new manifest file by providing a URL, enter the URL of the manifest in Input manifest
URL. You can find the manifest file URL in the Amazon S3 console by opening the context (right-
click) menu for the manifest file, choosing Properties, and looking at the Link box.
5. Choose Refresh.
6. If you are refreshing an Amazon S3 dataset, choose OK, then OK again.
For SQL-based data sources, such as Amazon Redshift, Amazon Athena, PostgreSQL, or Snowflake, you
can refresh your data incrementally within a look-back window of time.
An incremental refresh queries only data defined by the dataset within a specified look-back window.
It transfers all insertions, deletions, and modifications to the dataset, within that window's timeframe,
from its source to the dataset. The data currently in SPICE that's within that window is deleted and
replaced with the updates.
With incremental refreshes, less data is queried and transferred for each refresh. For example, let's say
you have a dataset with 180,000 records that contains data from January 1 to June 30. On July 1, you
run an incremental refresh on the data with a look-back window of seven days. QuickSight queries the
database asking for all data since June 24 (7 days ago), which is 7,000 records. QuickSight then deletes
the data currently in SPICE from June 24 and after, and appends the newly queried data. The next day
(July 2), QuickSight does the same thing, but queries from June 25 (7,000 records again), and then
deletes from the existing dataset from the same date. Rather than having to ingest 180,000 records
every day, it only has to ingest 7,000 records.
Use the following procedure to incrementally refresh a SPICE (p. 132) dataset based on a SQL data
source on the Datasets page.
134
Amazon QuickSight User Guide
Refreshing a dataset during data preparation
a. For Date column, choose a date column that you want to base the look-back window on.
b. For Window size, enter a number for size, and then choose an amount of time that you want to
look back for changes.
You can choose to refresh changes to the data that occurred within a specified number of hours,
days, or weeks from now. For example, you can choose to refresh changes to the data that
occurred within two weeks of the current date.
6. Choose Submit.
1. On the Datasets page, choose the dataset, and then choose Edit Data Set.
2. On the dataset screen, choose Refresh now.
3. Keep the refresh type set to Full refresh.
4. (Optional) If you are refreshing an Amazon S3 dataset, choose one of the following options for S3
Manifest:
• To use the same manifest file that you last provided to Amazon QuickSight, choose Existing
Manifest. If you have changed the manifest file at the file location or URL that you last provided,
the data returned reflects those changes.
• To specify a new manifest file by uploading it from your local network, choose Upload Manifest,
and then choose Upload manifest file. For Open, choose a file, and then choose Open.
• To specify a new manifest file by providing a URL, enter the URL of the manifest in Input manifest
URL. You can find the manifest file URL in the Amazon S3 console by opening the context (right-
click) menu for the manifest file, choosing Properties, and looking at the Link box.
5. Choose Refresh.
6. If you are refreshing an Amazon S3 dataset, choose OK, then OK again.
135
Amazon QuickSight User Guide
Incrementally refreshing a dataset on a schedule
3. On the Create a refresh schedule screen, choose settings for your schedule:
a. For Time zone, choose the time zone that applies to the data refresh.
b. For Starting time, choose a date and time for the refresh to start. Use HH:MM and 24-hour
format, for example 13:30.
c. For Frequency, choose one of the following:
• For Standard or Enterprise editions, you can choose Daily, Weekly, or Monthly.
• Daily: Repeats every day.
• Weekly: Repeats on the same day of each week.
• Monthly: Repeats on the same day number of each month. To refresh data on the 29th,
30th or 31st day of the month, choose Last day of month from the list.
• For Enterprise edition only, you can choose Hourly. This setting refreshes your dataset every
hour, beginning at the time that you choose. So, if you select 1:05 as the starting time, the
data refreshes at five minutes after the hour, every hour.
If you decide to use an hourly refresh, you can't also use additional refresh schedules. To
create an hourly schedule, remove any other existing schedules for that dataset. Also, remove
any existing hourly schedule before you create a daily, weekly, or monthly schedule.
4. Choose Save.
Using the Amazon QuickSight console, you can create five schedules for each dataset. When you have
created five, the Create button is turned off.
For SQL-based data sources, such as Amazon Redshift, Athena, PostgreSQL, or Snowflake, you can
schedule incremental refreshes. Use the following procedure to incrementally refresh a SPICE (p. 132)
dataset based on a SQL data source on the Datasets page.
136
Amazon QuickSight User Guide
Incrementally refreshing a dataset on a schedule
3. On the Create a schedule page, for Refresh type, choose Incremental refresh.
4. If this is your first incremental refresh for this dataset, choose Configure, and then do the following:
a. For Date column, choose a date column that you want to base the look-back window on.
b. For Window size, enter a number for size, and then choose an amount of time that you want to
look back for changes.
You can choose to refresh changes to the data that occurred within a specified number of hours,
days, or weeks from now. For example, you can choose to refresh changes to the data that
occurred within two weeks of the current date.
c. Choose Submit.
5. For Time zone, choose the time zone that applies to the data refresh.
6. For Repeats, choose one of the following:
• You can choose Every 15 minutes, Every 30 minutes, Hourly, Daily, Weekly, or Monthly.
• Every 15 minutes: Repeats every 15 minutes, beginning at the time you choose. So, if you select
1:05 as the starting time, the data refreshes at 1:20, then again at 1:35, and so on.
• Every 30 minutes: Repeats every 30 minutes, beginning at the time you choose. So, if you select
1:05 as the starting time, the data refreshes at 1:35, then again at 2:05, and so on.
• Hourly: Repeats every hour, beginning at the time you choose. So, if you select 1:05 as the
starting time, the data refreshes at five minutes after the hour, every hour.
• Daily: Repeats every day.
• Weekly: Repeats on the same day of each week.
• Monthly: Repeats on the same day number of each month. To refresh data on the 29th, 30th or
31st day of the month, choose Last day of month from the list.
• If you decide to use refresh every 15 or 30 minutes, or hourly, you can't also use additional refresh
schedules. To create a refresh schedule every 15 minutes, 30 minutes, or hourly, remove any other
existing schedules for that dataset. Also, remove any existing minute or hourly schedule before
you create a daily, weekly, or monthly schedule.
7. For Starting, choose a date for the refresh to start.
8. For At, specify the time that the refresh should start. Use HH:MM and 24-hour format, for example
13:30.
In some cases, something might go wrong with the incremental refresh dataset that makes you want to
roll back your dataset. Or you might no longer want to refresh the dataset incrementally. If so, you can
delete the scheduled refresh.
To do so, choose the dataset on the Datasets page, choose Schedule a refresh, and then choose the
x icon to the right of the scheduled refresh. Deleting an incremental refresh configuration starts a full
refresh. As part of this full refresh, all the configurations prepared for incremental refreshes are removed.
137
Amazon QuickSight User Guide
Using SPICE data in an analysis
After the SPICE import is complete, the indicator displays the percentage of rows that were successfully
imported. A message also appears at the top of the visualization pane to provide counts of the rows
imported and skipped.
If any rows were skipped, you can choose View summary in this message bar to see details about why
those rows failed to import. To edit the dataset and resolve the issues that led to skipped rows, choose
Edit data set. For more information about common causes for skipped rows, see Troubleshooting
skipped row errors (p. 141).
138
Amazon QuickSight User Guide
View SPICE ingestion history
If an import fails altogether, the data import indicator appears as an exclamation point icon, and an
Import failed message is displayed.
139
Amazon QuickSight User Guide
View SPICE ingestion history
4. (Optional) Choose a time frame to filter the entries from the last hour to the last 90 days.
5. (Optional) Choose a specific job status to filter the entries, for example Running or Completed.
Otherwise, you can view all entries by choosing All.
140
Amazon QuickSight User Guide
Troubleshooting skipped row errors
Fortunately, there's a limited number of things that can go wrong. Some issues can be avoided by being
aware of examples like the following:
• Make sure that there is no inconsistency between the field data type and the field data, for example
occasional string data in a field with a numeric data type. Here are a few examples that can be difficult
to detect when scanning the contents of a table:
• '' – Using an empty string to indicate a missing value
• 'NULL' – Using the word "null" to indicate a missing value
• $1000 – Including a dollar sign in a currency value turns it into a string
• 'O'Brien' – Using punctuation to mark a string that itself contains the same punctuation.
However, this type of error isn't always this easy to find, especially if you have a lot of data, or if your
data is typed in by hand. For example, some customer service or sales applications involve entering
information verbally provided by customers. The person who originally typed in the data might have
put it in the wrong field. They might add, or forget to add, a character or digit. For example, they
might enter a date of "0/10/12020" or enter someone's gender in a field meant for age.
• Make sure that your imported file is correctly processed with or without a header. If there is a header
row, make sure that you choose the Contains header upload option.
• Make sure that the data doesn't exceed one or more of the Data source quotas (p. 68).
• Make sure that the data is compatible with the Supported data types and values (p. 69).
• Make sure that your calculated fields contain data that works with the calculation, rather than being
incompatible with or excluded by the function in the calculated field. For example, if you have a
calculated field in your dataset that uses parseDate (p. 200), QuickSight skips rows where that field
doesn't contain a valid date.
QuickSight provides a detailed list of the errors that occur when the SPICE engine attempts to ingest
data. When a saved dataset reports skipped rows, you can view the errors so you can take action to fix
the issues.
To view errors for rows that were skipped during SPICE ingestion (data import)
• Summary – Provides a percentage score of how many rows were skipped out of the total number
of rows in the import. For example, if there are 864 rows skipped out of a total of 1,728, the score
is 50.00%.
• Skipped Rows – Provides the row count, field name, and error message for each set of similar
skipped rows.
• Troubleshooting – Provides a link to download a file that contains error information.
5. Under Troubleshooting, choose Download error rows file.
141
Amazon QuickSight User Guide
SPICE ingestion error codes
The error file has a row for each error. The file is named error-report_123_fe8.csv, where
123_fe8 is replaced with a unique identifying string. The file contains the following columns:
• ERROR_TYPE – The type or error code for the error that occurred when importing this row.
You can look up this error in the SPICE ingestion error codes (p. 142) section that follows this
procedure.
• COLUMN_NAME – The name of the column in your data that caused the error.
• All the columns from your imported row – The remaining columns duplicate the entire row of
data. If a row has more than one error, it can appear multiple times in this file.
6. Choose Edit data set to make changes to your dataset. You can filter the data, omit fields, change
data types, adjust existing calculated fields, and add calculated fields that validate the data.
7. After you've made changes indicated by the error codes, import the data again. If more SPICE
ingestion errors appear in the log, step through this procedure again to fix all remaining errors.
Tip
If you can't solve the data issues in a reasonable amount of time by using the dataset editor,
consult the administrators or developers who own the data. In the long run, it's more cost-
effective to cleanse the data closer to its source, rather than adding exception processing while
you're preparing the data for analysis. By fixing it at the source, you avoid a situation where
multiple people fix the errors in different ways, resulting in different reporting results later on.
• sample dataset - data ingestion error.csv – A sample .csv file that contains issues
that cause skipped rows. You can try to import the file yourself to see how the error process
works.
• sample data ingestion error file – A sample error file generated during SPICE ingestion
while importing the sample .csv file into QuickSight.
3. Import the data by following these steps:
Topics
• Error codes for skipped rows (p. 143)
• Error codes during data import (p. 143)
142
Amazon QuickSight User Guide
Row import errors
ENCODING_EXCEPTION – An unknown exception occurred while converting and encoding data to SPICE.
INCORRECT_FIELD_COUNT – One or more rows have too many fields. Make sure that the number of
fields in each row matches the number of fields defined in the schema.
INDEX_OUT_OF_BOUNDS – The system requested an index that isn't valid for the array or list being
processed.
MALFORMED_DATE – A value in a field can't be transformed to a valid date. For example, if you try
to convert a field that contains a value like "sale date" or "month-1", the action generates a
malformed date error. To fix this error, remove nondate values from your data source. Check that you
aren't importing a file with a column header mixed into the data. If your string contains a date or time
that doesn't convert, see Using unsupported or custom dates (p. 367).
NUMBER_PARSE_FAILURE – A value in a numeric field is not a number. For example, a field with a data
type of int contains a string or a float.
STRING_TRUNCATION – A string is being truncated by SPICE. Strings are truncated where the length
of the string exceeds the SPICE quota. For more information about SPICE, see Importing data into
SPICE (p. 132). For more information about quotas, see Service Quotas.
UNSUPPORTED_DATE_VALUE – A date field contains a date that is in a supported format but is not in
the supported range of dates, for example "12/31/1399" or "01/01/10000". For more information, see
Using unsupported or custom dates (p. 367).
ACCOUNT_CAPACITY_LIMIT_EXCEEDED – This data exceeds your current SPICE capacity. Purchase more
SPICE capacity or clean up existing SPICE data and then retry this ingestion.
143
Amazon QuickSight User Guide
Data import errors
CONNECTION_FAILURE – Amazon QuickSight can't connect to your data source. Check the data source
connection settings and try again.
CUSTOMER_ERROR – There was a problem parsing the data. If this persists, contact Amazon QuickSight
technical support.
DATA_SET_DELETED – The data source or dataset was deleted or became unavailable during ingestion.
DATA_SET_SIZE_LIMIT_EXCEEDED – This dataset exceeds the maximum allowable SPICE dataset size.
Use filters to reduce the dataset size and try again. For information on SPICE quotas, see Data source
quotas (p. 68).
DATA_SOURCE_AUTH_FAILED – Data source authentication failed. Check your credentials and use the
Edit data source option to replace expired credentials.
DATA_SOURCE_CONNECTION_FAILED – Data source connection failed. Check the URL and try again. If
this error persists, contact your data source administrator for assistance.
DATA_SOURCE_NOT_FOUND – No data source found. Check your Amazon QuickSight data sources.
DATA_TOLERANCE_EXCEPTION – There are too many invalid rows. Amazon QuickSight has reached the
quota of rows that it can skip and still continue ingesting. Check your data and try again.
FAILURE_TO_ASSUME_ROLE – Amazon QuickSight couldn't assume the correct AWS Identity and
Access Management (IAM) role. Verify the policies for Amazon QuickSight-service-role in the IAM
console.
IAM_ROLE_NOT_AVAILABLE – Amazon QuickSight doesn't have permission to access the data source.
To manage Amazon QuickSight permissions on AWS resources, go to the Security and Permissions page
under the Manage Amazon QuickSight option as an administrator.
INVALID_DATAPREP_SYNTAX – Your calculated field expression contains invalid syntax. Correct the
syntax and try again.
IOT_DATA_SET_FILE_EMPTY – No AWS IoT Analytics data was found. Check your account and try again.
IOT_FILE_NOT_FOUND – An indicated AWS IoT Analytics file wasn't found. Check your account and try
again.
OAUTH_TOKEN_FAILURE – Credentials to the data source have expired. Renew your credentials and
retry this ingestion.
PERMISSION_DENIED – Access to the requested resources was denied by the data source. Request
permissions from your database administrator or ensure proper permission has been granted to Amazon
QuickSight before retrying.
144
Amazon QuickSight User Guide
Updating files in a dataset
QUERY_TIMEOUT – A query to the data source timed out waiting for a response. Check your data source
logs and try again.
S3_FILE_INACCESSIBLE – Couldn't connect to an S3 bucket. Make sure that you grant Amazon
QuickSight and users necessary permissions before you connect to the S3 bucket.
S3_MANIFEST_ERROR – Couldn't connect to S3 data. Make sure that your S3 manifest file is valid. Also
verify access to the S3 data. Both Amazon QuickSight and the Amazon QuickSight user need permissions
to connect to the S3 data.
S3_UPLOADED_FILE_DELETED – The file or files for the ingestion were deleted (between ingestions).
Check your S3 bucket and try again.
SOURCE_API_LIMIT_EXCEEDED_FAILURE – This ingestion exceeds the API quota for this data source.
Contact your data source administrator for assistance.
SOURCE_RESOURCE_LIMIT_EXCEEDED – A SQL query exceeds the resource quota of the data source.
Examples of resources involved can include the concurrent query quota, the connection quota, and
physical server resources. Contact your data source administrator for assistance.
SQL_EXCEPTION – A general SQL error occurred. This error can be caused by query timeouts, resource
constraints, unexpected data definition language (DDL) changes before or during a query, and other
database errors. Check your database settings and your query, and try again.
SQL_INVALID_PARAMETER_VALUE – An invalid SQL parameter appeared. Check your SQL and try again.
SQL_SCHEMA_MISMATCH_ERROR – The data source schema doesn't match the Amazon QuickSight
dataset. Update your Amazon QuickSight dataset definition.
SQL_TABLE_NOT_FOUND – Amazon QuickSight can't find the table in the data source. Verify the table
specified in the dataset or custom SQL and try again.
UNRESOLVABLE_HOST – Amazon QuickSight can't resolve the host name of the data source. Verify the
host name of the data source and try again.
UNROUTABLE_HOST – Amazon QuickSight can't reach your data source because it's inside a private
network. Ensure that your private VPC connection is configured correctly in Enterprise Edition, or allow
Amazon QuickSight IP address ranges to allow connectivity for Standard Edition.
145
Amazon QuickSight User Guide
Updating files in a dataset
Before updating a file, make sure that the new file has the same fields in the same order as the original
file currently in the dataset. If there are field (column) discrepancies between the two files, an error
occurs and you need to fix the discrepancies before attempting to update again. You can do this by
editing the new file to match the original. Note that if you want to add new fields, you can append them
after the original fields in the file. For example, in a Microsoft Excel spreadsheet, you can append new
fields to the right of the original fields.
4. On the Update file page that opens, choose Upload file, and then navigate to a file.
A message that the file updated successfully appears at top right and the table preview updates to
show the new file data.
146
Amazon QuickSight User Guide
Describing data
If you want to transform the data from a data source before using it in Amazon QuickSight, you can
prepare it to suit your needs. You then save this preparation as part of the dataset.
You can prepare a dataset when you create it, or by editing it later. For more information about creating
a new dataset and preparing it, see Creating datasets (p. 94). For more information about opening an
existing dataset for data preparation, see Editing datasets (p. 104).
Topics
• Describing data (p. 147)
• Choosing file upload settings (p. 148)
• Preparing data fields for analysis in Amazon QuickSight (p. 149)
• Adding calculations (p. 160)
• Previewing tables in a dataset (p. 316)
• Joining data (p. 317)
• Filtering data in Amazon QuickSight (p. 324)
• Using SQL to customize data (p. 357)
• Adding geospatial data (p. 358)
• Using unsupported or custom dates (p. 367)
• Integrating Amazon SageMaker models with Amazon QuickSight (p. 368)
• Preparing dataset examples (p. 374)
Describing data
Using Amazon QuickSight, you can add information, or metadata, about the columns (fields) in your
datasets. By adding metadata, you make the dataset self-explanatory and easier to reuse. Doing this
can help data curators and their customers know where the data came from and what it means. It's a
way of communicating to the people who use your dataset or combine it with other datasets to build
dashboards. Metadata is especially important for information that is shared between organizations.
After you add metadata to a dataset, field descriptions become available to anyone who is using the
dataset. A column description appears when someone who is actively browsing the Fields list pauses
147
Amazon QuickSight User Guide
Choosing file upload settings
on a field name. Column descriptions are visible to people who are editing a dataset or an analysis, but
not to someone who is viewing a dashboard. Descriptions aren't formatted. You are able to enter line
feeds and formatting marks and these are preserved by the editor. However, the description tooltip that
displays is only able to show words, numbers, and symbols—but not formatting.
• At the bottom of the screen, open the settings for the field from the pencil icon next to the field's
name.
•
In the field list, open the settings for the field from the menu next to the field's name. Then
choose Edit name & description from the context menu.
6. Add or change the description for the field.
To delete an existing description, delete all the text in the Description box.
7. (Optional) For Name, if you want to change the name of the field, you can enter a new one here.
8. Choose Apply to save your changes. Choose cancel to exit.
1. On the data preparation page, open the Upload Settings pane by choosing the expand icon.
2. In File format, choose the file format type.
3. If you chose the custom separated (CUSTOM) format, specify the separating character in Delimiter.
4. If the file doesn't contain a header row, deselect the Files include headers check box.
5. If you want to start from a row other than the first row, specify the row number in Start from row. If
the Files include headers check box is selected, the new starting row is treated as the header row. If
the Files include headers check box is not selected, the new starting row is treated as the first data
row.
6. In Text qualifier, choose the text qualifier, either single quotes (') or double quotes (").
148
Amazon QuickSight User Guide
Changing Microsoft Excel file upload settings
Use the following procedure to change Microsoft Excel file upload settings.
1. On the data preparation page, open the Upload Settings pane by choosing the expand icon.
2. Leave Upload whole sheet selected.
3. If the file doesn't contain a header row, deselect the Range contains headers check box.
Topics
• Editing field names and descriptions (p. 149)
• Setting fields as a dimensions or measures (p. 150)
• Changing a field data type (p. 151)
• Adding drill-downs to visual data in Amazon QuickSight (p. 152)
• Selecting fields (p. 156)
• Organizing fields into folders in Amazon QuickSight (p. 157)
• Mapping and joining fields (p. 159)
1. In the Fields pane of the data prep page, choose the three-dot icon on the field that you want to
change. Then choose Edit name & description.
149
Amazon QuickSight User Guide
Setting fields as a dimensions or measures
2. Enter the new name or description that you want to change, and choose Apply.
You can also change the name and description of a field on the data prep page. To do this, select the
column header of the field that you want to change in the Dataset table in that page's lower half. Then
make any changes there.
In some cases, Amazon QuickSight interprets a field as a measure that you want to use it as a dimension
(or the other way around). If so, you can change the setting for that field.
Changing a field's measure or dimension setting changes it for all visuals in the analysis that use that
dataset. However, it doesn't change it in the dataset itself.
1. In the Field list pane, hover over the field that you want to change.
2. Choose the selector icon to the right of the field name, and then choose Convert to dimension or
Convert to measure as appropriate.
150
Amazon QuickSight User Guide
Changing a field data type
• Date – The date data type is used for date data in a supported format. For information about the date
formats Amazon QuickSight supports, see Data source quotas (p. 68).
• Decimal – The decimal data type is used for numeric data that requires one or more decimal places of
precision, for example 18.23. The decimal data type supports values with up to four decimal places
to the right of the decimal point. Values that have a higher scale than this are truncated to the fourth
decimal place in two cases. One is when these values are displayed in data preparation or analyses,
and one is when these values are imported into QuickSight. For example, 13.00049 is truncated to
13.0004.
• Geospatial – The geospatial data type is used for geospatial data, for example longitude and latitude,
or cities and countries.
• Integer – The int data type is used for numeric data that only contains integers, for example 39.
• String – The string data type is used for nondate alphanumeric data.
QuickSight reads a small sample of rows in the column to determine the data type. The data type that
occurs most in the small sample size is the suggested type. In some cases, there might be blank values
(treated as strings by QuickSight) in a column that contains mostly numbers. In these cases, it might be
that the String data type is the most frequent type in the sample set of rows. You can manually modify
the data type of the column to make it integer. Use the following procedures to learn how.
10020
36803
14267a
98457
78216b
All records containing alphabetic characters in that field are skipped, as shown following.
10020
36803
98457
If you have a database dataset with fields whose data types aren't supported by Amazon QuickSight,
use a SQL query during data preparation. Then use CAST or CONVERT commands (depending on what is
supported by the source database) to change the field data types. For more information about adding
a SQL query during data preparation, see Using SQL to customize data (p. 357). For more information
about how different source data types are interpreted by Amazon QuickSight, see Supported data types
from other data sources (p. 71).
You might have numeric fields that act as dimensions rather than metrics, for example ZIP codes and
most ID numbers. In these cases, it's helpful to give them a string data type during data preparation.
151
Amazon QuickSight User Guide
Adding drill-downs
Doing this lets Amazon QuickSight understand that they are not useful for performing mathematical
calculations and can only be aggregated with the Count function. For more information about
how Amazon QuickSight uses dimensions and measures, see Setting fields as a dimensions or
measures (p. 150).
In SPICE (p. 132), numbers converted from numeric into an integer are truncated by default. If you want
to round your numbers instead, you can create a calculated field using the round (p. 210) function. To
see whether numbers are rounded or truncated before they are ingested into SPICE, check your database
engine.
1. From the QuickSight start page, choose Datasets, choose the dataset that you want, and then
choose Edit dataset.
2. In the data preview pane, choose the data type icon under the field you want to change.
3. Choose the target data type. Only data types other than the one currently in use are listed.
Changing a field's data type in an analysis changes it for all visuals in the analysis that use that dataset.
However, it doesn't change it in the dataset itself.
Note
If you are working in a pivot table visual, applying a table calculation changes the data type of
the cell values in some cases. This type of change occurs if the data type doesn't make sense
with the applied calculation.
For example, suppose that you apply the Rank function to a numeric field that you modified to
use a currency data type. In this case, the cell values display as numbers rather than currency.
Similarly, if you apply the Percent difference function instead, the cell values display as
percentages rather than currency.
• In the Field list pane, hover over the numeric field that you want to change. Then choose the
selector icon to the right of the field name.
• On any visual that contains an on-visual editor associated with the numeric field that you want to
change, choose that on-visual editor.
• Expand the Field wells pane, and then choose the field well associated with the numeric field that
you want to change.
2. Choose Show as, and then choose Number, Currency, or Percent.
152
Amazon QuickSight User Guide
Adding drill-downs
associate the country, state, and city fields with the x-axis on a bar chart. Then, you can drill down or up
to see data at each of those levels. As you drill down each level, the data displayed is refined by the value
in the field you drill down on. For example, if you drill down on the state of California, you see data on all
of the cities in California.
The field wells you can use to create drill-downs varies by visual type. Refer to the topic on each visual
type to learn more about its drill-down support.
Drill-down functionality is added automatically for dates when you associate a date field with the drill-
down field well of a visual. In this case, you can always drill up and down through the levels of date
granularity. Drill-down functionality is also added automatically for geospatial groupings, after you
define these in the dataset.
Use the following table to identify the field wells/on-visual editors that support drill-down for each
visual type.
Adding a drill-down
Use the following procedure to add drill-down levels to a visual.
1. On the analysis page, choose the visual that you want to add drill-downs to.
Note
You can't add drill-downs to pivot tables.
2. Click anywhere on the Field wells to expand them.
3. If your dataset has a defined hierarchy, you can drag the entire hierarchy into the field well as one.
An example is geospatial or coordinate data. In this case, you don't need to follow the remaining
steps.
153
Amazon QuickSight User Guide
Adding drill-downs
If you don't have a predefined hierarchy, you can create one in your analysis, as described in the
remaining steps.
4. Drag a field that you want to use in the drill-down hierarchy to an appropriate field well, depending
on the visual type. Make sure that the label for the dragged field says Add drill-down layer. Position
the dragged field above or below the existing field based on where you want it to be in the hierarchy
you're creating.
154
Amazon QuickSight User Guide
Adding drill-downs
5. Continue until you have added all of the levels of hierarchy that you want. To remove a field from
the hierarchy, choose the field, and then choose Remove.
6. To drill down or up to see data at a different level of the hierarchy, choose an element on the visual
(like a line or bar), and then choose Drill down to <lower level> or Drill up to <higher level>. In this
example, from the car-make level you can drill down to car-model to see data at that level. If you
drill down to car-model from the Ford car-make, you see only car-models in that car-make.
After you drill down to the car-model level, you can then drill down further to see make-year
data, or go back up to car-make. If you drill down to make-year from the bar representing Ranger,
you see only years for that model of car.
155
Amazon QuickSight User Guide
Selecting fields
Selecting fields
When you prepare data, you can select one or more fields to perform an action on them, such as
excluding them or adding them to a folder.
To select one or more fields in the data preparation pane, click or tap the field or fields in the Fields pane
at left. You can then choose the field menu (the three dots) to the right of the field name and choose an
action to take. The action is performed on all selected fields.
You can select or deselect all fields at once by choosing either All or None at the top of the Fields pane.
If you edit a dataset and exclude a field that is used in a visual, that visual breaks. You can fix it the next
time you open that analysis.
Search is case-insensitive and wildcards are not supported. Choose the cancel icon (X) to the right of the
search box to return to viewing all fields.
156
Amazon QuickSight User Guide
Organizing fields into folders
You can create folders while preparing your dataset, or when editing a dataset. For more information
about creating a new dataset and preparing it, see Creating datasets (p. 94). For more information about
opening an existing dataset for data preparation, see Editing datasets (p. 104).
While performing an analysis, authors can expand and collapse folders, search for specific fields within
folders, and see your descriptions of folders on the folder menu. Folders appear at the top of the Fields
pane in alphabetical order.
Creating a folder
Use the following procedure to create a new folder in the Fields pane.
1. On the data preparation page, in the Fields pane, select the field menu for the fields that you want
to place in a folder and choose Add to folder.
To select more than one field at a time, press the Ctrl key while you select (Command key on Mac).
2. On the Add to folder page that appears, choose Create a new folder and enter a name for the new
folder.
3. Choose Apply.
The folder appears at the top of the Fields pane with the fields that you chose inside it. Fields inside
folders are arranged in alphabetical order.
Creating a subfolder
To further organize your data fields in the Fields pane, you can create subfolders within parent folders.
To create a subfolder
1. On the data preparation page, in the Fields pane, select the field menu for a field already in a folder
and choose Move to folder.
2. On the Move to folder page that appears, choose Create a new folder and enter a name for the new
folder.
3. Choose Apply.
157
Amazon QuickSight User Guide
Organizing fields into folders
The subfolder appears within the parent folder at the top of the list of fields. Subfolders are arranged in
alphabetical order.
1. On the data preparation page, in the Fields pane, select the fields that you want to add to a folder.
To select more than one field at a time, press the Ctrl key while you select (Command key on Mac).
2. On the field menu, choose Add to folder.
3. On the Add to folder page that appears, choose a folder for Existing folder.
4. Choose Apply.
1. On the data preparation page, in the Fields pane, select the fields that you want to move to another
folder.
To select more than one field at a time, press the Ctrl key while you select (Command key on Mac).
2. On the field menu, choose Move to folder.
3. On the Move to folder page that appears, choose a folder for Existing folder.
4. Choose Apply.
1. On the data preparation page, in the Fields pane, select the fields that you want to remove.
2. On the field menu, choose Remove from folder.
The fields that you selected are removed from the folder and placed back in the list of fields in
alphabetical order.
1. On the data preparation page, in the Fields pane, select the folder menu for the folder that you
want to edit and choose Edit name & description.
158
Amazon QuickSight User Guide
Mapping and joining fields
Moving folders
You can move folders and subfolders to new or existing folders in the Fields pane.
To move a folder
1. On the data preparation page, in the Fields pane, choose Move folder on the folder menu.
2. On the Move folder page that appears, do one of the following:
• Choose Create a new folder and enter a name for the folder.
• For Existing folder, choose a folder.
3. Choose Apply.
The folder appears within the folder that you chose in the Fields pane.
To remove a folder
1. On the data preparation page, in the Fields pane, choose Remove folder on the folder menu.
2. On the Remove folder? page that appears, choose Remove.
The folder is removed from the Fields pane. Any fields that were in the folder are placed back in the list
of fields in alphabetical order. Removing folders doesn't exclude fields from view or delete fields from
the dataset.
Topics
• Mapping fields (p. 159)
• Joining fields (p. 160)
Mapping fields
Amazon QuickSight can automatically map fields between datasets in the same analysis. The following
tips can help make it easier for Amazon QuickSight to automatically map fields between datasets, for
example if you are creating a filter action across datasets:
159
Amazon QuickSight User Guide
Adding calculations
• Matching field names – Field names must match exactly, with no differences in case, spacing, or
punctuation. You can rename fields that describe the same data, so an automatic mapping is accurate.
• Matching data types – Fields must have the same data type for automatic mapping. You can change
the data types while you are preparing the data. This step also gives you the opportunity to discover
whether you need to filter out any data that isn't the correct data type.
• Using calculated fields – You can use calculated fields to create a matching field, and give it the correct
name and data type for automatic mapping.
Note
After an automatic mapping exists, you can rename a field without breaking the field mapping.
However, if you change the data type, the mapping is broken.
For more information on field mapping for filter actions across datasets, see Creating and editing custom
actions in Amazon QuickSight (p. 605).
Joining fields
You can create joins between data from different data sources, including files or databases. The following
tips can help make it easier for you to join data from different files or data sources:
• Similar field names – It is simpler to join fields when you can see what should match; for example,
Order ID and order-id seem as if they should be the same. But if one is a work order, and the other is
a purchase order, then the fields are probably different data. If possible, make sure that the files and
tables that you want to join have field names making it clear what data they contain.
• Matching data types – Fields must have the same data type before you can join on them. Make sure
that the files and tables that you want to join having matching data types in join fields. You can't use
a calculated field for a join. Also, you can't join two existing datasets. You create the joined dataset by
directly accessing the source data.
For more information on joining data across data sources, see Joining data (p. 317).
Adding calculations
Create calculated fields to transform your data by using one or more of the following:
You can add calculated fields to a dataset during data preparation or from the analysis page. When you
add a calculated field to a dataset during data preparation, it's available to all analyses that use that
dataset. When you add a calculated field to a dataset in an analysis, it's available only in that analysis. For
more information about adding calculated fields, see the following topics.
Topics
• Adding calculated fields (p. 161)
• Order of evaluation in Amazon QuickSight (p. 166)
• Using level-aware calculations in Amazon QuickSight (p. 167)
160
Amazon QuickSight User Guide
Adding calculated fields
• Calculated field function and operator reference for Amazon QuickSight (p. 172)
You can add calculated fields to a dataset during data preparation or from the analysis page. When you
add a calculated field to a dataset during data preparation, it's available to all analyses that use that
dataset. When you add a calculated field to a dataset in an analysis, it's available only in that analysis.
Analyses support both single-row operations and aggregate operations. Single-row operations are
those that supply a (potentially) different result for every row. Aggregate operations supply results that
are always the same for entire sets of rows. For example, if you use a simple string function with no
conditions, it changes every row. If you use an aggregate function, it applies to all the rows in a group. If
you ask for the total sales amount for the US, the same number applies to the entire set. If you ask for
data on a particular state, the total sales amount changes to reflect your new grouping. It still provides
one result for the entire set.
By creating the aggregated calculated field within the analysis, you can then drill down into the data.
The value of that aggregated field is recalculated appropriately for each level. This type of aggregation
isn't possible during dataset preparation.
For example, let's say that you want to figure out the percentage of profit for each country, region,
and state. You can add a calculated field to your analysis, (sum(salesAmount - cost)) /
sum(salesAmount). This field is then calculated for each country, region, and state, at the time your
analyst drills down into the geography.
Topics
• Adding calculated fields to an analysis (p. 161)
• Adding calculated fields to a dataset (p. 162)
• Handling decimal values in calculated fields (p. 165)
1. In your analysis, choose Add at top left, and then choose Add calculated field.
For more information about how to create formulas using the available functions in QuickSight, see
Calculated field function and operator reference for Amazon QuickSight (p. 172).
161
Amazon QuickSight User Guide
Adding calculated fields
1. Open the dataset that you want to work with. For more information, see Editing datasets (p. 104).
2. On the data prep page, do one of the following:
3. In the calculation editor, enter a descriptive name for Add title to name the new calculated field.
This name appears in the field list in the dataset, so it should look similar to the other fields. For this
example, we name the field Total Sales This Year.
4. (Optional) Add a comment, for example to explain what the expression does, by enclosing text in
slashes and asterisks.
162
Amazon QuickSight User Guide
Adding calculated fields
5. Identify the metrics, functions, and other items to use. For this example, we need to identify the
following:
We want to build a statement like "If the sale happened during this year, show the total sales, and
otherwise show 0."
To add the ifelse function, open the Functions list. Choose All to close the list of all functions.
Now you should see the function groups: Aggregate, Conditional, Date, and so on.
ifelse()
6. Place your cursor inside the parenthesis in the workspace, and add three blank lines.
ifelse(
7. With your cursor on the first blank line, find the dateDiff function. It's listed for Functions under
Dates. You can also find it by entering date for Search functions. The dateDiff function returns
all functions that have date as part of their name. It doesn't return all functions listed under Dates;
for example, the now function is missing from the search results.
Double-click on dateDiff to add it to the first blank line of the ifelse statement.
ifelse(
dateDiff()
Add the parameters that dateDiff uses. Place your cursor inside the dateDiff parentheses to
begin to add date1, date2, and period:
1. For date1: The first parameter is the field that has the date in it. Find it under Fields, and add it
to the workspace by double-clicking it or entering its name.
2. For date2, add a comma, then choose truncDate() for Functions. Inside its parenthesis, add
period and date, like this: truncDate( "YYYY", now() )
3. For period: Add a comma after date2 and enter YYYY. This is the period for the year. To
see a list of all the supported periods, find dateDiff in the Functions list, and open the
documentation by choosing Learn more. If you're already viewing the documentation, as you are
now, see dateDiff (p. 186).
Add a few spaces for readability, if you like. Your expression should look like the following.
ifelse(
163
Amazon QuickSight User Guide
Adding calculated fields
8. Specify the return value. For our example, the first parameter in ifelse needs to return a value of
TRUE or FALSE. Because we want the current year, and we're comparing it to this year, we specify
that the dateDiff statement should return 0. The if part of the ifelse evaluates as true for rows
where there is no difference between the year of the sale and the current year.
To create a field for TotalSales for last year, you can change 0 to 1.
Another way to do the same thing is to use addDateTime instead of truncDate. Then for each
previous year, you change the first parameter for addDateTime to represent each year. For this, you
use -1 for last year, -2 for the year before that, and so on. If you use addDateTime, you leave the
dateDiff function = 0 for each year.
9. Move your cursor to the first blank line, just under dateDiff. Add a comma.
For the then part of the ifelse statement, we need to choose the measure (metric) that contains
the sales amount, TotalSales.
To choose a field, open the Fields list and double-click a field to add it to the screen. Or you can
enter the name. Add curly braces { } around names that contain spaces. It's likely that your metric
has a different name. You can know which field is a metric by the number sign in front of it (#).
ifelse(
dateDiff( {Date}, truncDate( "YYYY", now() ) ,"YYYY" ) = 0
,{TotalSales}
10. Add an else clause. The ifelse function doesn't require one, but we want to add it. For reporting
purposes, you usually don't want to have any null values, because sometimes rows with nulls are
omitted.
We set the else part of the ifelse to 0. The result is that this field is 0 for rows that contain sales from
previous years.
To do this, on the blank line add a comma and then a 0. If you added the comment at the beginning,
your finished ifelse expression should look like the following.
164
Amazon QuickSight User Guide
Adding calculated fields
If there are errors in your expression, the editor displays an error message at the bottom. Check
your expression for a red squiggly line, then hover your cursor over that line to see what the error
message is. Common errors include missing punctuation, missing parameters, misspellings, and
invalid data types.
1. You can reference parameters in calculated fields. By adding the parameter to your expression, you
add the current value of that parameter.
2. To add a parameter, open the Parameters list, and select the parameter whose value you want to
include.
3. (Optional) To manually add a parameter to the expression, type the name of the parameter. Then
enclosed it in curly braces {}, and prefix it with a $, for example ${parameterName}.
You can change the data type of any field in your dataset, including the types of calculated fields. You
can only choose data types that match the data that's in the field.
• For Calculated fields (at left), choose the field that you want to change, then choose Change data
type from the context (right-click) menu.
Unlike the other fields in the dataset, calculated fields can't be disabled. Instead, delete them.
• For Calculated fields (at left), choose the field that you want to change, then choose Delete from
the context (right-click) menu.
As an example, take decimal field Field_A with a value of 0.00006, which is displayed in the user
interface as 0.0. The full value 0.00006 is still used in all calculations. The following are some examples
of how you can use this value in calculations:
• Field_A > 0 = true. The calculated field value displayed in the analysis or imported into SPICE is true.
• ceil(Field_A) = 1. The calculated field value displayed in the analysis or imported into SPICE is 1.
• Field_A + 0.00009 = 0.00015. The calculated field value displayed in the analysis or imported into
SPICE is 0.0001.
• Field_A * 1.5 = 0.00009. The calculated field value displayed in the analysis or imported into SPICE is
0.0.
165
Amazon QuickSight User Guide
Order of evaluation
If you understand the order that the configuration is evaluated in, you know the sequence that dictates
when a specific filter or calculation is applied to your data.
The following illustration shows the order of evaluation. The column on the left shows the order of
evaluation when no level aware calculation window (LAC-W) nor aggregate (LAC-A) function is involved.
The second column shows the order of evaluation for analyses that contain calculated fields to compute
LAC-W expressions at the prefilter (PRE_FILTER) level. The third column shows the order of evaluation
for analyses that contain calculated fields to compute LAC-W expressions at the preaggregate (PRE_AGG)
level. The last column shows the order of evaluation for analyses that contain calculated fields to
compute LAC-A expressions. Following the illustration, there is a more detailed explanation of the order
of evaluation. For more information about level aware calculations, see Using level-aware calculations in
Amazon QuickSight (p. 167).
The following list shows the sequence in which Amazon QuickSight applies the configuration in your
analysis. Anything that's set up in your data set happens outside your analysis, for example calculations
166
Amazon QuickSight User Guide
Level-aware calculations
at the data set level, filters, and security settings. These all apply to the underlying data. The following
list only covers what happens inside the analysis.
1. LAC-W Prefilter level: Evaluates the data at the original table cardinality before analysis filters
a. Simple calculations: Calculations at scalar level without any aggregations or window calculations.
For example, date_metric/60, parseDate(date, 'yyyy/MM/dd'), ifelse(metric > 0,
metric, 0), split(string_column, '|' 0).
b. LAC-W function PRE_FILTER: If any LAC-W PRE_FILTER expression is involved in the visual, Amazon
QuickSight firstly computes the window function at the original table level, before any filters.
If the LAC-W PRE_FILTER expression is used in filters, it is applied at this point. For example,
maxOver(Population, [State, County], PRE_FILTER) > 1000.
2. LAC-W PRE_AGG: Evaluates the data at the original table cardinality before aggregations
a. Filters added during analysis: Filters created for un-aggregated fields in the visuals are applied at
this point, which are similar to WHERE clauses. For example, year > 2020.
b. LAC-W function PRE_AGG: If any LAC-W PRE_AGG expression is involved in the visual, Amazon
QuickSight computes the window function before any aggregation applied. If the LAC-W PRE_AGG
expression is used in filters, it is applied at this point. For example, maxOver(Population,
[State, County], PRE_AGG) > 1000.
c. Top/bottom N filters: Filters that are configured on dimensions to display top/bottom N items.
3. LAC-A level: Evaluate aggregations at customized level, before visual aggregations
a. Custom-level aggregations: If any LAC-A expression is involved in the visual, it is calculated at
this point. Based on the table after the filters mentioned above, Amazon QuickSight computes the
aggregation, grouped by the dimensions that are specified in the calculated fields. For example,
max(Sales, [Region]).
4. Visual level: Evaluates aggregations at visual level, and post-aggregation table calculations, with the
remaining configurations applied in the visuals
a. Visual-level aggregations: Visual aggregations should always be applied except for tabular tables
(where dimension is empty). With this setting, aggregations based on the fields in the field wells
are calculated, grouped by the dimensions that put into the visuals. If any filter is built on top of
aggregations, it is applied at this point, similar to HAVING clauses. For example, min(distance) >
100.
b. Table calculations: If there is any post-aggregation table calculation (it should take aggregated
expression as operand) referenced in the visual, it is calculated at this point. Amazon QuickSight
performs window calculations after visual aggregations. Similarly, filters built on such calculations
are applied.
c. Other category calculations: This type of calculation only exists in line/bar/pie/donut charts. For
more information, see Display limits in visuals (p. 388).
d. Totals and subtotals: Totals and Subtotals are calculated in donut charts (only totals), tables (only
totals) and pivot tables, if requested.
With Level-aware calculations (LAC) you can specify the level of granularity that you want to compute
window functions or aggregate functions. There are two types of LAC functions: level-aware calculation -
aggregate (LAC-A) functions, and level-aware calculation - window (LAC-W) functions.
Topics
• Level-aware calculation - aggregate (LAC-A) functions (p. 168)
167
Amazon QuickSight User Guide
Level-aware calculations
sum(measure,[group_field_A])
To use LAC-A functions, type them directly in the calculation editor by adding the intended aggregation
levels as the second argument between brackets. Following is an example of an aggregate function and a
LAC-A function, for comparison.
• Aggregate function:sum({sales})
• LAC-A function:sum({sales}, [{Country},{Product}])
The results are computed with the specified level in the brackets [].
LAC-A examples
You can do the following with LAC-A functions:
• Run calculations that are independent of the levels in the visual. For example, if you have the
following calculation, the sales numbers are aggregated only at the country level, but not across other
dimensions (Region or Product) in the visual.
sum({Sales},[{Country}])
168
Amazon QuickSight User Guide
Level-aware calculations
• Run calculations for the dimensions that are not in the visual. For example, if you have the following
function, you can calculate the average total country sales by region.
sum({Sales},[{Country}])
Though Country is not included in the visual, the LAC-A function first aggregates the sales at the
Country level and then the visual level calculation generates the average number for each region.
If the LAC-A function isn't used to specify the level, the average sales are calculated at the lowest
granular level (the base level of the dataset) for each region (showing in the sales column).
169
Amazon QuickSight User Guide
Level-aware calculations
• Use LAC-A combined with other aggregate functions and LAC-W functions. There are two ways you can
nest LAC-A functions with other functions.
• You can write a nested syntax when you create a calculation. For example, the LAC-A function can be
nested with a LAC-W function to calculate the total sales by country of each product's average price:
sum(avgOver({Sales},[{Product}],PRE_AGG),[{Country}])
• When adding a LAC-A function into a visual, the calculation can be further nested with visual-level
aggregate functions that you selected in the fields well. For more information about changing the
aggregation of fields in the visual, see Changing or adding aggregation to a field by using a field
well (p. 557).
LAC-A limitations
The following limitations apply to LAC-A functions:
• LAC-A functions are supported for all additive and non-additive aggregate functions, such as sum(),
count(), and percentile(). LAC-A functions are not supported for conditional aggregate functions
that end with "if", such as sumif() and countif(), nor for period aggregate functions that start with
"periodToDate", such as periodToDateSum() and periodToDateMax().
170
Amazon QuickSight User Guide
Level-aware calculations
• Row-level and column-level totals are not currently supported for for LAC-A functions in tables and
pivot tables. When you add row-level or column-level totals to the chart, the total number will show as
blank. Other non-LAC dimensions are not impacted.
• Nested LAC-A functions are not currently supported. A limited capability of LAC-A functions nested
with regular aggregate functions and LAC-W functions are supported.
• How many of my customers made only 1 purchase order? Or 10? Or 50? We want the visual to use the
count as a dimension rather than a metric in the visual.
• What are the total sales per market segment for customers whose lifetime spend is greater than
$100,000? The visual should only show the market segment and the total sales for each.
• How much is the contribution of each industry to the entire company's profit (percent of total)? We
want to be able to filter the visual to show some of the industries, and how they contribute to the total
sales for the displayed industries. However, we also want to see each industry's percent of total sales
for the entire company (including industries that are filtered out).
• What are the total sales in each category as compared to the industry average? The industry average
should include all of the categories, even after filtering.
• How are my customers grouped into cumulative spending ranges? We want to use the grouping as a
dimension rather than a metric.
For more complex questions, you can inject a calculation or filter before QuickSight gets to a specific
point in its evaluation of your settings. To directly influence your results, you add a calculation level
keyword to a table calculation. For more information on how QuickSight evaluates queries, see Order of
evaluation in Amazon QuickSight (p. 166).
• PRE_FILTER – Before applying filters from the analysis, QuickSight evaluates prefilter calculations.
Then it applies any filters that are configured on these prefilter calculations.
• PRE_AGG – Before computing display-level aggregations, QuickSight performs preaggregate
calculations. Then it applies any filters that are configured on these preaggregate calculations. This
work happens before applying top and bottom N filters.
171
Amazon QuickSight User Guide
Functions and operators
You can use the PRE_FILTER or PRE_AGG keyword as a parameter in the following table calculation
functions. When you specify a calculation level, you use an unaggregated measure in the function. For
example, you can use countOver({ORDER ID}, [{Customer ID}], PRE_AGG). By using PRE_AGG,
you specify that the countOver executes at the preaggregate level.
By default, the first parameter for each function must be an aggregated measure. If you use either
PRE_FILTER or PRE_AGG, you use a nonaggregated measure for the first parameter.
For LAC-W functions, the visual aggregation defaults to MIN to eliminate duplicates. To change the
aggregation, open the field's context (right-click) menu, and then choose a different aggregation.
For examples of when and how to use LAC-W functions in real life scenarios, see the following post in the
AWS Big Data Blog: Create advanced insights using Level Aware Aggregations in Amazon QuickSight.
Topics
• Operators (p. 172)
• Functions by category (p. 175)
• Functions (p. 180)
• Aggregate functions (p. 217)
• Table calculation functions (p. 255)
Operators
You can use the following operators in calculated fields. Amazon QuickSight uses the standard order of
operations: parentheses, exponents, multiplication, division, addition, subtraction (PEMDAS). Equal (=)
and not equal (<>) comparisons are case-sensitive.
• Addition (+)
• Subtraction (−)
• Multiplication (*)
• Division (/)
172
Amazon QuickSight User Guide
Functions and operators
• Mod (p. 199)(number, divisor) – Finds the remainder after dividing a number by a divisor.
• Log (p. 197)(expression) – Returns the base 10 logarithm of a given expression.
• Ln (p. 198)(expression) – Returns the natural logarithm of a given expression.
• Abs (p. 183)(expression) – Returns the absolute value of a given expression.
• Sqrt (p. 212)(expression) – Returns the square root of a given expression.
• Exp (p. 187)(expression) – Returns the base of natural log e raised to the power of a given
expression.
To make lengthy calculations easier to read, you can use parenthesis to clarify groupings and precedence
in calculations. In the following statement, you don't need parentheses. The multiplication statement is
processed first, and then the result is added to five, returning a value of 26. However, parentheses make
the statement easier to read and thus maintain.
5 + (7 * 3)
Because parenthesis are first in the order of operations, you can change the order in which other
operators are applied. For example, in the following statement the addition statement is processed first,
and then the result is multiplied by three, returning a value of 36.
(5 + 7) * 3
In the following example, rows where the Region field is South are included in the results. If the
Region is south, these rows are excluded.
Region = 'South'
173
Amazon QuickSight User Guide
Functions and operators
Region = 'south'
The following example shows a comparison that converts Region to all uppercase (SOUTH), and
compares it to SOUTH. This returns rows where the region is south, South, or SOUTH.
toUpper(Region) = 'SOUTH'
Example: (<>)
The not equal symbol <> means less than or greater than.
So, if we say x<>1, then we are saying if x is less than 1 OR if x is greater than 1. Both < and > are
evaluated together. In other words, if x is any value except 1. Or, x is not equal to 1.
Note
Use <>, not !=.
The following example compares Status Code to a numeric value. This returns rows where the Status
Code is not equal to 1.
statusCode <> 1
The following example compares multiple statusCode values. In this case, active records have
activeFlag = 1. This example returns rows where one of the following applies:
Example: (^)
The power symbol ^ means to the power of. You can use the power operator with any numeric field, with
any valid exponent.
The following example is a simple expression of 2 to the power of 4 or (2 * 2 * 2 * 2). This returns a value
of 16.
2^4
The following example computes the square root of the revenue field.
revenue^0.5
174
Amazon QuickSight User Guide
Functions and operators
ifelse(( (NOT (State = 'WA' OR State = 'OR')) AND Orders > 10), 'Special Promotion XYZ',
'n/a')
The following example compares promoCode a specified list of values. This example returns rows where
the promoCode is in the list (1, 2, 3).
promoCode = 1
OR promoCode = 2
OR promoCode = 3
The following example compares promoCode a specified list of values. This example returns rows where
the promoCode is NOT in the list (1, 2, 3).
NOT(promoCode = 1
OR promoCode = 2
OR promoCode = 3
)
Another way to express this is to provide a list where the promoCode is not equal to any items in the list.
promoCode <> 1
AND promoCode <> 2
AND promoCode <> 3
The following example examines OrderDate and returns rows where the OrderDate is between the
first day and last day of 2016. In this case, we want the first and last day included, so we use "or equal to"
on the comparison operators.
Functions by category
In this section, you can find a list of the functions available in Amazon QuickSight, sorted by category.
Topics
• Aggregate functions (p. 176)
• Conditional functions (p. 177)
• Date functions (p. 177)
• Numeric functions (p. 178)
• Mathematical functions (p. 178)
• String functions (p. 178)
175
Amazon QuickSight User Guide
Functions and operators
Aggregate functions
The aggregate functions for calculated fields in Amazon QuickSight include the following. These are only
available during analysis and visualization. Each of these functions returns values grouped by the chosen
dimension or dimensions. For each aggregation, there is also a conditional aggregation. These perform
the same type of aggregation, based on a condition.
• avg (p. 218) averages the set of numbers in the specified measure, grouped by the chosen dimension
or dimensions.
• avgIf (p. 219) calculates the average based on a conditional statement.
• count (p. 220) calculates the number of values in a dimension or measure, grouped by the chosen
dimension or dimensions.
• countIf (p. 221) calculates the count based on a conditional statement.
• distinct_count (p. 222) calculates the number of distinct values in a dimension or measure, grouped
by the chosen dimension or dimensions.
• distinct_countIf (p. 223) calculates the distinct count based on a conditional statement.
• max (p. 223) returns the maximum value of the specified measure, grouped by the chosen dimension
or dimensions.
• maxIf (p. 225) calculates the maximum based on a conditional statement.
• median (p. 225) returns the median value of the specified measure, grouped by the chosen
dimension or dimensions.
• medianIf (p. 227) calculates the median based on a conditional statement.
• min (p. 227) returns the minimum value of the specified measure, grouped by the chosen dimension
or dimensions.
• minIf (p. 228) calculates the minimum based on a conditional statement.
• percentile (p. 229) (alias of percentileDisc) computes the nth percentile of the specified measure,
grouped by the chosen dimension or dimensions.
• percentileCont (p. 229) calculates the nth percentile based on a continuous distribution of the
numbers of the specified measure, grouped by the chosen dimension or dimensions.
• percentileDisc (percentile) (p. 231) calculates the nth percentile based on the actual numbers of the
specified measure, grouped by the chosen dimension or dimensions.
• periodToDateAvg (p. 233) averages the set of numbers in the specified measure for a given time
granularity (for instance, a quarter) up to a point in time.
• periodToDateCount (p. 234) calculates the number of values in a dimension or measure for a given
time granularity (for instance, Quarter) up to a point in time including duplicates.
• periodToDateMax (p. 235) returns the maximum value of the specified measure for a given time
granularity (for instance, a quarter) up to a point in time.
• periodToDateMedian (p. 237) returns the median value of the specified measure for a given time
granularity (for instance, a quarter) up to a point in time.
• periodToDateMin (p. 238) returns the minimum value of the specified measure or date for a given
time granularity (for instance, a quarter) up to a point in time.
• periodToDatePercentile (p. 239) calculates the percentile based on the actual numbers in measure for
a given time granularity (for instance, a quarter) up to a point in time.
• periodToDatePercentileCont (p. 241) calculates percentile based on a continuous distribution of the
numbers in the measure for a given time granularity (for instance, a quarter) up to a point in time.
• periodToDateStDev (p. 243) calculates the standard deviation of the set of numbers in the specified
measure for a given time granularity (for instance, a quarter) up to a point in time based on a sample.
176
Amazon QuickSight User Guide
Functions and operators
• periodToDateStDevP (p. 244) calculates the population standard deviation of the set of numbers in
the specified measure for a given time granularity (for instance, a quarter) up to a point in time based
on a sample.
• periodToDateSum (p. 245) adds the set of numbers in the specified measure for a given time
granularity (for instance, a quarter) up to a point in time.
• periodToDateVar (p. 247) calculates the sample variance of the set of numbers in the specified
measure for a given time granularity (for instance, a quarter) up to a point in time.
• periodToDateVarP (p. 248) calculates the population variance of the set of numbers in the specified
measure for a given time granularity (for instance, a quarter) up to a point in time.
• stdev (p. 249)) calculates the standard deviation of the set of numbers in the specified measure,
grouped by the chosen dimension or dimensions, based on a sample.
• stdevIf (p. 251) calculates the sample standard deviation based on a conditional statement.
• stdevp (p. 250) calculates the standard deviation of the set of numbers in the specified measure,
grouped by the chosen dimension or dimensions, based on a biased population.
• stdevpIf (p. 251) calculates the population deviation based on a conditional statement.
• var (p. 253)) calculates the variance of the set of numbers in the specified measure, grouped by the
chosen dimension or dimensions, based on a sample.
• varIf (p. 254) calculates the sample variance based on a conditional statement.
• varp (p. 254)) calculates the variance of the set of numbers in the specified measure, grouped by the
chosen dimension or dimensions, based on a biased population.
• varpIf (p. 255) calculates the population variance based on a conditional statement.
• sum (p. 251)) adds the set of numbers in the specified measure, grouped by the chosen dimension or
dimensions.
• sumIf (p. 253)) calculates the sum based on a conditional statement.
Conditional functions
The conditional functions for calculated fields in Amazon QuickSight include the following:
• Coalesce (p. 184) returns the value of the first argument that is not null.
• Ifelse (p. 190) evaluates a set of if, then expression pairings, and returns the value of the then
argument for the first if argument that evaluates to true.
• isNotNull (p. 194) evaluates an expression to see if it is not null.
• isNull (p. 195) evaluates an expression to see if it is null. If the expression is null, isNull returns
true, and otherwise it returns false.
• nullIf (p. 199) compares two expressions. If they are equal, the function returns null. If they are not
equal, the function returns the first expression.
Date functions
The date functions for calculated fields in Amazon QuickSight include the following:
• addDateTime (p. 181) adds or subtracts a unit of time to the date or time provided.
• dateDiff (p. 186) returns the difference in days between two date fields.
• epochDate (p. 187) converts an epoch date into a standard date.
• Extract (p. 188) returns a specified portion of a date value.
• formatDate (p. 189) formats a date using a pattern you specify.
• Now (p. 199) returns the current date and time, using either settings for a database, or UTC for file
and Salesforce.
• truncDate (p. 216) returns a date value that represents a specified portion of a date.
177
Amazon QuickSight User Guide
Functions and operators
Numeric functions
The numeric functions for calculated fields in Amazon QuickSight include the following:
• Ceil (p. 183) rounds a decimal value to the next highest integer.
• decimalToInt (p. 185) converts a decimal value to an integer.
• Floor (p. 189) decrements a decimal value to the next lowest integer.
• intToDecimal (p. 194) converts an integer value to a decimal.
• Round (p. 210) rounds a decimal value to the closest integer or, if scale is specified, to the closest
decimal place.
Mathematical functions
The mathematical functions for calculated fields in Amazon QuickSight include the following:
• Mod (p. 199)(number, divisor) – Finds the remainder after dividing a number by a divisor.
• Log (p. 197)(expression) – Returns the base 10 logarithm of a given expression.
• Ln (p. 198)(expression) – Returns the natural logarithm of a given expression.
• Abs (p. 183)(expression) – Returns the absolute value of a given expression.
• Sqrt (p. 212)(expression) – Returns the square root of a given expression.
• Exp (p. 187)(expression) – Returns the base of natural log e raised to the power of a given
expression.
String functions
The string (text) functions for calculated fields in Amazon QuickSight include the following:
178
Amazon QuickSight User Guide
Functions and operators
• Trim (p. 215) removes both preceding and following blank space from a string.
Table calculations
Table calculations form a group of functions that provide context in an analysis. They provide support for
enriched aggregated analysis. By using these calculations, you can address common business scenarios
such as calculating percentage of total, running sum, difference, common baseline, and rank.
When you are analyzing data in a specific visual, you can apply table calculations to the current set of
data to discover how dimensions influence measures or each other. Visualized data is your result set
based on your current dataset, with all the filters, field selections, and customizations applied. To see
exactly what this result set is, you can export your visual to a file. A table calculation function performs
operations on the data to reveal relationships between fields.
Lookup-based functions
• Difference (p. 256) calculates the difference between a measure based on one set of partitions and
sorts, and a measure based on another.
• Lag (p. 259) calculates the lag (previous) value for a measure.
• Lead (p. 261) calculates the lead (following) value for a measure.
• percentDifference (p. 263) calculates the percentage difference between the current value and a
comparison value.
Over functions
• avgOver (p. 265) calculates the average of a measure over one or more dimensions.
• countOver (p. 267) calculates the count of a field over one or more dimensions.
• distinctCountOver (p. 258) calculates the distinct count of the operand partitioned by the specified
attributes at a specified level.
• maxOver (p. 270) calculates the maximum of a measure over one or more dimensions.
• minOver (p. 272) the minimum of a measure over one or more dimensions.
• percentileOver (p. 274) (alias of percentileDiscOver) calculates the nth percentile of a measure
partitioned by a list of dimensions.
• percentileContOver (p. 274) calculates the nth percentile based on a continuous distribution of the
numbers of a measure partitioned by a list of dimensions.
• percentileDiscOver (p. 276) calculates the nth percentile based on the actual numbers of a measure
partitioned by a list of dimensions.
• percentOfTotal (p. 278) calculates the percentage that a measure contributes to the total.
• periodOverPeriodDifference (p. 279) calculates the difference of a measure over two different time
periods as specified by period granularity and offset.
• periodOverPeriodLastValue (p. 281) calculates the last (previous) value of a measure from a previous
time period as specified by period granularity and offset.
• periodOverPeriodPercentDifference (p. 283) calculates the percent difference of a measure over two
different time periods as specified by period granularity and offset.
• periodToDateAvgOverTime (p. 284) calculates the average of a measure for a given time granularity
(for instance, a quarter) up to a point in time.
• periodToDateCountOverTime (p. 285) calculates the count of a dimension or measure for a given
time granularity (for instance, a quarter) up to a point in time.
• periodToDateMaxOverTime (p. 286) calculates the maximum of a measure or date for a given time
granularity (for instance, a quarter) up to a point in time.
• periodToDateMinOverTime (p. 287) calculates the minimum of a measure or date for a given time
granularity (for instance, a quarter) up to a point in time.
179
Amazon QuickSight User Guide
Functions and operators
• periodToDateSumOverTime (p. 288) calculates the sum of a measure for a given time granularity (for
instance, a quarter) up to a point in time.
• sumOver (p. 294) calculates the sum of a measure over one or more dimensions.
• stdevOver (p. 289) calculates the standard deviation of the specified measure, partitioned by the
chosen attribute or attributes, based on a sample.
• stdevpOver (p. 291) calculates the standard deviation of the specified measure, partitioned by the
chosen attribute or attributes, based on a biased population.
• varOver (p. 292) calculates the variance of the specified measure, partitioned by the chosen attribute
or attributes, based on a sample.
• varpOver (p. 293) calculates the variance of the specified measure, partitioned by the chosen
attribute or attributes, based on a biased population.
Ranking functions
Running functions
Window functions
• firstValue (p. 305) calculates the first value of the aggregated measure or dimension partitioned and
sorted by specified attributes.
• lastValue (p. 306) calculates the last value of the aggregated measure or dimension partitioned and
sorted by specified attributes.
• windowAvg (p. 307) calculates the average of the aggregated measure in a custom window that is
partitioned and sorted by specified attributes.
• windowCount (p. 309) calculates the count of the aggregated measure in a custom window that is
partitioned and sorted by specified attributes.
• windowMax (p. 310) calculates the maximum of the aggregated measure in a custom window that is
partitioned and sorted by specified attributes.
• windowMin (p. 312) calculates the minimum of the aggregated measure in a custom window that is
partitioned and sorted by specified attributes.
• windowSum (p. 314) calculates the sum of the aggregated measure in a custom window that is
partitioned and sorted by specified attributes.
Functions
In this section, you can find a list of functions available in Amazon QuickSight. To view a list of functions
sorted by category, with brief definitions, see Functions by category (p. 175).
Topics
• addDateTime (p. 181)
180
Amazon QuickSight User Guide
Functions and operators
addDateTime
addDateTime adds or subtracts a unit of time from a datetime value. For example,
addDateTime(2,'YYYY',parseDate('02-JUL-2018', 'dd-MMM-yyyy') ) returns 02-
JUL-2020. You can use this function to perform date math on your date and time data.
181
Amazon QuickSight User Guide
Functions and operators
Syntax
Arguments
amount
A positive or negative integer value that represents the amount of time that you want to add or
subtract from the provided datetime field.
period
A positive or negative value that represents the amount of time that you want to add or subtract
from the provided datetime field. Valid periods are as follows:
• YYYY: This returns the year portion of the date.
• Q: This returns the quarter that the date belongs to (1–4).
• MM: This returns the month portion of the date.
• DD: This returns the day portion of the date.
• WK: This returns the week portion of the date. The week starts on Sunday in Amazon QuickSight.
• HH: This returns the hour portion of the date.
• MI: This returns the minute portion of the date.
• SS: This returns the second portion of the date.
• MS: This returns the millisecond portion of the date.
datetime
The date or time that you want to perform date math on.
Return type
Datetime
Example
Let's say you have a field called purchase_date that has the following values.
Using the following calculations, addDateTime modifies the values as shown following.
182
Amazon QuickSight User Guide
Functions and operators
Abs
abs returns the absolute value of a given expression.
Syntax
abs(expression)
Arguments
expression
The expression must be numeric. It can be a field name, a literal value, or another function.
Ceil
ceil rounds a decimal value to the next highest integer. For example, ceil(29.02) returns 30.
Syntax
ceil(decimal)
Arguments
decimal
A field that uses the decimal data type, a literal value like 17.62, or a call to another function that
outputs a decimal.
Return type
Integer
Example
The following example rounds a decimal field to the next highest integer.
ceil(salesAmount)
20.13
892.03
57.54
21
893
58
183
Amazon QuickSight User Guide
Functions and operators
Coalesce
coalesce returns the value of the first argument that is not null. When a non-null value is found, the
remaining arguments in the list are not evaluated. If all arguments are null, the result is null. 0-length
strings are valid values and are not considered equivalent to null.
Syntax
Arguments
coalesce takes two or more expressions as arguments. All of the expressions must have the same data
type or be able to be implicitly cast to the same data type.
expression
The expression can be numeric, datetime, or string. It can be a field name, a literal value, or another
function.
Return type
coalesce returns a value of the same data type as the input arguments.
Example
The following example retrieves a customer's billing address if it exists, her street address if there is no
billing address, or returns "No address listed" if neither address is available.
Concat
concat concatenates two or more strings.
Syntax
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
Return type
String
Examples
The following example concatenates three string fields and adds appropriate spacing.
184
Amazon QuickSight User Guide
Functions and operators
Ms. Li Juan
Dr. Ana Carolina Silva
Mr. Nikhil Jayashankar
concat('Hello', 'world')
Helloworld
decimalToInt
decimalToInt converts a decimal value to the integer data type by stripping off the decimal point and
any numbers after it. decimalToInt does not round up. For example, decimalToInt(29.99) returns
29.
Syntax
decimalToInt(decimal)
Arguments
decimal
A field that uses the decimal data type, a literal value like 17.62, or a call to another function that
outputs a decimal.
Return type
Integer
Example
decimalToInt(salesAmount)
20.13
185
Amazon QuickSight User Guide
Functions and operators
892.03
57.54
20
892
57
dateDiff
dateDiff returns the difference in days between two date fields. If you include a value for the period,
dateDiff returns the difference in the period interval, rather than in days.
Syntax
dateDiff(date1, date2,[period])
Arguments
date 1
The first date in the comparison. A date field or a call to another function that outputs a date.
date 2
The second date in the comparison. A date field or a call to another function that outputs a date.
period
The period of difference that you want returned, enclosed in quotes. Valid periods are as follows:
• YYYY: This returns the year portion of the date.
• Q: This returns the date of the first day of the quarter that the date belongs to.
• MM: This returns the month portion of the date.
• DD: This returns the day portion of the date.
• WK: This returns the week portion of the date. The week starts on Sunday in Amazon QuickSight.
• HH: This returns the hour portion of the date.
• MI: This returns the minute portion of the date.
• SS: This returns the second portion of the date.
• MS: This returns the millisecond portion of the date.
Return type
Integer
Example
186
Amazon QuickSight User Guide
Functions and operators
orderDate shipdate
=============================
01/01/18 03/05/18
09/13/17 10/20/17
2
1
epochDate
epochDate converts an epoch date into a standard date in the format yyyy-MM-ddTkk:mm:ss.SSSZ,
using the format pattern syntax specified in Class DateTimeFormat in the Joda project documentation.
An example is 2015-10-15T19:11:51.003Z.
epochDate is supported for use with analyses based on datasets stored in QuickSight (SPICE).
Syntax
epochDate(epochdate)
Arguments
epochdate
An epoch date, which is an integer representation of a date as the number of seconds since 00:00:00
UTC on January 1, 1970.
epochdate must be an integer. It can be the name of a field that uses the integer data type, a literal
integer value, or a call to another function that outputs an integer. If the integer value is longer than
10 digits, the digits after the 10th place are discarded.
Return type
Date
Example
epochDate(3100768000)
2068-04-04T12:26:40.000Z
Exp
exp returns the base of natural log e raised to the power of a given expression.
Syntax
exp(expression)
187
Amazon QuickSight User Guide
Functions and operators
Arguments
expression
The expression must be numeric. It can be a field name, a literal value, or another function.
Extract
extract returns a specified portion of a date value. Requesting a time-related portion of a date that
doesn't contain time information returns 0.
Syntax
extract(period, date)
Arguments
period
The period that you want extracted from the date value. Valid periods are as follows:
• YYYY: This returns the year portion of the date.
• Q: This returns the quarter that the date belongs to (1–4).
• MM: This returns the month portion of the date.
• DD: This returns the day portion of the date.
• WD: This returns the day of the week as an integer, with Sunday as 1.
• HH: This returns the hour portion of the date.
• MI: This returns the minute portion of the date.
• SS: This returns the second portion of the date.
• MS: This returns the millisecond portion of the date.
Note
Extracting milliseconds is not supported in Presto databases below version 0.216.
date
Return type
Integer
Example
extract('DD', orderDate)
orderDate
=========
01/01/14
09/13/16
188
Amazon QuickSight User Guide
Functions and operators
01
13
Floor
floor decrements a decimal value to the next lowest integer. For example, floor(29.08) returns 29.
Syntax
floor(decimal)
Arguments
decimal
A field that uses the decimal data type, a literal value like 17.62, or a call to another function that
outputs a decimal.
Return type
Integer
Example
The following example decrements a decimal field to the next lowest integer.
floor(salesAmount)
20.13
892.03
57.54
20
892
57
formatDate
formatDate formats a date using a pattern you specify. When you are preparing data, you can use
formatDate to reformat the date. To reformat a date in an analysis, you choose the format option from
the context menu on the date field.
Syntax
formatDate(date, ['format'])
Arguments
date
189
Amazon QuickSight User Guide
Functions and operators
format
(Optional) A string containing the format pattern to apply. This argument accepts the format
patterns specified in Supported date formats (p. 73).
Return type
String
Example
order date
=========
2012-12-14T00:00:00.000Z
2013-12-29T00:00:00.000Z
2012-11-15T00:00:00.000Z
13 Dec 2012
28 Dec 2013
14 Nov 2012
Example
If the date contains single quotes or apostrophes, for example yyyyMMdd'T'HHmmss, you can handle
this date format by using one of the following methods.
• Enclose the entire date in double quotes, as shown in the following example:
formatDate({myDateField}, "yyyyMMdd'T'HHmmss")
• Escape the single quotes or apostrophes by adding a backslash ( \ ) to the left of them, as shown in
the following example:
formatDate({myDateField}, 'yyyyMMdd\'T\'HHmmss')
Ifelse
ifelse evaluates a set of if, then expression pairings, and returns the value of the then argument for the
first if argument that evaluates to true. The remaining arguments in the list are not evaluated. If none of
the if arguments evaluate to true, then the value of the else argument is returned.
Syntax
190
Amazon QuickSight User Guide
Functions and operators
Arguments
ifelse requires one or more if,then expression pairings, and requires exactly one expression for the else
argument.
if-expression
The expression to be evaluated as true or not. It can be a field name like address1, a literal
value like 'Unknown', or another function like toString(salesAmount). An example is
isNotNull(FieldName).
If you use multiple AND and OR operators in the if argument, enclose statements in parentheses to
identify processing order. For example, the following if argument returns records with a month of
1, 2, or 5 and a year of 2000.
The next if argument uses the same operators, but returns records with a month of 5 and any year,
or with a month of 1 or 2 and a year of 2000.
then-expression
The expression to return if its if argument is evaluated as true. It can be a field name like address1,
a literal value like 'Unknown', or a call to another function. The expression must have the same
data type as the other then arguments and the else argument.
else-expression
The expression to return if none of the if arguments evaluate as true. It can be a field name like
address1, a literal value like 'Unknown', or another function like toString(salesAmount). The
expression must have the same data type as all of the then arguments.
Return type
ifelse returns a value of the same data type as the values in then-expression. All data returned then
and else expressions must be of the same data type or be converted to the same data type.
Examples
The following example categorizes sales per customer into human-readable levels.
The following example uses AND, OR, and NOT to compare multiple expressions using conditional
operators to tag top customers NOT in Washington or Oregon with a special promotion, who made more
than 10 orders. If no values are returned, the value 'n/a' is used.
ifelse(( (NOT (State = 'WA' OR State = 'OR')) AND Orders > 10), 'Special Promotion XYZ',
'n/a')
The following example assigns a group to a sales record based on the sales total. The structure of each
if-then phrase mimics the behavior of between, a keyword that doesn't currently work in calculated
field expressions. For example, the result of the comparison salesTotal >= 0 AND salesTotal <
500 returns the same values as the SQL comparison salesTotal between 0 and 499.
191
Amazon QuickSight User Guide
Functions and operators
ifelse(salesTotal >= 0 AND salesTotal < 500, 'Group 1', salesTotal >= 500 AND salesTotal <
1000, 'Group 2', 'Group 3')
The following example tests for a NULL value by using coalesce to return the first non-NULL
value. Instead of needing to remember the meaning of a NULL in a date field, you can use a readable
description instead. If the disconnect date is NULL, the example returns the suspend date, unless
both of those are NULL. Then coalesce(DiscoDate, SuspendDate, '12/31/2491') returns
'12/31/2491'. The return value must match the other data types. This date might seem like an unusual
value, but a date in the 25th century reasonably simulates the "end of time," defined as the highest date
in a data mart.
The following shows a more complex example in a more readable format, just to show that you don't
need to compress your code all into one long line. This example provides for multiple comparisons of
the value a survey result. It handles potential NULL values for this field and categorizes two acceptable
ranges. It also labels one range that needs more testing and another that's not valid (out of range). For
all remaining values, it applies the else condition, and labels the row as needing a retest three years
after the date on that row.
ifelse
(
isNull({SurveyResult}), 'Untested',
{SurveyResult}=1, 'Range 1',
{SurveyResult}=2, 'Range 2',
{SurveyResult}=3, 'Need more testing',
{SurveyResult}=99, 'Out of Range',
concat
(
'Retest by ',
toString
(
addDateTime(3, "YYYY", {Date})
)
)
)
The following example assigns a "manually" created region name to a group of states. It also uses
spacing and comments, wrapped in /* */, to make it easier to maintain the code.
ifelse
( /* NE REGION*/
locate('New York, New Jersey, Connecticut, Vermont, Maine, Rhode Island, New
Hampshire',{State}) > 0,
'Northeast',
/* SE REGION*/
locate('Georgia, Alabama, South Carolina, Louisiana',{State}) > 0,
'Southeast',
'Other Region'
)
1. We list the states that we want for each region, enclosing each list in quotation marks to make each
list a string, as follows:
192
Amazon QuickSight User Guide
Functions and operators
• 'New York, New Jersey, Connecticut, Vermont, Maine, Rhode Island, New
Hampshire'
• 'Georgia, Alabama, South Carolina, Louisiana'
• You can add more sets, or use countries, cities, provinces, or What3Words if you want.
2. We ask if the value for State (for each row) is found in the list, by using the locate function to
return a nonzero value if the state is found in the list, as follows.
locate('New York, New Jersey, Connecticut, Vermont, Maine, Rhode Island, New Hampshire',
{State})
and
3. The locate function returns a number instead of a TRUE or FALSE, but ifelse requires the
TRUE/FALSE Boolean value. To get around this, we can compare the result of locate to a number. If
the state is in the list, the return value is greater than zero.
a. Ask if the state is present.
locate('New York, New Jersey, Connecticut, Vermont, Maine, Rhode Island, New
Hampshire',{State}) > 0
b. If it's present the region, label it as the specific region, in this case a Northeast region.
4. Because we have states that aren't in a list, and because ifelse requires a single else expression, we
provide 'Other Region' as the label for the leftover states.
5. We wrap all that in the ifelse( ) function to get the final version. The following example leaves out
the Southeast region states that were in the original. You can add them back in place of the <insert
more regions here> tag.
If you want to add more regions, you can construct more copies of those two lines and alter the list of
states to suit your purpose. You can change the region name to something that suits you, and change
the field name from State to anything that you need.
ifelse
(
/*The if expression:*/ locate('New York, New Jersey, Connecticut, Vermont, Maine,
Rhode Island, New Hampshire',{State}) > 0,
/*The then expression:*/ 'Northeast',
Note
There are other ways to do the initial comparison for the if expression. For example, suppose
that you pose the question "What states are not missing from this list?" rather than "Which
193
Amazon QuickSight User Guide
Functions and operators
states are on the list?" If you do, you might phrase it differently. You might compare the
locate statement to zero to find values that are missing from the list, and then use the NOT
operator to classify them as "not missing," as follows.
Both versions are correct. The version that you choose should make the most sense to
you and your team, so you can maintain it easily. If all the options seem equal, choose the
simplest.
intToDecimal
intToDecimal converts an integer value to the decimal data type.
Syntax
intToDecimal(integer)
Arguments
int
A field that uses the integer data type, a literal value like 14, or a call to another function that
outputs an integer.
Return type
Decimal
Example
intToDecimal(price)
20
892
57
20.0
892.0
58.0
You can apply formatting inside an analysis, for example to format price as currency.
isNotNull
isNotNull evaluates an expression to see if it is not null. If the expression is not null, isNotNull
returns true, and otherwise it returns false.
194
Amazon QuickSight User Guide
Functions and operators
Syntax
isNotNull(expression)
Arguments
expression
The expression to be evaluated as null or not. It can be a field name like address1 or a call to
another function that outputs a string.
Return type
Boolean
Example
The following example evaluates the sales_amount field for null values.
isNotNull(salesAmount)
20.13
(null)
57.54
true
false
true
isNull
isNull evaluates an expression to see if it is null. If the expression is null, isNull returns true, and
otherwise it returns false.
Syntax
isNull(expression)
Arguments
expression
The expression to be evaluated as null or not. It can be a field name like address1 or a call to
another function that outputs a string.
Return type
Boolean
Example
The following example evaluates the sales_amount field for null values.
195
Amazon QuickSight User Guide
Functions and operators
isNull(salesAmount)
20.13
(null)
57.54
false
true
false
The following example tests for a NULL value in an ifelse statement, and returns a human-readable
value instead.
Left
left returns the leftmost characters from a string, including spaces. You specify the number of
characters to be returned.
Syntax
left(expression, limit)
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
limit
The number of characters to be returned from expression, starting from the first character in the
string.
Return type
String
Example
Sea
196
Amazon QuickSight User Guide
Functions and operators
Locate
locate locates a substring that you specify within another string, and returns the number of characters
until the first character in the substring. The function returns 0 if it doesn't find the substring. The
function is 1-based.
Syntax
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
substring
The set of characters in expression that you want to locate. The substring can occur one or more
times in expression.
start
(Optional) If substring occurs more than once, use start to identify where in the string the function
should start looking for the substring. For example, suppose that you want to find the second
example of a substring and you think it typically occurs after the first 10 characters. You specify a
start value of 10. It should start from 1.
Return type
Integer
Examples
The following example returns information about where the first occurrence of the substring 'and'
appears in a string.
The following example returns information about where the first occurrence of the substring 'and'
appears in a string after the fourth character.
Log
log returns the base 10 logarithm of a given expression.
197
Amazon QuickSight User Guide
Functions and operators
Syntax
log(expression)
Arguments
expression
The expression must be numeric. It can be a field name, a literal value, or another function.
Ln
ln returns the natural logarithm of a given expression.
Syntax
ln(expression)
Arguments
expression
The expression must be numeric. It can be a field name, a literal value, or another function.
Ltrim
ltrim removes preceding blank space from a string.
Syntax
ltrim(expression)
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
Return type
String
Example
198
Amazon QuickSight User Guide
Functions and operators
Mod
Use the mod function to find the remainder after dividing the number by the divisor. You can use the mod
function or the modulo operator (%) interchangeably.
Syntax
mod(number, divisor)
number%divisor
Arguments
number
The number is the positive integer that you want to divide and find the remainder for.
divisor
The divisor is the positive integer that you are dividing by. If the divisor is zero, this function returns
an error on dividing by 0.
Example
The following examples return the modulo of 17 when dividing by 6. The first example uses the %
operator, and the second example uses the mod function.
17%6
mod( 17, 6 )
Now
For database datasets that directly query the database, now returns the current date and time
using the settings and format specified by the database server. For SPICE and Salesforce data sets,
now returns the UTC date and time, in the format yyyy-MM-ddTkk:mm:ss:SSSZ (for example,
2015-10-15T19:11:51:003Z).
Syntax
now()
Return type
Date
nullIf
nullIf compares two expressions. If they are equal, the function returns null. If they are not equal, the
function returns the first expression.
199
Amazon QuickSight User Guide
Functions and operators
Syntax
nullIf(expression1, expression2)
Arguments
nullIf takes two expressions as arguments.
expression
The expression can be numeric, datetime, or string. It can be a field name, a literal value, or another
function.
Return type
String
Example
The following example returns nulls if the reason for a shipment delay is unknown.
nullIf(delayReason, 'unknown')
delayReason
============
unknown
back ordered
weather delay
(null)
back ordered
weather delay
parseDate
parseDate parses a string to determine if it contains a date value, and returns a standard date
in the format yyyy-MM-ddTkk:mm:ss.SSSZ (using the format pattern syntax specified in Class
DateTimeFormat in the Joda project documentation), for example 2015-10-15T19:11:51.003Z. This
function returns all rows that contain a date in a valid format and skips any rows that don't, including
rows that contain null values.
Amazon QuickSight supports dates in the range from Jan 1, 1900 00:00:00 UTC to Dec 31, 2037
23:59:59 UTC. For more information, see Supported date formats (p. 73).
Syntax
parseDate(expression, ['format'])
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '1/1/2016', or a call to another function that outputs a string.
200
Amazon QuickSight User Guide
Functions and operators
format
(Optional) A string containing the format pattern that date_string must match. For example, if you
are using a field with data like 01/03/2016, you specify the format 'MM/dd/yyyy'. If you don't
specify a format, it defaults to yyyy-MM-dd. Rows whose data doesn't conform to format are
skipped.
Different date formats are supported based on the type of dataset used. Use the following table to
see details of supported date formats.
File, Amazon Athena, and Salesforce data sets All date format patterns specified in Supported
date formats (p. 73).
201
Amazon QuickSight User Guide
Functions and operators
202
Amazon QuickSight User Guide
Functions and operators
203
Amazon QuickSight User Guide
Functions and operators
Return type
Date
204
Amazon QuickSight User Guide
Functions and operators
Example
The following example evaluates prodDate to determine if it contains date values.
parseDate(prodDate, 'MM/dd/yyyy')
prodDate
--------
01-01-1999
12/31/2006
1/18/1982
7/4/2010
12-31-2006T00:00:00.000Z
01-18-1982T00:00:00.000Z
07-04-2010T00:00:00.000Z
parseDecimal
parseDecimal parses a string to determine if it contains a decimal value. This function returns all rows
that contain a decimal, integer, or null value, and skips any rows that don't. If the row contains an integer
value, it is returned as a decimal with up to 4 decimal places. For example, a value of '2' is returned as
'2.0'.
Syntax
parseDecimal(expression)
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '9.62', or a call to another function that outputs a string.
Return type
Decimal
Example
The following example evaluates fee to determine if it contains decimal values.
parseDecimal(fee)
fee
--------
2
2a
12.13
3b
205
Amazon QuickSight User Guide
Functions and operators
3.9
(null)
198.353398
2.0
12.13
3.9
(null)
198.3533
parseInt
parseInt parses a string to determine if it contains an integer value. This function returns all rows that
contain a decimal, integer, or null value, and skips any rows that don't. If the row contains a decimal
value, it is returned as the nearest integer, rounded down. For example, a value of '2.99' is returned as '2'.
Syntax
parseInt(expression)
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '3', or a call to another function that outputs a string.
Return type
Integer
Example
parseInt(feeType)
feeType
--------
2
2.1
2a
3
3b
(null)
5
2
2
3
(null)
206
Amazon QuickSight User Guide
Functions and operators
parseJson
Use parseJson to extract values from a JSON object.
If your dataset is stored in QuickSight SPICE, you can use parseJson when you are preparing a data set,
but not in calculated fields during analysis.
For direct query, you can use parseJson both during data preparation and analysis. The parseJson
function applies to either strings or to JSON native data types, depending on the dialect, as shown in the
following table.
Dialect Type
PostgreSQL JSON
MySQL JSON
Teradata JSON
Oracle String
Presto String
Hive String
Syntax
parseJson(fieldName, path)
Arguments
fieldName
The field containing the JSON object that you want to parse.
path
The path to the data element you want to parse from the JSON object. Valid path syntax includes:
• $ – Root object
• . – Child operator
• [ ] – Subscript operator for array
Return type
String
Example
The following example evaluates incoming JSON to retrieve a value for item quantity. By using this
during data preparation, you can create a table out of the JSON.
207
Amazon QuickSight User Guide
Functions and operators
parseJson({jsonField}, “$.items.qty”)
{
"customer": "John Doe",
"items": {
"product": "Beer",
"qty": 6
},
"list1": [
"val1",
"val2"
],
"list2": [
{
"list21key1": "list1value1"
}
]
}
Example
The following example evaluates JSONObject1 to extract the first key value pair (KVP), labeled
"State", and assign the value to the calculated field that you are creating.
parseJson(JSONObject1, “$.state”)
JSONObject1
-----------
{"State":"New York","Product":"Produce","Date Sold":"1/16/2018","Sales Amount":"$3423.39"}
{"State":"North Carolina","Product":"Bakery Products","Date Sold":"2/1/2018","Sales
Amount":"$3226.42"}
{"State":"Utah","Product":"Water","Date Sold":"4/24/2018","Sales Amount":"$7001.52"}
New York
North Carolina
Utah
Replace
replace replaces part of a string with another string that you specify.
Syntax
208
Amazon QuickSight User Guide
Functions and operators
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
substring
The set of characters in expression that you want to replace. The substring can occur one or more
times in expression.
replacement
Return type
String
Example
1 or 2 or 3
Right
right returns the rightmost characters from a string, including spaces. You specify the number of
characters to be returned.
Syntax
right(expression, limit)
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
limit
The number of characters to be returned from expression, starting from the last character in the
string.
Return type
String
Example
The following example returns the last five characters from a string.
209
Amazon QuickSight User Guide
Functions and operators
tle Store#14
Round
round rounds a decimal value to the closest integer if no scale is specified, or to the closest decimal
place if scale is specified.
Syntax
round(decimal, scale)
Arguments
decimal
A field that uses the decimal data type, a literal value like 17.62, or a call to another function that
outputs a decimal.
scale
Return type
Decimal
Example
The following example rounds a decimal field to the closest second decimal place.
round(salesAmount, 2)
20.1307
892.0388
57.5447
20.13
892.04
58.54
Rtrim
rtrim removes following blank space from a string.
Syntax
rtrim(expression)
210
Amazon QuickSight User Guide
Functions and operators
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
Return type
String
Example
Split
split splits a string into an array of substrings, based on a delimiter that you choose, and returns the
item specified by the position.
You can only add split to a calculated field during data preparation, not to an analysis. This function is
not supported in direct queries to Microsoft SQL Server.
Syntax
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street;1402 35th Ave;1818 Elm Ct;11 Janes Lane', or a call to
another function that outputs a string.
delimiter
The character that delimits where the string is broken into substrings. For example, split('one|
two|three', '|', 2) becomes the following.
one
two
three
(Required) The position of the item to return from the array. The position of the first item in the
array is 1.
211
Amazon QuickSight User Guide
Functions and operators
Return type
String array
Example
The following example splits a string into an array, using the semicolon character (;) as the delimiter, and
returns the third element of the array.
split('123 Test St;1402 35th Ave;1818 Elm Ct;11 Janes Lane', ';', 3)
1818 Elm Ct
Sqrt
sqrt returns the square root of a given expression.
Syntax
sqrt(expression)
Arguments
expression
The expression must be numeric. It can be a field name, a literal value, or another function.
Strlen
strlen returns the number of characters in a string, including spaces.
Syntax
strlen(expression)
Arguments
expression
An expression can be the name of a field that uses the string data type like address1, a literal value
like 'Unknown', or another function like substring(field_name,0,5).
Return type
Integer
Example
212
Amazon QuickSight User Guide
Functions and operators
16
Substring
substring returns the characters in a string, starting at the location specified by the start argument
and proceeding for the number of characters specified by the length arguments.
Syntax
Arguments
expression
An expression can be the name of a field that uses the string data type like address1, a literal value
like 'Unknown', or another function like substring(field_name,1,5).
start
The character location to start from. start is inclusive, so the character at the starting position is the
first character in the returned value. The minimum value for start is 1.
length
The number of additional characters to include after start. length is inclusive of start, so the last
character returned is (length - 1) after the starting character.
Return type
String
Example
The following example returns the 13th through 19th characters in a string. The beginning of the string
is index 1, so you begin counting at the first character.
Science
toLower
toLower formats a string in all lowercase. toLower skips rows containing null values.
Syntax
toLower(expression)
213
Amazon QuickSight User Guide
Functions and operators
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
Return type
String
Example
toString
toString formats the input expression as a string. toString skips rows containing null values.
Syntax
toString(expression)
Arguments
expression
An expression can be a field of any data type, a literal value like 14.62, or a call to another function
that returns any data type.
Return type
String
Example
The following example returns the values from payDate (which uses the date data type) as strings.
toString(payDate)
payDate
--------
1992-11-14T00:00:00.000Z
2012-10-12T00:00:00.000Z
1973-04-08T00:00:00.000Z
214
Amazon QuickSight User Guide
Functions and operators
1992-11-14T00:00:00.000Z
2012-10-12T00:00:00.000Z
1973-04-08T00:00:00.000Z
toUpper
toUpper formats a string in all uppercase. toUpper skips rows containing null values.
Syntax
toUpper(expression)
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
Return type
String
Example
Trim
trim removes both preceding and following blank space from a string.
Syntax
trim(expression)
Arguments
expression
The expression must be a string. It can be the name of a field that uses the string data type, a literal
value like '12 Main Street', or a call to another function that outputs a string.
Return type
String
Example
215
Amazon QuickSight User Guide
Functions and operators
truncDate
truncDate returns a date value that represents a specified portion of a date. For example, requesting
the year portion of the value 2012-09-02T00:00:00.000Z returns 2012-01-01T00:00:00.000Z. Specifying
a time-related period for a date that doesn't contain time information returns the initial date value
unchanged.
Syntax
truncDate('period', date)
Arguments
period
The period of the date that you want returned. Valid periods are as follows:
• YYYY: This returns the year portion of the date.
• Q: This returns the date of the first day of the quarter that the date belongs to.
• MM: This returns the month portion of the date.
• DD: This returns the day portion of the date.
• WK: This returns the week portion of the date. The week starts on Sunday in Amazon QuickSight.
• HH: This returns the hour portion of the date.
• MI: This returns the minute portion of the date.
• SS: This returns the second portion of the date.
• MS: This returns the millisecond portion of the date.
date
Return type
Date
Example
The following example returns a date representing the month of the order date.
truncDate('MM', orderDate)
orderDate
=========
2012-12-14T00:00:00.000Z
2013-12-29T00:00:00.000Z
216
Amazon QuickSight User Guide
Functions and operators
2012-11-15T00:00:00.000Z
2012-12-01T00:00:00.000Z
2013-12-01T00:00:00.000Z
2012-11-01T00:00:00.000Z
Aggregate functions
Aggregate functions are only available during analysis and visualization. Each of these functions returns
values grouped by the chosen dimension or dimensions. For each aggregation, there is also a conditional
aggregation. These perform the same type of aggregation, based on a condition.
When a calculated field formula contains an aggregation, it becomes a custom aggregation. To make
sure that your data is accurately displayed, Amazon QuickSight applies the following rules:
• Custom aggregations can't contain nested aggregate functions. For example, this formula doesn't
work: sum(avg(x)/avg(y)). However, nesting nonaggregated functions inside or outside aggregate
functions does work. For example, ceil(avg(x)) works. So does avg(ceil(x)).
• Custom aggregations can't contain both aggregated and nonaggregated fields, in any combination. For
example, this formula doesn't work: Sum(sales)+quantity.
• Filter groups can't contain both aggregated and nonaggregated fields.
• Custom aggregations can't be converted to a dimension. They also can't be dropped into the field well
as a dimension.
• In a pivot table, custom aggregations can't be added to table calculations.
• Scatter plots with custom aggregations need at least one dimension under Group/Color in the field
wells.
For more information about supported functions and operators, see Calculated field function and
operator reference for Amazon QuickSight (p. 172).
The aggregate functions for calculated fields in QuickSight include the following.
Topics
• avg (p. 218)
• avgIf (p. 219)
• count (p. 220)
• countIf (p. 221)
• distinct_count (p. 222)
• distinct_countIf (p. 223)
• max (p. 223)
• maxIf (p. 225)
• median (p. 225)
• medianIf (p. 227)
• min (p. 227)
• minIf (p. 228)
• percentile (p. 229)
• percentileCont (p. 229)
• percentileDisc (percentile) (p. 231)
217
Amazon QuickSight User Guide
Functions and operators
avg
The avg function averages the set of numbers in the specified measure, grouped by the chosen
dimension or dimensions. For example, avg(salesAmount) returns the average for that measure
grouped by the (optional) chosen dimension.
Syntax
Arguments
decimal
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
218
Amazon QuickSight User Guide
Functions and operators
avg({Sales})
You can also specify at what level to group the computation using one or more dimensions in the view
or in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-
A functions (p. 168). The following example calculates the average sales at the Country level, but not
across other dimensions (Region or Product) in the visual.
avg({Sales}, [{Country}])
avgIf
Based on a conditional statement, the avgIf function averages the set of numbers in
the specified measure, grouped by the chosen dimension or dimensions. For example,
avgIf(ProdRev,CalendarDay >= ${BasePeriodStartDate} AND CalendarDay <=
${BasePeriodEndDate} AND SourcingType <> 'Indirect') returns the average for that
measure grouped by the (optional) chosen dimension, if the condition evaluates to true.
Syntax
Arguments
decimal
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
condition
219
Amazon QuickSight User Guide
Functions and operators
count
The count function calculates the number of values in a dimension or measure, grouped by the chosen
dimension or dimensions. For example, count(product type) returns the total number of product
types grouped by the (optional) chosen dimension, including any duplicates. The count(sales)
function returns the total number of sales completed grouped by the (optional) chosen dimension, for
example salesperson.
Syntax
Arguments
dimension or measure
The argument must be a measure or a dimension. Null values are omitted from the results. Literal
values don't work. The argument must be a field.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
The following example calculates the count of sales by a specified dimension in the visual. In this
example, the count of sales by month are shown.
count({Sales})
You can also specify at what level to group the computation using one or more dimensions in the view
or in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-
A functions (p. 168). The following example calculates the count of sales at the Country level, but not
across other dimensions (Region or Product) in the visual.
count({Sales}, [{Country}])
220
Amazon QuickSight User Guide
Functions and operators
countIf
Based on a conditional statement, the countIf function calculates the number of values in a dimension
or measure, grouped by the chosen dimension or dimensions.
Syntax
Arguments
dimension or measure
The argument must be a measure or a dimension. Null values are omitted from the results. Literal
values don't work. The argument must be a field.
condition
Return type
Integer
Example
The following function returns a count of the sales transactions (Revenue) that meet the conditions,
including any duplicates.
countIf (
Revenue,
# Conditions
CalendarDay >= ${BasePeriodStartDate} AND
CalendarDay <= ${BasePeriodEndDate} AND
221
Amazon QuickSight User Guide
Functions and operators
distinct_count
The distinct_count function calculates the number of distinct values in a dimension or measure,
grouped by the chosen dimension or dimensions. For example, distinct_count(product type)
returns the total number of unique product types grouped by the (optional) chosen dimension, without
any duplicates. The distinct_count(ship date) function returns the total number of dates when
products were shipped grouped by the (optional) chosen dimension, for example region.
Syntax
Arguments
dimension or measure
The argument must be a measure or a dimension. Null values are omitted from the results. Literal
values don't work. The argument must be a field.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Example
The following example calculates the total number of dates when products were ordered grouped by the
(optional) chosen dimension in the visual, for example region.
distinct_count({Order Date})
222
Amazon QuickSight User Guide
Functions and operators
You can also specify at what level to group the computation using one or more dimensions in the view
or in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-
A functions (p. 168). The following example calculates the average sales at the Country level, but not
across other dimensions (Region) in the visual.
distinct_countIf
Based on a conditional statement, the distinct_countIf function calculates the number
of distinct values in a dimension or measure, grouped by the chosen dimension or dimensions.
For example, distinct_countIf(product type) returns the total number of unique
product types grouped by the (optional) chosen dimension, without any duplicates. The
distinct_countIf(ProdRev,CalendarDay >= ${BasePeriodStartDate} AND CalendarDay
<= ${BasePeriodEndDate} AND SourcingType <> 'Indirect') function returns the total
number of dates when products were shipped grouped by the (optional) chosen dimension, for example
region, if the condition evaluates to true.
Syntax
Arguments
dimension or measure
The argument must be a measure or a dimension. Null values are omitted from the results. Literal
values don't work. The argument must be a field.
condition
max
The max function returns the maximum value of the specified measure or date, grouped by the chosen
dimension or dimensions. For example, max(sales goal) returns the maximum sales goals grouped by
the (optional) chosen dimension.
Syntax
223
Amazon QuickSight User Guide
Functions and operators
Arguments
measure
The argument must be a measure or a date. Null values are omitted from the results. Literal values
don't work. The argument must be a field.
Maximum dates work only in the Value field well of tables and pivot tables.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
The following example returns the max sales value for each region. It is compared to the total, minimum,
and median sales values.
max({Sales})
You can also specify at what level to group the computation using one or more dimensions in the view or
in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-A
functions (p. 168). The following example calculates the max sales at the Country level, but not across
other dimensions (Region) in the visual.
max({Sales}, [Country])
224
Amazon QuickSight User Guide
Functions and operators
maxIf
Based on a conditional statement, the maxIf function returns the maximum value of
the specified measure, grouped by the chosen dimension or dimensions. For example,
maxIf(ProdRev,CalendarDay >= ${BasePeriodStartDate} AND CalendarDay <=
${BasePeriodEndDate} AND SourcingType <> 'Indirect') returns the maximum sales goals
grouped by the (optional) chosen dimension, if the condition evaluates to true.
Syntax
maxIf(measure, condition)
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
condition
median
The median aggregation returns the median value of the specified measure, grouped by the chosen
dimension or dimensions. For example, median(revenue) returns the median revenue grouped by the
(optional) chosen dimension.
Syntax
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
225
Amazon QuickSight User Guide
Functions and operators
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
The following example returns the median sales value for each region. It is compared to the total,
maximum, and minimum sales.
median({Sales})
You can also specify at what level to group the computation using one or more dimensions in the view
or in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-
A functions (p. 168). The following example calculates the median sales at the Country level, but not
across other dimensions (Region) in the visual.
median({Sales}, [Country])
226
Amazon QuickSight User Guide
Functions and operators
medianIf
Based on a conditional statement, the medianIf aggregation returns the median value
of the specified measure, grouped by the chosen dimension or dimensions. For example,
medianIf(Revenue,SaleDate >= ${BasePeriodStartDate} AND SaleDate <=
${BasePeriodEndDate}) returns the median revenue grouped by the (optional) chosen dimension, if
the condition evaluates to true.
Syntax
medianIf(measure, condition)
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
condition
min
The min function returns the minimum value of the specified measure or date, grouped by the chosen
dimension or dimensions. For example, min(return rate) returns the minimum rate of returns
grouped by the (optional) chosen dimension.
Syntax
Arguments
measure
The argument must be a measure or a date. Null values are omitted from the results. Literal values
don't work. The argument must be a field.
Minimum dates work only in the Value field well of tables and pivot tables.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
The following example returns the minimum sales value for each region. It is compared to the total, max,
and median sales.
min({Sales})
227
Amazon QuickSight User Guide
Functions and operators
You can also specify at what level to group the computation using one or more dimensions in the view or
in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-A
functions (p. 168). The following example calculates the minimum sales at the Country level, but not
across other dimensions (Region) in the visual.
min({Sales}, [Country])
minIf
Based on a conditional statement, the minIf function returns the minimum value of
the specified measure, grouped by the chosen dimension or dimensions. For example,
minIf(ProdRev,CalendarDay >= ${BasePeriodStartDate} AND CalendarDay <=
${BasePeriodEndDate} AND SourcingType <> 'Indirect') returns the minimum rate of
returns grouped by the (optional) chosen dimension, if the condition evaluates to true.
228
Amazon QuickSight User Guide
Functions and operators
Syntax
minIf(measure, condition)
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
condition
percentile
The percentile function calculates the percentile of the values in measure, grouped by the dimension
that's in the field well. There are two varieties of percentile calculation available in QuickSight:
percentileCont
The percentileCont function calculates percentile based on a continuous distribution of the numbers
in the measure. It uses the grouping and sorting that are applied in the field wells. It answers questions
like: What values are representative of this percentile? To return an exact percentile value that might not
be present in your dataset, use percentileCont. To return the nearest percentile value that is present
in your dataset, use percentileDisc instead.
Syntax
Arguments
measure
Specifies a numeric value to use to compute the percentile. The argument must be a measure or
metric. Nulls are ignored in the calculation.
percentile
The percentile value can be any numeric constant 0–100. A percentile value of 50 computes the
median value of the measure.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
229
Amazon QuickSight User Guide
Functions and operators
Returns
The result of the function is a number.
Usage notes
The percentileCont function calculates a result based on a continuous distribution of the values from
a specified measure. The result is computed by linear interpolation between the values after ordering
them based on settings in the visual. It's different from percentileDisc, which simply returns a value
from the set of values that are aggregated over. The result from percentileCont might or might not
exist in the values from the specified measure.
Examples of percentileCont
The following examples help explain how percentileCont works.
You can also specify at what level to group the computation using one or more dimensions in the view
or in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see
230
Amazon QuickSight User Guide
Functions and operators
LAC-A functions (p. 168). The following example calculates the 30th percentile based on a continuous
distribution of the numbers at the Country level, but not across other dimensions (Region) in the visual.
percentileDisc (percentile)
The percentileDisc function calculates the percentile based on the actual numbers in measure. It
uses the grouping and sorting that are applied in the field wells. The percentile function is an alias of
percentileDisc.
Use this function to answer the following question: Which actual data points are present in this
percentile? To return the nearest percentile value that is present in your dataset, use percentileDisc.
To return an exact percentile value that might not be present in your dataset, use percentileCont
instead.
Syntax
Arguments
measure
Specifies a numeric value to use to compute the percentile. The argument must be a measure or
metric. Nulls are ignored in the calculation.
percentile
The percentile value can be any numeric constant 0–100. A percentile value of 50 computes the
median value of the measure.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Returns
Usage notes
percentileDisc is an inverse distribution function that assumes a discrete distribution model. It takes
a percentile value and a sort specification and returns an element from the given set.
231
Amazon QuickSight User Guide
Functions and operators
For a given percentile value P, percentileDisc uses the sorted values in the visual and returns the
value with the smallest cumulative distribution value that is greater than or equal to P.
Examples of percentileDisc
The following example shows the median for a dimension (category) by using the percentileCont,
and percentileDisc, and median functions. The median value is the same as the percentileCont
value. percentileCont interpolates a value, which might or might not be in the data set. However,
because percentileDisc always displays the closest value that exists in the dataset, the two results
might not match. The last column in this example shows the difference between the two values. The
code for each calculated field is as follows:
The following example shows a variety of percentileDisc values for the example field. The
calculated fields n%Disc are defined as percentileDisc( {example} ,n). The values in each
column are actual numbers that come from the dataset.
You can also specify at what level to group the computation using one or more dimensions in the view
or in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see
LAC-A functions (p. 168). The following example calculates the 30th percentile based on a continuous
distribution of the numbers at the Country level, but not across other dimensions (Region) in the visual.
232
Amazon QuickSight User Guide
Functions and operators
periodToDateAvg
The periodToDateAvg function averages the set of numbers in the specified measure for a given time
granularity (for instance, a quarter) up to a point in time, relative to that period.
Syntax
periodToDateAvg(
measure,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date minimum fare amount per payment type, for the
week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
233
Amazon QuickSight User Guide
Functions and operators
periodToDateCount
The periodToDateCount function calculates the number of values in a dimension or measure,
including duplicates, for a given time granularity (for instance, a quarter) up to a point in time, relative to
that period.
Syntax
periodToDateCount(
measure,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
234
Amazon QuickSight User Guide
Functions and operators
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date minimum fare amount per payment type, for the
week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
periodToDateMax
The periodToDateMax function returns the maximum value of the specified measure for a given time
granularity (for instance, a quarter) up to a point in time, relative to that point.
Syntax
periodToDateMax(
measure,
dateTime,
period,
endDate (optional))
235
Amazon QuickSight User Guide
Functions and operators
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date minimum fare amount per payment type, for the
week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
236
Amazon QuickSight User Guide
Functions and operators
periodToDateMedian
The periodToDateMedian function returns the median value of the specified measure for a given time
granularity (for instance, a quarter) up to a point in time, relative to that period.
Syntax
periodToDateMedian(
measure,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date minimum fare amount per payment type, for the
week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
237
Amazon QuickSight User Guide
Functions and operators
periodToDateMin
The periodToDateMin function returns the minimum value of the specified measure or date, or a given
time granularity (for instance, a quarter) up to a point in time, relative to that period.
Syntax
periodToDateMin(
measure,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
238
Amazon QuickSight User Guide
Functions and operators
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date minimum fare amount per payment type, for the
week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
periodToDatePercentile
The periodToDatePercentile function calculates the percentile based on the actual numbers in
measure for a given time granularity (for instance, a quarter) up to a point in time, relative to that
period. It uses the grouping and sorting that are applied in the field wells.
To return the nearest percentile value that is present in your dataset, use periodToDatePercentile.
To return an exact percentile value that might not be present in your dataset, use
periodToDatePercentileCont instead.
Syntax
periodToDatePercentile(
239
Amazon QuickSight User Guide
Functions and operators
measure,
percentile,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
percentile
The percentile value can be any numeric constant 0-100. A percentile of 50 computes the median
value of the measure.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date, 90th percentile of fare amount per payment type for
the week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example. that is 06-27-21.
240
Amazon QuickSight User Guide
Functions and operators
periodToDatePercentileCont
The periodToDatePercentileCont function calculates percentile based on a continuous distribution
of the numbers in the measure for a given time granularity (for instance, a quarter) up to a point in time
in that period. It uses the grouping and sorting that are applied in the field wells.
To return an exact percentile value that might not be present in your dataset, use
periodToDatePercentileCont. To return the nearest percentile value that is present in your dataset,
use periodToDatePercentile instead.
Syntax
periodToDatePercentileCont(
measure,
percentile,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
241
Amazon QuickSight User Guide
Functions and operators
percentile
The percentile value can be any numeric constant 0-100. A percentile of 50 computes the median
value of the measure.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date, 90th percentile of fare amount per payment type for
the week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
242
Amazon QuickSight User Guide
Functions and operators
periodToDateStDev
The periodToDateStDev function calculates the standard deviation of the set of numbers in the
specified measure for a given time granularity (for instance, a quarter) up to a point in time, based on a
sample and relative to that period.
Syntax
periodToDateStDev(
measure,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
(Optional) The time period across which you're computing the computation. Granularity of YEAR
means YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities
include YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date minimum fare amount per payment type, for the
week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
243
Amazon QuickSight User Guide
Functions and operators
periodToDateStDevP
The periodToDateStDevP function calculates the population standard deviation of the set of numbers
in the specified measure, for a given time granularity (for instance, a quarter) up to a point in time, based
on a sample in that period.
Syntax
periodToDateStDevP(
measure,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
244
Amazon QuickSight User Guide
Functions and operators
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date minimum fare amount per payment type, for the
week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
periodToDateSum
The periodToDateSum function adds the specified measure for a given time granularity (for instance, a
quarter) up to a point in time, relative to that period.
Syntax
periodToDateSum(
measure,
dateTime,
period,
endDate)
245
Amazon QuickSight User Guide
Functions and operators
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following function calculates the week to date sum of fare amount per payment, for the week of
06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is Wednesday.
QuickSight begins the week on Sundays. In our example, that is 06-27-21.
246
Amazon QuickSight User Guide
Functions and operators
periodToDateVar
The periodToDateVar function calculates the sample variance of the set of numbers in the specified
measure for a given time granularity (for instance, a quarter) up to a point in time in that period.
Syntax
periodToDateVar(
measure,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date minimum fare amount per payment type, for the
week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
247
Amazon QuickSight User Guide
Functions and operators
periodToDateVarP
The periodToDateVarP function calculates the population variance of the set of numbers in the
specified measure for a given time granularity (for instance, a quarter) up to a point in time, relevant to
that period.
Syntax
periodToDateVarP(
measure,
dateTime,
period,
endDate (optional))
Arguments
measure
The argument must be a field. Null values are omitted from the results. Literal values don't work.
dateTime
The time period across which you're computing the computation. Granularity of YEAR means
YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities include
YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
248
Amazon QuickSight User Guide
Functions and operators
endDate
(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults
to now() if omitted.
Example
The following example calculates the week-to-date minimum fare amount per payment type, for the
week of 06-30-21. For simplicity in the example, we filtered out only a single payment. 06-30-21 is
Wednesday. QuickSight begins the week on Sundays. In our example, that is 06-27-21.
stdev
The stdev function calculates the standard deviation of the set of numbers in the specified measure,
grouped by the chosen dimension or dimensions, based on a sample.
Syntax
249
Amazon QuickSight User Guide
Functions and operators
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
The following example returns the standard deviation of test scores for a class, using a sample of the test
scores recorded.
stdev({Score})
You can also specify at what level to group the computation using one or more dimensions in the view or
in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-A
functions (p. 168). The following example calculates the standard deviation of test scores at the subject
level, but not across other dimensions (Class) in the visual.
stdev({Score}, [Subject])
stdevp
The stdevp function calculates the population standard deviation of the set of numbers in the specified
measure, grouped by the chosen dimension or dimensions.
Syntax
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
The following example returns the standard deviation of test scores for a class using all the scores
recorded.
250
Amazon QuickSight User Guide
Functions and operators
stdevp({Score})
You can also specify at what level to group the computation using one or more dimensions in the view or
in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-A
functions (p. 168). The following example calculates the standard deviation of test scores at the subject
level, but not across other dimensions (Class) in the visual using all the scores recorded.
stdevp({Score}, [Subject])
stdevIf
Based on a conditional statement, the stdevIf function calculates the standard deviation of the set of
numbers in the specified measure, grouped by the chosen dimension or dimensions, based on a sample.
Syntax
stdevIf(measure, conditions)
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
condition
stdevpIf
Based on a conditional statement, the stdevpIf function calculates the standard deviation of the set of
numbers in the specified measure, grouped by the chosen dimension or dimensions, based on a biased
population.
Syntax
stdevpIf(measure, conditions)
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
condition
sum
The sum function adds the set of numbers in the specified measure, grouped by the chosen dimension
or dimensions. For example, sum(profit amount) returns the total profit amount grouped by the
(optional) chosen dimension.
251
Amazon QuickSight User Guide
Functions and operators
Syntax
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
sum({Sales})
You can also specify at what level to group the computation using one or more dimensions in the view
or in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-
A functions (p. 168). The following example calculates the sum of sales at the Country level, but not
across other dimensions (Region and Product) in the visual.
sum(Sales, [Country])
252
Amazon QuickSight User Guide
Functions and operators
sumIf
Based on a conditional statement, the sumIf function adds the set of numbers in the specified measure,
grouped by the chosen dimension or dimensions. For example, sumIf(ProdRev,CalendarDay >=
${BasePeriodStartDate} AND CalendarDay <= ${BasePeriodEndDate} AND SourcingType
<> 'Indirect') returns the total profit amount grouped by the (optional) chosen dimension, if the
condition evaluates to true.
Syntax
sumIf(measure, conditions)
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
condition
var
The var function calculates the sample variance of the set of numbers in the specified measure, grouped
by the chosen dimension or dimensions.
Syntax
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
var({Scores})
You can also specify at what level to group the computation using one or more dimensions in the view or
in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-A
functions (p. 168). The following example returns the variance of a sample of test scores at the subject
level, but not across other dimensions (Class) in the visual.
253
Amazon QuickSight User Guide
Functions and operators
var({Scores}, [Subject]
varIf
Based on a conditional statement, the varIf function calculates the variance of the set of numbers in
the specified measure, grouped by the chosen dimension or dimensions, based on a sample.
Syntax
varIf(measure, conditions)
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
condition
varp
The varp function calculates the population variance of the set of numbers in the specified measure,
grouped by the chosen dimension or dimensions.
Syntax
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
group-by level
(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or
dimensions independent of the dimensions added to the visual.
The argument must be a dimension field. The group-by level must be enclosed in square brackets
[ ]. For more information, see LAC-A functions (p. 168).
Examples
varp({Scores})
You can also specify at what level to group the computation using one or more dimensions in the view or
in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-A
functions (p. 168). The following example returns the variance of a population test scores at the subject
level, but not across other dimensions (Class) in the visual.
254
Amazon QuickSight User Guide
Functions and operators
varp({Scores}, [Subject]
varpIf
Based on a conditional statement, the varpIf function calculates the variance of the set of numbers in
the specified measure, grouped by the chosen dimension or dimensions, based on a biased population.
Syntax
varpIf(measure, conditions)
Arguments
measure
The argument must be a measure. Null values are omitted from the results. Literal values don't work.
The argument must be a field.
condition
In this section, you can find a list of the functions available in table calculations that you can perform on
visualized data in Amazon QuickSight.
To view a list of functions sorted by category, with brief definitions, see Functions by category (p. 175).
Topics
• Difference (p. 256)
• distinctCountOver (p. 258)
• Lag (p. 259)
• Lead (p. 261)
• percentDifference (p. 263)
• avgOver (p. 265)
• countOver (p. 267)
• maxOver (p. 270)
• minOver (p. 272)
• percentileOver (p. 274)
• percentileContOver (p. 274)
• percentileDiscOver (p. 276)
• percentOfTotal (p. 278)
• periodOverPeriodDifference (p. 279)
• periodOverPeriodLastValue (p. 281)
• periodOverPeriodPercentDifference (p. 283)
255
Amazon QuickSight User Guide
Functions and operators
Difference
The difference function calculates the difference between a measure based on one set of partitions
and sorts, and a measure based on another.
The difference function is supported for use with analyses based on SPICE and direct query data sets.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
difference
(
measure
,[ sortorder_field ASC_or_DESC, ... ]
,lookup_index,
,[ partition field, ... ]
)
Arguments
measure
256
Amazon QuickSight User Guide
Functions and operators
One or more measures and dimensions that you want to sort the data by, separated by commas. You
can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
lookup index
The lookup index can be positive or negative, indicating a following row in the sort (positive) or
a previous row in the sort (negative). The lookup index can be 1–2,147,483,647. For the engines
MySQL, MariaDB and Aurora MySQL-Compatible Edition, the lookup index is limited to just 1.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the difference between of sum({Billed Amount}), sorted by
Customer Region ascending, compared to the next row, and partitioned by Service Line.
difference(
sum( {Billed Amount} ),
[{Customer Region} ASC],
1,
[{Service Line}]
)
The following example calculates the difference between Billed Amount compared to the next line,
partitioned by ([{Customer Region}]). The fields in the table calculation are in the field wells of the
visual.
difference(
sum( {Billed Amount} ),
[{Customer Region} ASC],
1
)
The red highlights show how each amount is added ( a + b = c ) to show the difference between amounts
a and c.
257
Amazon QuickSight User Guide
Functions and operators
distinctCountOver
The distinctCountOver function calculates the distinct count of the operand partitioned by the
specified attributes at a specified level. Supported levels are PRE_FILTER and PRE_AGG. The operand
must be unaggregated.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
distinctCountOver
(
measure or dimension field
,[ partition_field, ... ]
,calculation level
)
Arguments
The measure or dimension that you want to do the calculation for, for example {Sales Amt}. Valid
values are PRE_FILTER and PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
258
Amazon QuickSight User Guide
Functions and operators
This value defaults to POST_AGG_FILTER when blank. POST_AGG_FILTER is not a valid level for
this operation and will result in an error message. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example gets the distinct count of Sales partitioned over City and State at the
PRE_AGG level.
distinctCountOver
(
Sales,
[City, State], PRE_AGG
)
Lag
The lag function calculates the lag (previous) value for a measure based on specified partitions and
sorts.
lag is supported for use with analyses based on SPICE and direct query data sets.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
lag
(
measure>
,[ sortorder_field ASC_or_DESC, ... ]
,lookup_index,
,[ partition_field, ... ]
)
Arguments
measure
The measure that you want to get the lag for. This can include an aggregate, for example
sum({Sales Amt}).
sort order field
One or more measures and dimensions that you want to sort the data by, separated by commas. You
can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
lookup index
The lookup index can be positive or negative, indicating a following row in the sort (positive) or
a previous row in the sort (negative). The lookup index can be 1–2,147,483,647. For the engines
MySQL, MariaDB, and Amazon Aurora MySQL-Compatible Edition, the lookup index is limited to just
1.
259
Amazon QuickSight User Guide
Functions and operators
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the previous sum(sales), partitioned by the state of origin, in the
ascending sort order on cancellation_code.
lag
(
sum(Sales),
[cancellation_code ASC],
1,
[origin_state_nm]
)
The following example uses a calculated field with lag to display the amount for the previous row next to
the amount for the current row, sorted by Customer Segment. The fields in the table calculation are in
the field wells of the visual.
lag(
sum({Billed Amount}),
[{Customer Segment} ASC],
1
)
260
Amazon QuickSight User Guide
Functions and operators
Lead
The lead function calculates the lead (following) value for a measure based on specified partitions and
sorts.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
lead
(
measure
,[ sortorder_field ASC_or_DESC, ... ]
,lookup_index,
,[ partition_field, ... ]
)
Arguments
measure
The measure that you want to get the lead for. This can include an aggregate, for example
sum({Sales Amt}).
sort order field
One or more measures and dimensions that you want to sort the data by, separated by commas. You
can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
261
Amazon QuickSight User Guide
Functions and operators
lookup index
The lookup index can be positive or negative, indicating a following row in the sort (positive) or
a previous row in the sort (negative). The lookup index can be 1–2,147,483,647. For the engines
MySQL, MariaDB, and Amazon Aurora MySQL-Compatible Edition, the lookup index is limited to just
1.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the next sum(sales), partitioned by the state of origin, in the
ascending sort order on cancellation_code.
lead
(
sum(sales),
[cancellation_code ASC],
1,
[origin_state_nm]
)
The following example uses a calculated field with lead to display the amount for the next row beside
the amount for the current row, sorted by Customer Segment. The fields in the table calculation are in
the field wells of the visual.
lead(
sum({Billed Amount}),
[{Customer Segment} ASC],
1
)
262
Amazon QuickSight User Guide
Functions and operators
percentDifference
The percentDifference function calculates the percentage difference between the current value and
a comparison value, based on partitions, sorts, and lookup index.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
percentDifference
(
measure
,[ sortorder_field ASC_or_DESC, ... ]
,lookup index
,[ partition_field, ... ]
)
Arguments
measure
An aggregated measure that you want to see the percent difference for.
sort order field
One or more measures and dimensions that you want to sort the data by, separated by commas. You
can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
263
Amazon QuickSight User Guide
Functions and operators
lookup index
The lookup index can be positive or negative, indicating a following row in the sort (positive) or
a previous row in the sort (negative). The lookup index can be 1–2,147,483,647. For the engines
MySQL, MariaDB and Aurora MySQL-Compatible Edition, the lookup index is limited to just 1.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the percentage of difference between the sum(Sales) for the current
and the previous State, sorted by Sales.
percentDifference
(
sum(amount),
[sum(amount) ASC],
-1,
[State]
)
The following example calculates the percent that a specific Billed Amount is of another Billed
Amount, sorted by ([{Customer Region} ASC]). The fields in the table calculation are in the field
wells of the visual.
percentDifference
(
sum( {Billed Amount} ),
[{Customer Region} ASC],
1
)
The following screenshot shows the results of the example. The red letters show that the total Billed
Amount for the Customer Region APAC is 24 percent less than the amount for the EMEA region.
264
Amazon QuickSight User Guide
Functions and operators
avgOver
The avgOver function calculates the average of a measure partitioned by a list of dimensions.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
avgOver
(
measure
,[ partition_field, ... ]
,calculation level
)
The following example shows the average Billed Amount over Customer Region. The fields in the
table calculation are in the field wells of the visual.
avgOver
(
sum({Billed Amount}),
[{Customer Region}]
)
The following screenshot shows the results of the example. With the addition of Service Line, the
total amount billed for each is displayed, and the average of these three values displays in the calculated
field.
265
Amazon QuickSight User Guide
Functions and operators
Arguments
measure
The measure that you want to do the calculation for, for example sum({Sales Amt}). Use an
aggregation if the calculation level is set to NULL or POST_AGG_FILTER. Don't use an aggregation if
the calculation level is set to PRE_FILTER or PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example gets the average sum(Sales) partitioned over City and State.
266
Amazon QuickSight User Guide
Functions and operators
avgOver
(
sum(Sales),
[City, State]
)
countOver
The countOver function calculates the count of a dimension or measure partitioned by a list of
dimensions.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
countOver
(
measure or dimension field
,[ partition_field, ... ]
,calculation level
)
Arguments
The measure or dimension that you want to do the calculation for, for example sum({Sales
Amt}). Use an aggregation if the calculation level is set to NULL or POST_AGG_FILTER. Don't use an
aggregation if the calculation level is set to PRE_FILTER or PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example gets the count of Sales partitioned over City and State.
countOver
(
Sales,
[City, State]
267
Amazon QuickSight User Guide
Functions and operators
The following example gets the count of {County} partitioned over City and State.
countOver
(
{County},
[City, State]
)
The following example shows the count of Billed Amount over Customer Region. The fields in the
table calculation are in the field wells of the visual.
countOver
(
sum({Billed Amount}),
[{Customer Region}]
)
The following screenshot shows the results of the example. Because there are no other fields involved,
the count is one for each region.
If you add additional fields, the count changes. In the following screenshot, we add Customer Segment
and Service Line. Each of those fields contains three unique values. With 3 segments, 3 service lines,
and 3 regions, the calculated field shows 9.
268
Amazon QuickSight User Guide
Functions and operators
If you add the two additional fields to the partitioning fields in the calculated field,
countOver( sum({Billed Amount}), [{Customer Region}, {Customer Segment},
{Service Line}], then the count is again 1 for each row.
269
Amazon QuickSight User Guide
Functions and operators
maxOver
The maxOver function calculates the maximum of a measure or date partitioned by a list of dimensions.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
maxOver
(
measure
,[ partition_field, ... ]
,calculation level
)
Arguments
measure
The measure that you want to do the calculation for, for example sum({Sales Amt}). Use an
aggregation if the calculation level is set to NULL or POST_AGG_FILTER. Don't use an aggregation if
the calculation level is set to PRE_FILTER or PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
270
Amazon QuickSight User Guide
Functions and operators
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example calculates the maximum sum(Sales), partitioned by City and State.
maxOver
(
sum(Sales),
[City, State]
)
The following example shows the maximum Billed Amount over Customer Region. The fields in the
table calculation are in the field wells of the visual.
maxOver
(
sum({Billed Amount}),
[{Customer Region}]
)
The following screenshot shows the results of the example. With the addition of Service Line,
the total amount billed for each is displayed, and the maximum of these three values displays in the
calculated field.
271
Amazon QuickSight User Guide
Functions and operators
minOver
The minOver function calculates the minimum of a measure or date partitioned by a list of dimensions.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
minOver
(
measure
,[ partition_field, ... ]
,calculation level
)
Arguments
measure
The measure that you want to do the calculation for, for example sum({Sales Amt}). Use an
aggregation if the calculation level is set to NULL or POST_AGG_FILTER. Don't use an aggregation if
the calculation level is set to PRE_FILTER or PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
272
Amazon QuickSight User Guide
Functions and operators
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example calculates the min sum(Sales), partitioned by City and State.
minOver
(
sum(Sales),
[City, State]
)
The following example shows the minimum Billed Amount over Customer Region. The fields in the
table calculation are in the field wells of the visual.
minOver
(
sum({Billed Amount}),
[{Customer Region}]
)
The following screenshot shows the results of the example. With the addition of Service Line,
the total amount billed for each is displayed, and the minimum of these three values displays in the
calculated field.
273
Amazon QuickSight User Guide
Functions and operators
percentileOver
The percentileOver function calculates the nth percentile of a measure partitioned by a list of
dimensions. There are two varieties of the percentileOver calculation available in QuickSight:
percentileContOver
The percentileContOver function calculates the percentile based on the actual numbers in measure.
It uses the grouping and sorting that are applied in the field wells. The result is partitioned by the
specified dimension at the specified calculation level.
Use this function to answer the following question: Which actual data points are present
in this percentile? To return the nearest percentile value that is present in your dataset, use
percentileDiscOver. To return an exact percentile value that might not be present in your dataset,
use percentileContOver instead.
Syntax
percentileDiscOver (
measure
, percentile-n
, [partition-by, …]
274
Amazon QuickSight User Guide
Functions and operators
, calculation-level
)
Arguments
measure
Specifies a numeric value to use to compute the percentile. The argument must be a measure or
metric. Nulls are ignored in the calculation.
percentile-n
The percentile value can be any numeric constant 0–100. A percentile value of 50 computes the
median value of the measure.
partition-by
(Optional) One or more dimensions that you want to partition by, separated by commas. Each field
in the list is enclosed in { } (curly braces), if it is more than one word. The entire list is enclosed in [ ]
(square brackets).
calculation-level
Specifies where to perform the calculation in relation to the order of evaluation. There are three
supported calculation levels:
• PRE_FILTER
• PRE_AGG
• POST_AGG_FILTER (default) – To use this calculation level, specify an aggregation on measure, for
example sum(measure).
PRE_FILTER and PRE_AGG are applied before the aggregation occurs in a visualization. For these two
calculation levels, you can't specify an aggregation on measure in the calculated field expression.
To learn more about calculation levels and when they apply, see Order of evaluation in Amazon
QuickSight (p. 166) and Using level-aware calculations in Amazon QuickSight (p. 167).
Returns
Example of percentileContOver
The following example shows the median for a dimension (category) by using different calculation levels
with the percentileContOver function. The percentile is 50. The dataset is filtered by a region field.
The code for each calculated field is as follows:
275
Amazon QuickSight User Guide
Functions and operators
------------------------------------------------------
0 106,728 119,667 4,117,579
1 102,898 95,946 2,307,547
2 97,807 93,963 554,570
3 101,043 112,585 2,709,057
4 96,533 99,214 3,598,358
5 106,293 97,296 1,875,648
6 97,118 69,159 1,320,672
7 100,201 90,557 969,807
percentileDiscOver
The percentileDiscOver function calculates the percentile based on the actual numbers in measure.
It uses the grouping and sorting that are applied in the field wells. The result is partitioned by the
specified dimension at the specified calculation level. The percentileOver function is an alias of
percentileDiscOver.
Use this function to answer the following question: Which actual data points are present
in this percentile? To return the nearest percentile value that is present in your dataset, use
percentileDiscOver. To return an exact percentile value that might not be present in your dataset,
use percentileContOver instead.
Syntax
percentileDiscOver (
measure
, percentile-n
, [partition-by, …]
, calculation-level
)
Arguments
measure
Specifies a numeric value to use to compute the percentile. The argument must be a measure or
metric. Nulls are ignored in the calculation.
percentile-n
The percentile value can be any numeric constant 0–100. A percentile value of 50 computes the
median value of the measure.
partition-by
(Optional) One or more dimensions that you want to partition by, separated by commas. Each field
in the list is enclosed in { } (curly braces), if it is more than one word. The entire list is enclosed in [ ]
(square brackets).
calculation-level
Specifies where to perform the calculation in relation to the order of evaluation. There are three
supported calculation levels:
• PRE_FILTER
• PRE_AGG
• POST_AGG_FILTER (default) – To use this calculation level, you need to specify an aggregation on
measure, for example sum(measure).
PRE_FILTER and PRE_AGG are applied before the aggregation occurs in a visualization. For these two
calculation levels, you can't specify an aggregation on measure in the calculated field expression.
276
Amazon QuickSight User Guide
Functions and operators
To learn more about calculation levels and when they apply, see Order of evaluation in Amazon
QuickSight (p. 166) and Using level-aware calculations in Amazon QuickSight (p. 167).
Returns
The result of the function is a number.
Example of percentileDiscOver
The following example helps explain how percentileDiscOver works.
percentileDiscOver
(
Sales,
50,
[City, State]
)
The following example calculates the 98th percentile of sum({Billed Amount}) partitioned by
Customer Region. The fields in the table calculation are in the field wells of the visual.
percentileDiscOver
(
sum({Billed Amount}),
98,
[{Customer Region}]
)
The following screenshot shows the how these two examples look on a chart.
277
Amazon QuickSight User Guide
Functions and operators
percentOfTotal
The percentOfTotal function calculates the percentage a measure contributes to the total, based on
the dimensions specified.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
percentOfTotal
(
measure
,[ partition_field, ... ]
)
Arguments
measure
An aggregated measure that you want to see the percent of total for. Currently, the distinct
count aggregation is not supported for percentOfTotal.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example creates a calculation for the percent of total Sales contributed by each State.
percentOfTotal
(
sum(Sales),
[State]
)
The following example calculates the percent that a specific Billed Amount is when compared to the
total Billed Amount, partitioned by ([{Service Line} ASC]). The fields in the table calculation are
in the field wells of the visual.
percentOfTotal
278
Amazon QuickSight User Guide
Functions and operators
(
sum( {Billed Amount} ),
[{Service Line}]
)
The following screenshot shows the results of the example. The red highlights show that the partition
field with the value "Billing" has three entries, one for each region. The total billed amount for this
service line is divided into three percentages, which total 100 percent. Percentages are rounded and
might not always add up to exactly 100 percent.
periodOverPeriodDifference
The periodOverPeriodDifference function calculates the difference of a measure over two different
time periods as specified by period granularity and offset. Unlike a difference calculation, this function
uses a date-based offset instead of a fixed sized offset. This ensures that only the correct dates are
compared, even if data points are missing in the dataset.
Syntax
periodOverPeriodDifference(
measure,
date,
period,
offset)
Arguments
measure
An aggregated measure that you want to perform the periodOverPeriod calculation on.
279
Amazon QuickSight User Guide
Functions and operators
dateTime
(Optional) The time period across which you're computing the computation. Granularity of YEAR
means YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities
include YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
(Optional) The offset can be a positive or negative integer representing the prior time period
(specified by period) that you want to compare against. For instance, period of a quarter with offset
1 means comparing against the previous quarter.
Example
The following example calculates the month over month difference in sales with the visual dimension
granularity and default offset of 1.
The following example calculates the month over month difference in sales with a fixed granularity of
MONTH and fixed offset of 1.
280
Amazon QuickSight User Guide
Functions and operators
periodOverPeriodLastValue
The periodOverPeriodLastValue function calculates the last (previous) value of a measure from
the previous time period as specified by the period granularity and offset. This function uses a date-
based offset instead of a fixed sized offset. This ensures only the correct dates are compared, even if data
points are missing in the dataset.
Syntax
periodOverPeriodLastValue(
measure,
date,
period,
offset)
Arguments
measure
281
Amazon QuickSight User Guide
Functions and operators
period
(Optional) The time period across which you're computing the computation. Granularity of YEAR
means YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities
include YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
(Optional) The offset can a positive or negative integer representing the prior time period (specified
by period) that you want to compare against. For instance, period of a quarter with offset 1 means
comparing against the previous quarter.
Example
The following example calculates the month over month value in sales with the visual dimension
granularity and default offset of 1.
The following example calculates the month over month value in sales with a fixed granularity of MONTH
and fixed offset of 1.
282
Amazon QuickSight User Guide
Functions and operators
periodOverPeriodPercentDifference
The periodOverPeriodPercentDifference function calculates the percent difference of a
measure over two different time periods as specified by the period granularity and offset. Unlike
percentDifference, this function uses a date-based offset instead of a fixed sized offset. This ensures only
the correct dates are compared, even if data points are missing in the dataset.
Syntax
periodOverPeriodPercentDifference(
measure,
date,
period,
offset)
Arguments
measure
(Optional) The time period across which you're computing the computation. Granularity of YEAR
means YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities
include YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
(Optional) The offset can a positive or negative integer representing the prior time period (specified
by period) that you want to compare against. For instance, period of a quarter with offset 1 means
comparing against the previous quarter.
Example
The following example calculates the month over month percent difference in sales with the visual
dimension granularity and default offset of 1.
periodOverPeriodPercentDifference(sum(Sales),{Order Date})
The following example calculates the month over month percent difference in sales with a fixed
granularity of MONTH and fixed offset of 1.
283
Amazon QuickSight User Guide
Functions and operators
periodToDateAvgOverTime
The periodToDateAvgOverTime function calculates the average of a measure for a given time
granularity (for instance, a quarter) up to a point in time.
Syntax
periodToDateAvgOverTime(
measure,
dateTime,
period)
Arguments
measure
(Optional) The time period across which you're computing the computation. Granularity of YEAR
means YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities
include YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
284
Amazon QuickSight User Guide
Functions and operators
Example
The following function calculates the average fare amount month over mont.
periodToDateCountOverTime
The periodToDateCountOverTime function calculates the count of a dimension or measure for a
given time granularity (for instance, a quarter) up to a point in time.
Syntax
periodToDateCountOverTime(
measure,
dateTime,
period)
Arguments
measure
285
Amazon QuickSight User Guide
Functions and operators
period
(Optional) The time period across which you're computing the computation. Granularity of YEAR
means YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities
include YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
Example
The following example calculates the count of vendors month over month.
periodToDateMaxOverTime
The periodToDateMaxOverTime function calculates the maximum of a measure for a given time
granularity (for instance, a quarter) up to a point in time.
Syntax
periodToDateMaxOverTime(
measure,
dateTime,
period)
Arguments
measure
286
Amazon QuickSight User Guide
Functions and operators
dateTime
(Optional) The time period across which you're computing the computation. Granularity of YEAR
means YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities
include YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
Example
The following example calculates the maximum fare amount month over month.
periodToDateMinOverTime
The periodToDateMinOverTime function calculates the minimum of a measure for a given time
granularity (for instance, a quarter) up to a point in time.
Syntax
periodToDateMinOverTime(
measure,
dateTime,
period)
287
Amazon QuickSight User Guide
Functions and operators
Arguments
measure
(Optional) The time period across which you're computing the computation. Granularity of YEAR
means YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities
include YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
Example
The following example calculates the minimum fare amount month over month.
periodToDateSumOverTime
The periodToDateSumOverTime function calculates the sum of a measure for a given time granularity
(for instance, a quarter) up to a point in time.
Syntax
periodToDateSumOverTime(
measure,
dateTime,
288
Amazon QuickSight User Guide
Functions and operators
period)
Arguments
measure
(Optional) The time period across which you're computing the computation. Granularity of YEAR
means YearToDate computation, Quarter means QuarterToDate, and so on. Valid granularities
include YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, and SECONDS.
Example
The following function returns the total fare amount month over month.
stdevOver
The stdevOver function calculates the standard deviation of the specified measure, partitioned by the
chosen attribute or attributes, based on a sample.
289
Amazon QuickSight User Guide
Functions and operators
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
stdevOver
(
measure
,[ partition_field, ... ]
,calculation level
)
Arguments
measure
The measure that you want to do the calculation for, for example sum({Sales Amt}). Use an
aggregation if the calculation level is set to NULL or POST_AGG_FILTER. Don't use an aggregation if
the calculation level is set to PRE_FILTER or PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example calculates the standard deviation of sum(Sales), partitioned by City and
State, based on a sample..
stdevOver
(
sum(Sales),
[City, State]
)
The following example calculates the standard deviation of Billed Amount over Customer Region,
based on a sample. The fields in the table calculation are in the field wells of the visual.
stdevOver
(
sum({Billed Amount}),
[{Customer Region}]
)
290
Amazon QuickSight User Guide
Functions and operators
stdevpOver
The stdevpOver function calculates the standard deviation of the specified measure, partitioned by the
chosen attribute or attributes, based on a biased population.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
stdevpOver
(
measure
,[ partition_field, ... ]
,calculation level
)
Arguments
measure
The measure that you want to do the calculation for, for example sum({Sales Amt}). Use an
aggregation if the calculation level is set to NULL or POST_AGG_FILTER. Don't use an aggregation if
the calculation level is set to PRE_FILTER or PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example calculates the standard deviation of sum(Sales), partitioned by City and
State, based on a biased population.
stdevpOver
(
sum(Sales),
[City, State]
)
The following example calculates the standard deviation of Billed Amount over Customer Region,
based on a biased population. The fields in the table calculation are in the field wells of the visual.
stdevpOver
291
Amazon QuickSight User Guide
Functions and operators
(
sum({Billed Amount}),
[{Customer Region}]
)
varOver
The varOver function calculates the variance of the specified measure, partitioned by the chosen
attribute or attributes, based on a sample.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
varOver
(
measure
,[ partition_field, ... ]
,calculation level
)
Arguments
measure
The measure that you want to do the calculation for, for example sum({Sales Amt}). Use an
aggregation if the calculation level is set to NULL or POST_AGG_FILTER. Don't use an aggregation if
the calculation level is set to PRE_FILTER or PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example calculates the variance of sum(Sales), partitioned by City and State, based
on a sample.
varOver
(
sum(Sales),
[City, State]
)
292
Amazon QuickSight User Guide
Functions and operators
The following example calculates the variance of Billed Amount over Customer Region, based on a
sample. The fields in the table calculation are in the field wells of the visual.
varOver
(
sum({Billed Amount}),
[{Customer Region}]
)
varpOver
The varpOver function calculates the variance of the specified measure, partitioned by the chosen
attribute or attributes, based on a biased population.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
varpOver
(
measure
,[ partition_field, ... ]
,calculation level
)
Arguments
measure
The measure that you want to do the calculation for, for example sum({Sales Amt}). Use an
aggregation if the calculation level is set to NULL or POST_AGG_FILTER. Don't use an aggregation if
the calculation level is set to PRE_FILTER or PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example calculates the variance of sum(Sales), partitioned by City and State, based
on a biased population.
varpOver
293
Amazon QuickSight User Guide
Functions and operators
(
sum(Sales),
[City, State]
)
The following example calculates the variance of Billed Amount over Customer Region, based on a
biased population. The fields in the table calculation are in the field wells of the visual.
varpOver
(
sum({Billed Amount}),
[{Customer Region}]
)
sumOver
The sumOver function calculates the sum of a measure partitioned by a list of dimensions.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
sumOver
(
measure
,[ partition_field, ... ]
,calculation level
)
Arguments
measure
The measure that you want to do the calculation for, for example sum({Sales Amt}). Use an
aggregation if the calculation level is set to NULL or POST_AGG_FILTER. Don't use an aggregation if
the calculation level is set to PRE_FILTER or PRE_AGG.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example calculates the sum of sum(Sales), partitioned by City and State.
294
Amazon QuickSight User Guide
Functions and operators
sumOver
(
sum(Sales),
[City, State]
)
The following example sums Billed Amount over Customer Region. The fields in the table
calculation are in the field wells of the visual.
sumOver
(
sum({Billed Amount}),
[{Customer Region}]
)
The following screenshot shows the results of the example. With the addition of Customer Segment,
the total amount billed for each is summed for the Customer Region, and displays in the calculated
field.
denseRank
The denseRank function calculates the rank of a measure or a dimension in comparison to the specified
partitions. It counts each item only once, ignoring duplicates, and assigns a rank "without holes" so that
duplicate values share the same rank.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
denseRank
295
Amazon QuickSight User Guide
Functions and operators
(
[ sort_order_field ASC_or_DESC, ... ]
,[ partition_field, ... ]
)
Arguments
One or more aggregated fields, either measures or dimensions or both, that you want to sort the
data by, separated by commas. You can either specify ascending (ASC) or descending (DESC) sort
order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example densely ranks max(Sales), based on a descending sort order, by State and
City. Any cities with the same max(Sales) are assigned the same rank, and the next city is ranked
consecutively after them. For example, if three cities share the same ranking, the fourth city is ranked as
second.
denseRank
(
[max(Sales) DESC],
[State, City]
)
The following example densely ranks max(Sales), based on a descending sort order, by State. Any
states with the same max(Sales) are assigned the same rank, and the next is ranked consecutively after
them. For example, if three states share the same ranking, the fourth state is ranked as second.
denseRank
(
[max(Sales) DESC],
[State]
)
296
Amazon QuickSight User Guide
Functions and operators
Rank
The rank function calculates the rank of a measure or a dimension in comparison to the specified
partitions. It counts each item, even duplicates, once and assigns a rank "with holes" to make up for
duplicate values.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
rank
(
[ sort_order_field ASC_or_DESC, ... ]
,[ partition_field, ... ]
)
Arguments
One or more aggregated measures and dimensions that you want to sort the data by, separated by
commas. You can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example ranks max(Sales), based on a descending sort order, by State and City,
within the State of WA. Any cities with the same max(Sales) are assigned the same rank, but the
next rank includes the count of all previously existing ranks. For example, if three cities share the same
ranking, the fourth city is ranked as fourth.
rank
(
[max(Sales) DESC],
[State, City]
)
297
Amazon QuickSight User Guide
Functions and operators
The following example ranks max(Sales), based on an ascending sort order, by State. Any states with
the same max(Sales) are assigned the same rank, but the next rank includes the count of all previously
existing ranks. For example, if three states share the same ranking, the fourth state is ranked as fourth.
rank
(
[max(Sales) ASC],
[State]
)
The following example ranks Customer Region by total Billed Amount. The fields in the table
calculation are in the field wells of the visual.
rank(
[sum({Billed Amount}) DESC]
)
The following screenshot shows the results of the example, along with the total Billed Amount so you
can see how each region ranks.
percentileRank
The percentileRank function calculates the percentile rank of a measure or a dimension in
comparison to the specified partitions. The percentile rank value(x) indicates that the current item is
above x% of values in the specified partition. The percentile rank value ranges from 0 (inclusive) to 100
(exclusive).
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
percentileRank
298
Amazon QuickSight User Guide
Functions and operators
(
[ sort_order_field ASC_or_DESC, ... ]
,[ {partition_field}, ... ]
)
Arguments
One or more aggregated measures and dimensions that you want to sort the data by, separated by
commas. You can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
calculation level
This value defaults to POST_AGG_FILTER when blank. For more information, see Using level-aware
calculations in Amazon QuickSight (p. 167).
Example
The following example does a percentile ranking of max(Sales) in descending order, by State.
percentileRank
(
[max(Sales) DESC],
[State]
)
The following example does a percentile ranking of Customer Region by total Billed Amount. The
fields in the table calculation are in the field wells of the visual.
percentileRank(
[sum({Billed Amount}) DESC],
[{Customer Region}]
)
The following screenshot shows the results of the example, along with the total Billed Amount so you
can see how each region compares.
299
Amazon QuickSight User Guide
Functions and operators
runningAvg
The runningAvg function calculates a running average for a measure based on the specified dimensions
and sort orders.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
runningAvg
(
measure
,[ sortorder_field ASC_or_DESC, ... ]
,[ partition_field, ... ]
)
Arguments
measure
An aggregated measure that you want to see the running average for.
sort order field
One or more measures and dimensions that you want to sort the data by, separated by commas. You
can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
300
Amazon QuickSight User Guide
Functions and operators
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates a running average of sum(Sales), sorted by Sales, partitioned by
City and State.
runningAvg
(
sum(Sales),
[Sales ASC],
[City, State]
)
The following example calculates a running average of Billed Amount, sorted by month
([truncDate("MM",Date) ASC]). The fields in the table calculation are in the field wells of the visual.
runningAvg
(
sum({Billed Amount}),
[truncDate("MM",Date) ASC]
)
runningCount
The runningCount function calculates a running count for a measure or dimension, based on the
specified dimensions and sort orders.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
runningCount
(
measure_or_dimension
,[ sortorder_field ASC_or_DESC, ... ]
,[ partition_field, ... ]
)
Arguments
measure or dimension
An aggregated measure or dimension that you want to see the running count for.
sort order field
One or more measures and dimensions that you want to sort the data by, separated by commas. You
can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
301
Amazon QuickSight User Guide
Functions and operators
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates a running count of sum(Sales), sorted by Sales, partitioned by City
and State.
runningCount
(
sum(Sales),
[Sales ASC],
[City, State]
)
The following example calculates a running count of Billed Amount, sorted by month
([truncDate("MM",Date) ASC]). The fields in the table calculation are in the field wells of the visual.
runningCount
(
sum({Billed Amount}),
[truncDate("MM",Date) ASC]
)
runningMax
The runningMax function calculates a running maximum for a measure based on the specified
dimensions and sort orders.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
runningMax
(
measure
,[ sortorder_field ASC_or_DESC, ... ]
,[ partition_field, ... ]
)
Arguments
measure
An aggregated measure that you want to see the running maximum for.
sort order field
One or more measures and dimensions that you want to sort the data by, separated by commas. You
can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
302
Amazon QuickSight User Guide
Functions and operators
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates a running maximum of sum(Sales), sorted by Sales, partitioned by
City and State.
runningMax
(
sum(Sales),
[Sales ASC],
[City, State]
)
The following example calculates a running maximum of Billed Amount, sorted by month
([truncDate("MM",Date) ASC]). The fields in the table calculation are in the field wells of the visual.
runningMax
(
sum({Billed Amount}),
[truncDate("MM",Date) ASC]
)
runningMin
The runningMin function calculates a running minimum for a measure based on the specified
dimensions and sort orders.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
runningMin
(
measure
,[ sortorder_field ASC_or_DESC, ... ]
,[ partition_field, ... ]
)
Arguments
measure
An aggregated measure that you want to see the running minimum for.
sort order field
One or more measures and dimensions that you want to sort the data by, separated by commas. You
can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
303
Amazon QuickSight User Guide
Functions and operators
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates a running minimum of sum(Sales), sorted by Sales, partitioned by
City and State.
runningMin
(
sum(Sales),
[Sales ASC],
[City, State]
)
The following example calculates a running minimum of Billed Amount, sorted by month
([truncDate("MM",Date) ASC]). The fields in the table calculation are in the field wells of the visual.
runningMin
(
sum({Billed Amount}),
[truncDate("MM",Date) ASC]
)
runningSum
The runningSum function calculates a running sum for a measure based on the specified dimensions
and sort orders.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
runningSum
(
measure
,[ sortorder_field ASC_or_DESC, ... ]
,[ partition_field, ... ]
)
Arguments
measure
An aggregated measure that you want to see the running sum for.
sort order field
One or more measures and dimensions that you want to sort the data by, separated by commas. You
can specify either ascending (ASC) or descending (DESC) sort order.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
304
Amazon QuickSight User Guide
Functions and operators
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates a running sum of sum(Sales), sorted by Sales, partitioned by City
and State.
runningSum
(
sum(Sales),
[Sales ASC],
[City, State]
)
The following example calculates a running sum of Billed Amount, sorted by month
([truncDate("MM",Date) ASC]). The fields in the table calculation are in the field wells of the visual.
runningSum
(
sum({Billed Amount}),
[truncDate("MM",Date) ASC]
)
The following screenshot shows the results of the example. The red labels show how each amount is
added ( a + b = c ) to the next amount, resulting in a new total.
firstValue
The firstValue function calculates the first value of the aggregated measure or dimension partitioned
and sorted by specified attributes.
305
Amazon QuickSight User Guide
Functions and operators
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
firstValue
(
aggregated measure or dimension,
[ sort_attribute ASC_or_DESC, ... ],
[ partition_by_attribute, ... ]
)
Arguments
An aggregated measure or dimension that you want to see the first value for.
sort attribute
One or more aggregated fields, either measures or dimensions or both, that you want to sort the
data by, separated by commas. You can either specify ascending (ASC) or descending (DESC) sort
order.
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
partition by attribute
(Optional) One or more measure or dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the first Destination Airport, sorted by Flight Date,
partitioned by Flight Date ascending and Origin Airport.
firstValue(
[{Destination Airport}],
[{Flight Date} ASC],
[
{Origin Airport},
{Flight Date}
]
)
lastValue
The lastValue function calculates the last value of the aggregated measure or dimension partitioned
and sorted by specified attributes.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
lastValue
(
306
Amazon QuickSight User Guide
Functions and operators
Arguments
An aggregated measure or dimension that you want to see the last value for.
sort attribute
One or more aggregated fields, either measures or dimensions or both, that you want to sort the
data by, separated by commas. You can either specify ascending (ASC) or descending (DESC) sort
order.
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
partition by attribute
(Optional) One or more measures or dimensions that you want to partition by, separated by
commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the last value for Destination Airport. This calculation is sorted
by the Flight Date value and partitioned by the Flight Date value sorted in ascending order and
the Origin Airport value.
lastValue(
[{Destination Airport}],
[{Flight Date} ASC],
[
{Origin Airport},
truncDate('DAY', {Flight Date})
]
)
windowAvg
The windowAvg function calculates the average of the aggregated measure in a custom window that
is partitioned and sorted by specified attributes. Usually, you use custom window functions on a time
series, where your visual shows a metric and a date field. For example, you can use windowAvg to
calculate a moving average, which is often used to smooth out the noise in a line chart.
Window functions aren't supported for MySQL versions earlier than 8 and MariaDB versions earlier than
10.2.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
windowAvg
307
Amazon QuickSight User Guide
Functions and operators
(
measure
, [sort_order_field ASC/DESC, ...]
, start_index
, end_index
,[ partition_field, ... ]
)
Arguments
measure
The aggregated metric that you want to get the average for, for example sum({Revenue}).
sort attribute
One or more aggregated fields, either measures or dimensions or both, that you want to sort the
data by, separated by commas. You can either specify ascending (ASC) or descending (DESC) sort
order.
Each field in the list is enclosed in { } (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
start index
The start index is a positive integer, indicating n rows above the current row. The start index counts
the available data points above the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
end index
The end index is a positive integer, indicating n rows below the current row. The end index counts
the available data points below the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the moving average of sum(Revenue), partitioned by SaleDate. The
calculation includes three rows above and two row below of the current row.
windowAvg
(
sum(Revenue),
[SaleDate ASC],
3,
2
)
The following screenshot shows the results of this moving average example. The sum(Revenue) field is
added to the chart to show the difference between the revenue and the moving average of revenue.
308
Amazon QuickSight User Guide
Functions and operators
windowCount
The windowCount function calculates the count of the aggregated measure or dimension in a custom
window that is partitioned and sorted by specified attributes. Usually, you use custom window functions
on a time series, where your visual shows a metric and a date field.
Window functions aren't supported for MySQL versions earlier than 8 and MariaDB versions earlier than
10.2.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
windowCount
(
measure_or_dimension
, [sort_order_field ASC/DESC, ...]
, start_index
, end_index
,[ partition_field, ... ]
)
Arguments
measure or dimension
The aggregated metric that you want to get the average for, for example sum({Revenue}).
sort attribute
One or more aggregated fields, either measures or dimensions or both, that you want to sort the
data by, separated by commas. You can either specify ascending (ASC) or descending (DESC) sort
order.
309
Amazon QuickSight User Guide
Functions and operators
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
start index
The start index is a positive integer, indicating n rows above the current row. The start index counts
the available data points above the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
end index
The end index is a positive integer, indicating n rows below the current row. The end index counts
the available data points below the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the moving count of sum(Revenue), partitioned by SaleDate. The
calculation includes three rows above and two row below of the current row.
windowCount
(
sum(Revenue),
[SaleDate ASC],
3,
2
)
windowMax
The windowMax function calculates the maximum of the aggregated measure in a custom window that
is partitioned and sorted by specified attributes. Usually, you use custom window functions on a time
series, where your visual shows a metric and a date field. You can use windowMax to help you identify
the maximum of the metric over a period time.
Window functions aren't supported for MySQL versions earlier than 8 and MariaDB versions earlier than
10.2.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
windowMax
(
measure
, [sort_order_field ASC/DESC, ...]
, start_index
, end_index
,[ partition_field, ... ]
)
Arguments
measure
The aggregated metric that you want to get the average for, for example sum({Revenue}).
310
Amazon QuickSight User Guide
Functions and operators
sort attribute
One or more aggregated fields, either measures or dimensions or both, that you want to sort the
data by, separated by commas. You can either specify ascending (ASC) or descending (DESC) sort
order.
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
start index
The start index is a positive integer, indicating n rows above the current row. The start index counts
the available data points above the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
end index
The end index is a positive integer, indicating n rows below the current row. The end index counts
the available data points below the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it is more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the trailing 12-month maximum of sum(Revenue), partitioned by
SaleDate. The calculation includes 12 rows above and 0 row below of the current row.
windowMax
(
sum(Revenue),
[SaleDate ASC],
12,
0
)
The following screenshot shows the results of this trailing 12-month example. The sum(Revenue) field
is added to the chart to show the difference between the revenue and the trailing 12-month maximum
revenue.
311
Amazon QuickSight User Guide
Functions and operators
windowMin
The windowMin function calculates the minimum of the aggregated measure in a custom window that
is partitioned and sorted by specified attributes. Usually, you use custom window functions on a time
series, where your visual shows a metric and a date field. You can use windowMin to help you identify
the minimum of the metric over a period time.
Window functions aren't supported for MySQL versions earlier than 8 and MariaDB versions earlier than
10.2.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
windowMin
(
measure
, [sort_order_field ASC/DESC, ...]
, start_index
, end_index
,[ partition_field, ... ]
)
Arguments
measure
The aggregated metric that you want to get the average for, for example sum({Revenue}).
sort attribute
One or more aggregated fields, either measures or dimensions or both, that you want to sort the
data by, separated by commas. You can either specify ascending (ASC) or descending (DESC) sort
order.
312
Amazon QuickSight User Guide
Functions and operators
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
start index
The start index is a positive integer, indicating n rows above the current row. The start index counts
the available data points above the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
end index
The end index is a positive integer, indicating n rows below the current row. The end index counts
the available data points below the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the trailing 12-month minimum of sum(Revenue), partitioned by
SaleDate. The calculation includes 12 rows above and 0 row below of the current row.
windowMin
(
sum(Revenue),
[SaleDate ASC],
12,
0
)
The following screenshot shows the results of this trailing 12-month example. The sum(Revenue) field
is added to the chart to show the difference between the revenue and the trailing 12-month minimum
revenue.
313
Amazon QuickSight User Guide
Functions and operators
windowSum
The windowSum function calculates the sum of the aggregated measure in a custom window that is
partitioned and sorted by specified attributes. Usually, you use custom window functions on a time
series, where your visual shows a metric and a date field.
Window functions aren't supported for MySQL versions earlier than 8 and MariaDB versions earlier than
10.2.
Syntax
The brackets are required. To see which arguments are optional, see the following descriptions.
windowSum
(
measure
, [sort_order_field ASC/DESC, ...]
, start_index
, end_index
,[ partition_field, ... ]
)
Arguments
measure
The aggregated metric that you want to get the sum for, for example sum({Revenue}).
For the engines MySQL, MariaDB, and Amazon Aurora with MySQL compatibility, the lookup index
is limited to just 1. Window functions aren't supported for MySQL versions below 8 and MariaDB
versions earlier than 10.2.
314
Amazon QuickSight User Guide
Functions and operators
sort attribute
One or more aggregated fields, either measures or dimensions or both, that you want to sort the
data by, separated by commas. You can either specify ascending (ASC) or descending (DESC) sort
order.
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
start index
The start index is a positive integer, indicating n rows above the current row. The start index counts
the available data points above the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
end index
The end index is a positive integer, indicating n rows below the current row. The end index counts
the available data points below the current row, rather than counting actual time periods. If your
data is sparse (missing months or years, for example), adjust the indexes accordingly.
partition field
(Optional) One or more dimensions that you want to partition by, separated by commas.
Each field in the list is enclosed in {} (curly braces), if it's more than one word. The entire list is
enclosed in [ ] (square brackets).
Example
The following example calculates the moving sum of sum(Revenue), sorted by SaleDate. The
calculation includes two rows above and one row ahead of the current row.
windowSum
(
sum(Revenue),
[SaleDate ASC],
2,
1
)
windowSum(sum(Revenue),[SaleDate ASC],12,0)
The following screenshot shows the results of this trailing 12-month sum example. The sum(Revenue)
field is added to the chart to show the difference between the revenue and the trailing 12-month sum of
revenue.
315
Amazon QuickSight User Guide
Previewing tables in a dataset
You can only preview tables that you have access to in a dataset. If a table doesn't appear in the top half
of the data preparation space, you can't preview the table.
The Dataset tab contains all transformations, like new columns or filters. Table preview tabs don't show
any of your transforms.
316
Amazon QuickSight User Guide
Joining data
Joining data
You can use the join interface in Amazon QuickSight to join objects from one or more data sources. By
using Amazon QuickSight to join the data, you can merge disparate data without duplicating the data
from different sources.
There are two different types of joined datasets in QuickSight: same-source and cross-source. A dataset
is considered same-source when it doesn't have any joins, or when all of the following conditions are
met:
If the above conditions aren't met, the dataset is considered a cross-source join.
317
Amazon QuickSight User Guide
Creating a join
With cross-source datasets QuickSight automatically detects the largest logical table in the dataset, and
the total size of the other logical tables must sum up to less than 1 GB. The logical size of these tables is
recomputed each time your dataset is refreshed into SPICE.
Note that the logical size as computed during a join is separate from the size logic used by SPICE. A
SPICE dataset with a size of 1.5 GB could have a logical size of 1 GB.
Additionally, because cross-source datasets must use SPICE, they must adhere to the quotas and limits
for SPICE. For more information, see SPICE quotas for imported data (p. 68).
For some examples of joining tables across data sources, see the Joining across data sources on Amazon
QuickSight post on the AWS Big Data Blog.
Creating a join
Use the following procedure to join tables to use in a dataset. Before you begin, import or connect to
your data. You can create a join between any of the data sources supported by Amazon QuickSight,
except Internet of Things (IoT) data. For example, you can add comma-separated value (.csv) files, tables,
views, SQL queries, or JSON objects in an Amazon S3 bucket.
Choose SPICE to store your dataset in SPICE (p. 132), or choose Direct query to pull live data every
time. If your dataset contains one ore more manually uploaded file, your dataset is automatically
stored in SPICE.
If you choose SPICE, the data is ingested into QuickSight. Visuals that use the dataset run queries in
SPICE, instead of on the database.
318
Amazon QuickSight User Guide
Creating a join
If you choose Direct query, the data isn't ingested into SPICE. Visuals that use the dataset run
queries on the database, instead of in SPICE.
If you choose Query mode, make sure to set unique keys in the join, if applicable, to improve
performance when loading visuals.
4. On the data preparation page, choose Add data.
5. In the Add data page that opens, choose one of the following options and complete the steps
following:
An icon with red dots appears to indicate that you need to configure this join. Two red dots appear
for joins that aren't yet configured. To create joins, choose the first join configuration icon.
8. (Optional) To change an existing join, reopen Join configuration by choosing the join icon between
two tables.
The Join Configuration pane opens. On the join interface, specify the join type and the fields to use
to join the tables.
9. At the bottom of the screen, you can see options to set a field in one table equal to a field in another
table.
319
Amazon QuickSight User Guide
Creating a join
• In the Join clauses section, choose the join column for each table.
(Optional) If the tables that you selected join on multiple columns, choose Add a new join
clause. Doing this adds another row to the join clauses, so you can specify the next set of
columns to join. Repeat this process until you have identified all of the join columns for the two
data objects.
320
Amazon QuickSight User Guide
Creating a join
10. In the Join configuration pane, choose the kind of join to apply. If the join fields are a unique key for
one or both tables, enable the unique key setting. Unique keys only apply to direct queries, not to
SPICE data.
For more information about joins, see Join types (p. 322).
13. (Optional) In the Fields section, you can use each field's menu to do one or more of the following:
321
Amazon QuickSight User Guide
Join types
Join types
Amazon QuickSight supports the following join types:
• Inner joins
• Left and right outer joins
• Full outer joins
Let's take a closer look at what these join types do with your data. For our example data, we're using the
following tables named widget and safety rating.
rating_id safety_rating
1 A+
2 A
3 A-
4 B+
5 B
Inner joins
Use an inner join
( )
when you want to see only the data where there is a match between two tables. For example, suppose
that you perform an inner join on the safety-rating and widget tables.
In the following result set, widgets without safety ratings are removed, and safety ratings without
associated widgets are removed. Only the rows that match perfectly are included.
322
Amazon QuickSight User Guide
Join types
1 A+ 2 WidgetB 1
1 A+ 3 WidgetC 1
2 A 4 WidgetD 2
5 B 6 WidgetF 5
( )
or right
( )
outer join when you want to see all the data from one table, and only the matching rows from the other
table.
In a graphical interface, you can see which table is on the right or the left. In a SQL statement, the first
table is considered to be on the left. Therefore, choosing a left outer join as opposed to a right outer join
depends only on how the tables are laid out in your query tool.
( )
on safety-rating (the left table) and widgets (the right table). In this case, all safety-rating rows
are returned, and only matching widget rows are returned. You can see blanks in the result set where
there is no matching data.
( ),
call the tables in the same order so safety-rating is on the left and widgets is on the right. In this
case, only matching safety-rating rows are returned, and all widget rows are returned. You can see
blanks in the result set where there is no matching data.
323
Amazon QuickSight User Guide
Filtering data
( )
to see data that matches, plus data from both tables that doesn't match. This type of join includes all
rows from both tables. For example, if you perform a full outer join on the safety-rating and widget
tables, all rows are returned. The rows are aligned where they matched, and all extra data is included on
separate rows. You can see blanks in the result set where there is no matching data.
When you create a filter in a dataset, that filter applies to the entire dataset. Any analyses and
subsequent dashboards created from that dataset contains the filter. If someone creates a dataset from
your dataset, the filter also is in the new dataset.
When you create a filter in an analysis, that filter only applies to that analysis and any dashboards you
publish from it. If someone duplicates your analysis, the filter persists in the new analysis. In analyses,
you can scope filters to a single visual, some visuals, all visuals that use this dataset, or all applicable
visuals.
Also, when you create filters in an analysis, you can add a filter control to your dashboard. For more
information about filter controls, see Adding filter controls to analysis sheets (p. 341).
Each filter you create applies only to a single field. You can apply filters to both regular and calculated
fields.
There are several types of filters you can add to datasets and analyses. For more information about the
types of filters you can add, and some of their options, see Filter types in Amazon QuickSight (p. 331).
If you create multiple filters, all top-level filters apply together using AND. If you group filters by adding
them inside a top-level filter, the filters in the group apply using OR.
Amazon QuickSight applies all of the enabled filters to the field. For example, suppose that there is one
filter of state = WA and another filter of sales >= 500. Then the dataset or analysis only contains
records that meet both of those criteria. If you disable one of these, only one filter applies.
Take care that multiple filters applied to the same field aren't mutually exclusive.
324
Amazon QuickSight User Guide
Viewing existing filters
Use the following sections to learn how to view, add, edit, and delete filters.
Topics
• Viewing existing filters (p. 325)
• Adding filters (p. 328)
• Filter types in Amazon QuickSight (p. 331)
• Adding filter controls to analysis sheets (p. 341)
• Editing filters (p. 348)
• Enabling or disabling filters (p. 351)
• Deleting filters (p. 354)
2. Choose the dataset that you want, and then choose Edit dataset.
3. On the data preparation page that opens, choose Filters at lower left to expand the Filters section.
Any filters that are applied to the dataset appear here. If a single field has multiple filters, they are
grouped together. They display in order of create date, with the oldest filter on top.
325
Amazon QuickSight User Guide
Viewing existing filters
326
Amazon QuickSight User Guide
Viewing existing filters
2. On the Analyses page, choose the analysis that you want to work with.
3. In the analysis, choose Filter at left.
327
Amazon QuickSight User Guide
Adding filters
You can see how a filter is scoped in an analysis. To do so, choose the filter in the pane and view the
Applied to section at the top of the pane. For more information about scoping filters, see Adding
filters (p. 328).
Adding filters
You can add filters to a dataset or an analysis. Use the following procedures to learn how.
2. Choose the dataset that you want, and then choose Edit dataset.
3. On the data preparation page that opens, choose Add filter at lower left, and then choose a field
that you want to filter.
328
Amazon QuickSight User Guide
Adding filters
Depending on the data type of the field, your options for configuring the filter vary. For more
information about the types of filters that you can create and their configurations, see Filter types in
Amazon QuickSight (p. 331).
5. When finished, choose Apply.
Note
The data preview shows you the results of your combined filters only as they apply to the
first 1,000 rows. If all of the first 1,000 rows are filtered out, then no rows show in the
preview. This effect occurs even when rows after the first 1,000 aren't filtered out.
329
Amazon QuickSight User Guide
Adding filters
2. On the Analyses page, choose the analysis that you want to work with.
3. In the analysis, choose Filter at left, choose Add filter, and then choose a field that you want to
filter.
4. Choose the new filter in the pane to configure it. Or you can choose the three dots to the right of
the new filter and choose Edit.
5. In the Edit filter pane that opens, for Applied to, choose one of the following options.
• Only this visual – The filter applies to the selected item only.
• Some visuals – The filter applies to visuals with valid column mappings.
330
Amazon QuickSight User Guide
Filter types
• All visuals of this dataset – The filter applies to all the items based on this dataset.
• All applicable visuals – The filter applies to any visuals that have valid column mappings.
Depending on the data type of the field, your remaining options for configuring the filter vary. For
more information about the types of filters you can create and their configurations, see Filter types
in Amazon QuickSight (p. 331).
• Text filters
• Numeric filters
• Date filters
In analyses, you can create the same types of filters as you can in datasets. You can also create:
Use the following sections to learn more about each type of filter you can create and some of their
options.
Topics
• Adding text filters (p. 332)
• Adding numeric filters (p. 335)
331
Amazon QuickSight User Guide
Filter types
• Filter list (Analyses only) – This option creates a filter that you can use to select one or more field
values to include or exclude from all the available values in the field. For more information about
creating this type of text filter, see Filtering text field values by a list (analyses only) (p. 332).
• Custom filter list – With this option, you can enter one or more field values to filter on, and
whether you want to include or exclude records that contain those values. The values that you
enter must match the actual field values exactly for the filter to be applied to a given record. For
more information about creating this type of text filter, see Filtering text field values by a custom
list (p. 333).
• Custom filter – With this option, you enter a single value that the field value must match in some way.
You can specify that the field value must equal, not equal, starts with, ends with, contains, or does not
contain the value you specify. If you choose an equal comparison, the specified value and actual field
value must match exactly in order for the filter to be applied to a given record. For more information
about creating this type of text filter, see Filtering a single text field value (p. 333).
• Top and bottom filter (Analyses only) – You can use this option to show the top or bottom n value of
one field ranked by the values in another field. For example, you might show the top five salespeople
based on revenue. You can also use a parameter to allow dashboard users to dynamically choose how
many top or bottom ranking values to show. For more information about creating top and bottom
filters, see Filtering a text field by a top or bottom value (analyses only) (p. 334).
1. Create a new filter using a text field. For more information about creating filters, see Adding
filters (p. 328).
2. In the Filters pane, choose the new filter to expand it.
3. For Filter type, choose Filter list.
4. For Filter condition, choose Include or Exclude.
5. Choose the field values that you want to filter on. To do this, select the check box in front of each
value.
If there are too many values to choose from, enter a search term into the box above the checklist
and choose Search. Search terms are case-insensitive and wildcards aren't supported. Any field value
that contains the search term is returned. For example, searching on L returns al, AL, la, and LA.
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 that you search for the value that you
want to use, it starts a new query. If the results contain more than 1,000 values, you can scroll
through the values with pagination.
6. When finished, choose Apply.
332
Amazon QuickSight User Guide
Filter types
1. Create a new filter using a text field. For more information about creating filters, see Adding
filters (p. 328).
2. In the Filters pane, choose the new filter to expand it.
3. For Filter type, choose Custom filter list.
4. For Filter condition, choose Include or Exclude.
5. For List, enter a value in the text box. The value must match an existing field value exactly.
6. (Optional) To add additional values, enter them in the text box, one per line.
7. For Null options choose Exclude nulls, Include nulls, or Nulls only.
8. When finished, choose Apply.
1. Create a new filter using a text field. For more information about creating filters, see Adding
filters (p. 328).
2. In the Filters pane, choose the new filter to expand it.
3. For Filter type, choose Custom filter.
4. For Filter condition, choose one of the following:
• Equals – When you choose this option, the values included or excluded in the field must match the
value that you enter exactly.
• Does not equal – When you choose this option, the values included or excluded in the field must
match the value that you enter exactly.
• Starts with – When you choose this option, the values included or excluded in the field must start
with the value that you enter.
• Ends with – When you choose this option, the values included or excluded in the field must start
with the value that you enter.
• Contains – When you choose this option, the values included or excluded in the field must contain
the whole value that you enter.
• Does not contain – When you choose this option, the values included or excluded in the field must
not contain any part of the value that you enter.
Note
Comparison types are case-sensitive.
5. Do one of the following:
333
Amazon QuickSight User Guide
Filter types
For parameters to appear in this list, create your parameters first. Usually, you create a parameter,
add a control for it, and then add a filter for it. For more information, see Parameters in Amazon
QuickSight (p. 583).
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 that you search for the value that you
want to use, it starts a new query. If the results contain more than 1,000 values, you can scroll
through the values with pagination.
6. For Null options choose Exclude nulls, Include nulls, or Nulls only.
7. When finished, choose Apply.
1. Create a new filter using a text field. For more information about creating filters, see Adding
filters (p. 328).
2. In the Filters pane, choose the new filter to expand it.
3. For Filter type, choose Top and bottom filter.
4. Choose Top or Bottom.
5. For Show top integer (or Show bottom integer), do one of the following:
For example, let's say that you want to show the top three salespersons by default. However, you
want the dashboard viewer to be able to choose whether to show 1–10 top salespersons. In this
case, take the following actions:
• Create an integer parameter with a default value.
• To link the number of displayed items to a parameter control, create a control for the integer
parameter. Then you make the control a slider with a step size of 1, a minimum value of 1, and a
maximum value of 10.
• To make the control work, link it to a filter by creating a top and bottom filter on Salesperson
by Weighted Revenue, enable Use parameters, and choose your integer parameter.
6. For By, choose a field to base the ranking on. If you want to show the top five salespeople per
revenue, choose the revenue field. You can also set the aggregate that you want to perform on the
field.
7. (Optional) Choose Tie breaker and then choose another field to add one or more aggregations as tie
breakers. This is useful, in the case of this example, when there are more than five results returned
for the top five salespeople per revenue. This situation can happen if multiple salespeople have the
same revenue amount.
334
Amazon QuickSight User Guide
Filter types
• Equals
• Does not equal
• Greater than
• Greater than or equal to
• Less than
• Less than or equal to
• Between
Note
To use a top and bottom filter for numeric data (analyses only), first change the field from a
measure to a dimension. Doing this converts the data to text. Then you can use a text filter. For
more information, see Adding text filters (p. 332).
In analyses, for datasets based on database queries, you can also optionally apply an aggregate function
to the comparison value or values, for example Sum or Average.
• Average
• Count
• Count distinct
• Max
• Median
• Min
• Percentile
• Standard deviation
• Standard deviation - population
• Sum
• Variance
• Variance - population
1. Create a new filter using a text field. For more information about creating filters, see Adding
filters (p. 328).
2. In the Filters pane, choose the new filter to expand it.
3. (Optional) For Aggregation, choose an aggregation. No aggregation is applied by default. This
option is available only when creating numeric filters in an analysis.
335
Amazon QuickSight User Guide
Filter types
• If you chose a comparison type other than Between, enter a comparison value.
If you chose a comparison type of Between, enter the beginning of the value range in Minimum
value and the end of the value range in Maximum value.
• (Analyses only) To use an existing parameter, enable Use parameters, then choose your parameter
from the list.
For parameters to appear in this list, create your parameters first. Usually, you create a parameter,
add a control for it, and then add a filter for it. For more information, see Parameters in Amazon
QuickSight (p. 583). 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 that 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.
6. (Analyses only) For Null options choose Exclude nulls, Include nulls, or Nulls only.
7. When finished, choose Apply.
• Range – A series of dates based on a time range and comparison type. You can filter records based on
whether the date field value is before or after a specified date, or within a date range. You enter date
values in the format MM/DD/YYYY. You can use the following comparison types:
• Between – Between a start date and an end date
• After – After a specified date
• Before – Before a specified date
• Equals – On a specified date
For each comparison type, you can alternatively choose a rolling date relative to a period or dataset
value.
• Relative (analyses only) – A series of date and time elements based on the current date. You can filter
records based on the current date and your selected unit of measure (UOM). Date filter units include
years, quarters, months, weeks, days, hours, and minutes. You can exclude current period, add support
for Next N filters similar to Last N with an added capability to allow for Anchor date. You can use the
following comparison types:
• Previous – The previous UOM—for example, the previous year.
• This – This UOM, which includes all dates and times that fall within the select UOM, even if they
occur in the future.
• To date or up to now – UOM to date, or UOM up to now. The displayed phrase adapts to the UOM
that you choose. However, in all cases this option filters out data that is not between the beginning
of the current UOM and the current moment.
• Last n – The last specified number of the given UOM, which includes all of this UOM and all of the
last n −1 UOM. For example, let's say today is May 10, 2017. You choose to use years as your UOM,
and set Last n years to 3. The filtered data includes data for all of 2017, plus all of 2016, and all
of 2015. If you have any data for the future dates of the current year (2017 in this example), these
records are included in your dataset.
• Top and bottom (analyses only) – A number of date entries ranked by another field. You can show the
top or bottom n for the type of date or time UOM you choose, based on values in another field. For
example, you can choose to show the top 5 sales days based on revenue.
336
Amazon QuickSight User Guide
Filter types
Comparisons are applied inclusive to the date specified. For example, if you apply the filter Before
1/1/16, the records returned include all rows with date values through 1/1/16 23:59:59. If you don't
want to include the date specified, you can clear the option to Include this date. If you want to omit a
time range, you can use the Exclude the last N periods option to specify the number and type of time
periods (minutes, days, and so on) to filter out.
You can also choose to include or exclude nulls, or exclusively show rows that contain nulls in this field. If
you pass in a null date parameter (one without a default value), it doesn't filter the data until you provide
a value.
Note
If a column or attribute has no time zone information, then the client query engine sets the
default interpretation of that date-time data. For example, suppose that a column contains
a timestamp, rather than a timestamptz, and you are in a different time zone than the data's
origin. In this case, the engine can render the timestamp differently than you expect. Amazon
QuickSight and SPICE (p. 132) both use Universal Coordinated Time (UTC) times.
Use the following sections to learn how to create date filters in datasets and analyses.
1. Create a new filter using a text field. For more information about creating filters, see Adding
filters (p. 328).
2. In the Filters pane, choose the new filter to expand it.
3. For Condition, choose a comparison type: Between, After, or Before.
To use Between as a comparison, choose Start date and End date and choose dates from the date
picker controls that appear.
You can choose if you want to include either or both the start and end dates in the range by
selecting Include start date or Include end date.
To use Before or After comparisons, enter a date or choose the date field to bring up the date picker
control and choose a date instead. You can include this date (the one you chose), to exclude the last
N time periods, and specify how to handle nulls.
4. For Time granularity, choose Day, Hour, Minute, or Second.
5. When finished, choose Apply.
Use the following procedure to create a range filter for a date field in an analysis.
1. Create a new filter using a text field. For more information about creating filters, see Adding
filters (p. 328).
2. In the Filters pane, choose the new filter to expand it.
3. For Filter type, choose Date & time range.
4. For Condition, choose a comparison type: Between, After, Before, or Equals.
337
Amazon QuickSight User Guide
Filter types
To use Between as a comparison, choose Start date and End date and choose dates from the date
picker controls that appear.
You can choose to include either or both the start and end dates in the range by selecting Include
start date or Include end date.
To use a Before, After, or Equals comparison, enter a date or choose the date field to bring up the
date picker control and choose a date instead. You can include this date (the one you chose), to
exclude the last N time periods, and specify how to handle nulls.
To Set a rolling date for your comparison, choose Set a rolling date.
In the Set a rolling date pane that opens, choose Relative date and then select if you want to set
the date to 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).
5. For Time granularity, choose Day, Hour, Minute, or Second.
6. (Optional) If you are filtering by using an existing parameter, instead of specific dates, choose Use
parameters, then choose your parameter or parameters from the list. To use Before, After, or
Equals comparisons, choose one date parameter. You can include this date in the range.
To use Between, enter both the start date and end date parameters separately. You can include the
start date, the end date, or both in the range.
To use parameters in a filter, create them first. Usually, you create a parameter, add a control for it,
and then add a filter for it. For more information, see Parameters in Amazon QuickSight (p. 583).
7. For Null options choose Exclude nulls, Include nulls, or Nulls only.
8. When finished, choose Apply.
Use the following procedure to create a relative filter for a date field in an analysis.
1. Create a new filter using a text field. For more information about creating filters, see Adding
filters (p. 328).
338
Amazon QuickSight User Guide
Filter types
If you choose Last N or Next N years, quarters, months, weeks, or days, enter a number for Number
of. For example, last 3 years, next 5 quarters, last 5 days.
7. For Null options choose Exclude nulls, Include nulls, or Nulls only.
8. For Set dates relative to, choose one of the following options:
• Current date time – If you choose this option, you can set it to Exclude last, and then specify the
number and type of time periods.
• Date and time from a parameter – If you choose this option, you can select an existing datetime
parameter.
9. (Optional) If you are filtering by using an existing parameter, instead of specific dates, enable Use
parameters, then choose your parameter or parameters from the list.
To use parameters in a filter, create them first. Usually, you create a parameter, add a control for it,
and then add a filter for it. For more information, see Parameters in Amazon QuickSight (p. 583).
10. When finished, choose Apply.
Use the following procedure to create a top and bottom filter for a date field in an analysis.
1. Create a new filter using a text field. For more information about creating filters, see Adding
filters (p. 328).
2. In the Filters pane, choose the new filter to expand it.
3. For Filter type, choose Top and bottom.
4. Select Top or Bottom.
5. For Show, enter the number of top or bottom items you want to show and choose a unit of time
(years, quarters, months, weeks days, hours, minutes).
6. For By, choose a field to base the ranking on.
7. (Optional) Add another field as a tie breaker, if the field for By has duplicates. Choose Tie breaker,
and then choose another field. To remove a tie breaker, use the delete icon.
8. (Optional) If you are filtering by using an existing parameter, instead of specific dates, select Use
parameters, then choose your parameter or parameters from the list.
To use a parameter for Top and bottom, choose an integer parameter for the number of top or
bottom items to show.
To use parameters in a filter, create them first. Usually, you create a parameter, add a control for it,
and then add a filter for it. For more information, see Parameters in Amazon QuickSight (p. 583).
9. When finished, choose Apply.
339
Amazon QuickSight User Guide
Filter types
To add multiple filters using the OR operator, create a filter group. Filter grouping is available for all
types of filters in analyses.
When you filter on multiple measures (green fields marked with #), you can apply the filter conditions to
an aggregate of that field. Filters in a group can contain either aggregated or nonaggregated fields, but
not both.
1. Create a new filter in an analysis. For more information about creating filters, see Adding
filters (p. 328).
2. In the Filters pane, choose the new filter to expand it.
3. In the expanded filter, choose Add filter condition at bottom, and then choose a field to filter on.
4. Choose the conditions to filter on.
The data type of the field that you selected determines the options available here. For example, if
you chose a numeric field, you can specify the aggregation, filter condition, and values. If you chose
a text field, you can chose the filter type, filter condition, and values. And if you chose a date field,
you can specify the filter type, condition, and time granularity. For more information about these
options, see Filter types in Amazon QuickSight (p. 331).
5. (Optional) You can add additional filter conditions to the filter group by choosing Add filter
condition again at bottom.
6. (Optional) To remove a filter from the filter group, choose the trash-can icon near the field name.
7. When finished, choose Apply.
To set up cascading filters, you need a trigger point where the filter is activated, and target points where
the filter is applied. In Amazon QuickSight, the trigger and target points are included in visuals.
To create a cascading filter, you set up an action, not a filter. This approach is because you need to
define how the cascading filter is activated, which fields are involved, and which visuals are filtered
when someone activates it. For more information, including step-by-step instructions, see Using custom
actions for filtering and navigating (p. 603).
There are two other ways to activate a filter across multiple visuals:
• For a filter that is activated from a widget on a dashboard – The widget is called a sheet control,
which is a custom menu that you can add to the top of your analysis or dashboard. The most common
sheet control is a drop-down list, which displays a list of options to choose from when you open it.
To add one of these to your analysis, create a parameter, add a control to the parameter, and then
add a filter that uses the parameter. For more information, see Setting up parameters in Amazon
340
Amazon QuickSight User Guide
Adding filter controls
QuickSight (p. 584), Using a control with a parameter in Amazon QuickSight (p. 585), and Adding
filter controls to analysis sheets (p. 341).
• For a filter that always applies to multiple visuals – This is a regular filter, except that you set its
scope to apply to multiple (or all) visuals. This type of filter doesn't really cascade, because there is no
trigger point. It always filters all the visuals that it's configured to filter. To add this type of filter to
your analysis, create or edit a filter and then choose its scope: All visuals, Some visuals, or Only this
visual. For more information, see Adding filters (p. 328).
Filter controls share some settings with their filters. They apply to one, some, or all of the objects on the
same sheet.
Use the following sections add and customize filter controls to an analysis.
Topics
• Adding filter controls (p. 341)
• Pinning filter controls to the top of a sheet (p. 343)
• Customizing filter controls (p. 344)
1. From the QuickSight start page, choose Analyses, and then choose the analysis that you want to
work with.
341
Amazon QuickSight User Guide
Adding filter controls
3. If you don't already have some filters available, create one. For more information about creating
filters, see Adding filters (p. 328).
342
Amazon QuickSight User Guide
Adding filter controls
4. In the Filters pane, choose the three dots to the right of the filter that you want to add a control for,
and choose Add to sheet.
The filter control is added to the sheet, usually at the bottom. You can resize it or drag it to different
positions on the sheet. You can also customize how it appears and how dashboard viewers can
interact with it. For more information about customizing filter controls, see the following sections.
1. On the filter control that you want to move, choose the three dots next to the pencil icon and
choose Pin to top.
The filter is pinned to the top of the sheet and is collapsed. You can click it to expand it.
343
Amazon QuickSight User Guide
Adding filter controls
2. (Optional) To unpin the control, expand it and hover over it at the top of the sheet until three dots
appear. Choose the three dots, and then choose Move to sheet.
344
Amazon QuickSight User Guide
Adding filter controls
If the filter control is pinned to the top of the sheet, expand it and hover your cursor over it until the
three dots appear. Choose the three dots, and then choose Edit.
3. In the Format control pane that opens, do the following:
The remaining steps depend on the type of field the control is referencing. For options by filter type, see
the following sections.
Date filters
If your filter control is from a date filter, use the following procedure to customize the remaining options.
1. In the Format control pane, for Style, choose one of the following options:
• Date picker – range – Displays a set of two fields to define a time range. You can enter a date
or time, or you can choose a date from the calendar control. You can also customize how you
want the dates to appear in the control by entering a date token for Date format. For more
information, see Customizing date formats in Amazon QuickSight (p. 565).
• Date picker – relative – Displays settings like the time period, its relation to the current date and
time, and the option to exclude time periods. You can also customize how you want the dates
to appear in the control by entering a date token for Date format. For more information, see
Customizing date formats in Amazon QuickSight (p. 565).
• Text field – Displays a box where you can enter the top or bottom N date.
Helper text is included in the text field control by default, but you can choose to remove it by
clearing the Show helper text in control option.
2. When finished, choose Apply.
345
Amazon QuickSight User Guide
Adding filter controls
Text filters
If your filter control is from a text filter, for example dimensions, categories, or labels, use the following
procedure to customize the remaining options.
1. In the Format control pane, for Style, choose one of the following options:
• Dropdown – Displays a dropdown list with buttons that you can use to select a single value.
When you select this option, you can choose the following options for Values:
• Filter – Displays all the values that are available in the filter.
• Specific values – Enables you to enter the values to display, one entry per line.
You can also choose to Hide Select all option from the control values. This removes the option
to select or clear the selection of all values in the filter control.
• Dropdown - multiselect – Displays a dropdown list with boxes that you can use to select multiple
values.
When you select this option, you can choose the following options for Values:
• Filter – Displays all the values that are available in the filter.
• Specific values – Enables you to enter the values to display, one entry per line.
You can also choose to Hide Select all option from the control values. This removes the option
to select or clear the selection of all values in the filter control.
• List – Displays a list with buttons that you can use to select a single value.
When you select this option, you can choose the following options for Values:
• Filter – Displays all the values that are available in the filter.
• Specific values – Enables you to enter the values to display, one entry per line.
When you select this option, you can choose the following options for Values:
• Filter – Displays all the values that are available in the filter.
• Specific values – Enables you to enter the values to display, one entry per line.
When you select this option, you can choose the following:
• Show helper text in control – Removes the helper text in text fields.
• Text field - multiline – Displays a text box where you can enter multiple entries.
When you select this option, you can choose the following:
346
Amazon QuickSight User Guide
Adding filter controls
• For Separate values by, choose how you want to separate values you enter into the filter
control. You can choose to separate values by a line break, comma, pipe (|), or semicolon.
• Show helper text in control – Removes the helper text in text fields.
2. When finished, choose Apply.
Numeric filters
If your filter control is from a numeric filter, use the following procedure to customize the remaining
options.
1. In the Format control pane, for Style, choose one of the following options:
When you select this option, you can choose the following options for Values:
• Filter – Displays all the values that are available in the filter.
• Specific values – Enables you to enter the values to display, one entry per line.
You can also choose to Hide Select all option from the control values. This removes the option
to select or clear the selection of all values in the filter control.
• Filter – Displays all the values that are available in the filter.
• Specific values – Enables you to enter the values to display, one entry per line.
• Hide Select all option from the control values – Removes the option to select or clear the
selection of all values in the filter control.
• List – Displays a list with buttons that enable selecting a single value.
When you select this option, you can choose the following options for Values:
• Filter – Displays all the values that are available in the filter.
• Specific values – Enables you to enter the values to display, one entry per line.
• Cascading controls must be tied to dataset columns from the same dataset.
• The child control must be a dropdown or list control.
347
Amazon QuickSight User Guide
Editing filters
• 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).
a. Choose Show relevant values only. Note that this option might not be available for all filter
control types.
b. In the Show relevant values only pane that opens, choose one or more controls from the
available list.
c. Choose a field to match the value to.
d. Choose Update.
3. When finished, choose Apply.
Editing filters
You can edit filters at any time in a dataset or analysis.
You can't change the field a filter applies to. To apply a filter to a different field, create a new filter
instead.
348
Amazon QuickSight User Guide
Editing filters
2. Choose the dataset that you want, and then choose Edit dataset.
3. On the data preparation page that opens, choose Filters at lower left.
349
Amazon QuickSight User Guide
Editing filters
2. On the Analyses page, choose the analysis that you want to work with.
3. In the analysis, choose Filter at left.
350
Amazon QuickSight User Guide
Enabling or disabling filters
351
Amazon QuickSight User Guide
Enabling or disabling filters
2. Choose the dataset that you want, and then choose Edit dataset.
3. On the data preparation page that opens, choose Filters at lower left.
352
Amazon QuickSight User Guide
Enabling or disabling filters
4. In the Filters pane at left, choose the three dots to the right of the filter that you want to disable,
and then choose Disable. To enable a filter that was disabled, choose Enable.
2. On the Analyses page, choose the analysis that you want to work with.
3. In the analysis, choose Filter at left.
353
Amazon QuickSight User Guide
Deleting filters
4. In the Filters pane that opens, choose the three dots to the right of the filter that you want to
disable, and then choose Disable. To enable a filter that was disabled, choose Enable.
Deleting filters
You can delete filters at any time in a dataset or analysis. Use the following procedures to learn how.
354
Amazon QuickSight User Guide
Deleting filters
2. Choose the dataset that you want, and then choose Edit dataset.
3. On the data preparation page that opens, choose Filters at lower left.
355
Amazon QuickSight User Guide
Deleting filters
4. Choose the filter that you want to delete, and then choose Delete filter.
2. On the Analyses page, choose the analysis that you want to work with.
3. In the analysis, choose Filter at left.
356
Amazon QuickSight User Guide
Using SQL to customize data
4. Choose the filter that you want to delete, and then choose Delete filter.
• Query mode – At the top left, you can choose between direct query or SPICE query modes:
• Direct query – To run the SELECT statement directly against the database
• SPICE – To run the SELECT statement against data that was previously stored in memory
• Fields – Use this section to disable fields you want to remove from the final dataset. You can add
calculated fields in this section, and augment your data with SageMaker
• Query archive – Use this section to find previous version of your SQL queries.
• Filters – Use this section to add, edit, or remove filters.
• Schema explorer – This section only appears while you are editing SQL. You can use it to explore your
schemas, tables, fields, and data types.
• SQL editor – Use this to edit your SQL. The SQL editor, which offers syntax highlighting, basic
autocomplete, autoindent, and line numbering. You can specify a SQL query only for datasets
that come from data sources compatible with SQL. Your SQL must conform to the target database
requirements regarding syntax, capitalization, command termination, and so on. If you prefer, you can
instead paste SQL from another editor.
• Data workspace – When the SQL editor is closed, the data workspace displays at top right with a
grid background. Here you can see a graphical representation of your data objects, including queries,
tables, files, and joins created in the join editor.
To view details about each table, use the data source options menu and choose Table details or Edit
SQL Query. Details display for table name and alias, schema, data source name, and data source type.
For upload settings on a file, choose Configure upload settings from the data source options menu to
view or change the following settings:
• Format – the file format, CSV, CUSTOM, CLF, and so on
357
Amazon QuickSight User Guide
Creating a basic SQL query
To add more queries, tables, or files, use the Add data option above the workspace.
(Optional) Choose Confirm query to validate it and view settings for direct query, SPICE memory,
and SageMaker settings.
5. Choose Edit/Preview data. The full query editor appears with the SQL editor displayed. The query
is processed and a sample of the query results displays in the data preview pane. You can make
changes to the SQL and confirm them by choosing Apply. When you are done with the SQL, choose
Close to continue.
6. At the top, enter a name for the dataset. Then choose Save & visualize.
358
Amazon QuickSight User Guide
Adding geospatial data
can also create geographic hierarchies that can disambiguate similar entities, for example the same city
name in two states.
Note
Geospatial charts in Amazon QuickSight aren't currently supported in some AWS Regions,
including in China. We are working on adding support for more Regions.
Use the following procedures to add geospatial data types and hierarchies to your dataset.
1. On the data preparation page, label the geographic components with the correct data type.
There are several ways to do this. One is to choose the field under Fields and use the ellipses icon
(…) to open the context menu.
You can also change the data type in the work area with the data sample. To do this, choose the data
type listed under the field name. Then choose the data type you want to assign.
2. Verify that all geospatial fields necessary for mapping are labeled as geospatial data types. You can
check this by looking for the place marker icon. This icon appears under the field names across the
top of the page, and also in the Fields pane on the left.
359
Amazon QuickSight User Guide
Adding geospatial data
Also check the name of the data type, for example latitude or country.
3. (Optional) You can set up a hierarchy or grouping for geographical components (state, city), or for
latitude and longitude coordinates. For coordinates, you must add both latitude and longitude to
the geospatial field wells.
To create a hierarchy or grouping, first choose one of these fields in the Fields pane. Each field can
only belong to one hierarchy. It doesn't matter which one you choose first, or what order you add
the fields in.
Choose the ellipsis icon (…) next to the field name. Then choose Add to a hierarchy.
360
Amazon QuickSight User Guide
Adding geospatial data
If you are creating a latitude and longitude grouping, the Create hierarchy screen appears as
follows. Depending on whether you chose latitude or longitude in the previous steps, either latitude
or longitude displays on this screen. Make sure that your latitude field shows under Field to use for
latitude. Also make sure that your longitude shows under Field to use for longitude.
For geographical components, the Create hierarchy screen has two choices:
• Choose This hierarchy is for a single country if your data only contains one country. Choose the
specific country from the list. Your data doesn't need to contain every level of the hierarchy. You
can add fields to the hierarchy in any order.
• Choose This hierarchy is for multiple countries if your data contains more than one country.
Choose the field that contains the country names.
361
Amazon QuickSight User Guide
Adding geospatial data
362
Amazon QuickSight User Guide
Changing a geospatial grouping
1. Open the dataset. In the Fields pane, choose the hierarchy name.
2. Choose the ellipsis icon (...), then choose one of the following options.
Choose Disband hierarchy to remove the hierarchy from the dataset. You can't undo this operation.
However, you can recreate your hierarchy or grouping by starting again at step 1. Disbanding the
hierarchy doesn't remove any fields from the dataset.
363
Amazon QuickSight User Guide
Geospatial troubleshooting
Choose Edit hierarchy to make changes to the hierarchy. Doing this reopens the creation screens, so
you can make different choices in rebuilding your hierarchy.
Geospatial troubleshooting
Use this section to discover the Amazon QuickSight requirements for correctly processing geospatial
data. If Amazon QuickSight doesn't recognize your geospatial data as geospatial, use this section to
help troubleshoot the issue. Make sure that your data follows the guidelines listed, so that it works in
geospatial visuals.
Note
Geospatial charts in Amazon QuickSight currently aren't supported in some AWS Regions,
including in China. We are working on adding support for more Regions.
If your geography follows all the guidelines listed here, and still generates errors, contact the
Amazon QuickSight team from within the Amazon QuickSight console.
Topics
• Geocoding issues (p. 364)
• Issues with latitude and longitude (p. 365)
Geocoding issues
Amazon QuickSight geocodes place names into latitude and longitude coordinates. It uses these
coordinates to display place names on the map. Amazon QuickSight skips any places that it can't
geocode.
For this process to work properly, your data must include at least the country. Also, there can't be
duplicate place names inside of a parent place name.
A few issues prevent place names from showing up on a map chart. These issues include unsupported,
ambiguous, or invalid locations, as described following.
Topics
• Issues with unsupported areas (p. 364)
• Issues with ambiguous locations (p. 364)
• Issues with invalid geospatial data (p. 365)
• Issues with the default country in geocoding (p. 365)
To avoid this problem, you can add enough geographical data to indicate what location should show on
a map chart. For example, you can add a state level into your data and its hierarchy. Or, you might add
latitude and longitude.
364
Amazon QuickSight User Guide
Geospatial troubleshooting
The default for each hierarchy is based on the country or country field that you choose when you create
the hierarchy.
To change this default, you can return to the Create hierarchy screen. Then edit or create a hierarchy,
and choose a different country.
If you don't create a hierarchy, your default country is based on your AWS Region. For details, see the
following table.
Latitude and longitude values must be numeric. For example, the map point indicated by 28.5383355
-81.3792365 is compatible with Amazon QuickSight. But 28° 32' 18.0096'' N 81° 22'
45.2424'' W is not.
Topics
• Valid ranges for latitude and longitude coordinates (p. 365)
• Using coordinates in degrees, minutes, and seconds (DMS) format (p. 366)
365
Amazon QuickSight User Guide
Geospatial troubleshooting
Amazon QuickSight skips any data outside these ranges. Out-of-range points can't be mapped on a map
chart.
The following sample converts latitude and longitude to numeric format from separate fields. For
example, suppose that you parse 51° 30' 26.4636'' N 0° 7' 39.9288'' W using space as a
delimiter. In this case, you can use something like the following sample to convert the resulting fields to
numeric latitude and longitude.
In this example, the seconds are followed by two single quotation marks. If your data has a double
quotation mark instead, then you can use strlen(LatSec)-1) instead of strlen(LatSec)-2).
/*Latitude*/
ifelse(
LatDir = "N",
parseInt(split(LatDeg, "°", 1)) +
(parseDecimal(split(LatMin, "'", 1) ) /60) +
(parseDecimal((substring(LatSec, 1, strlen(LatSec)-2) ) ) /3600),
(parseInt(split(LatDeg, "°", 1)) +
(parseDecimal(split(LatMin, "'", 1) ) /60) +
(parseDecimal((substring(LatSec, 1, strlen(LatSec)-2) ) ) /3600)) * -1
)
/*Longitude*/
ifelse(
LongDir = "E",
parseInt(split(LongDeg, "°", 1)) +
(parseDecimal(split(LongMin, "'", 1) ) /60) +
(parseDecimal((substring(LongSec, 1, strlen(LongSec)-2) ) ) /3600),
(parseInt(split(LongDeg, "°", 1)) +
(parseDecimal(split(LongMin, "'", 1) ) /60) +
(parseDecimal((substring(LongSec, 1, strlen(LongSec)-2) ) ) /3600)) * -1
)
If your data doesn't include the symbols for degree, minute and second, the formula looks like the
following.
/*Latitude*/
ifelse(
LatDir = "N",
(LatDeg + (LatMin / 60) + (LatSec / 3600)),
(LatDeg + (LatMin / 60) + (LatSec / 3600)) * -1
)
/*Longitude*/
ifelse(
366
Amazon QuickSight User Guide
Using unsupported or custom dates
LongDir = "E",
(LongDeg + (LongMin / 60) + (LongSec / 3600)),
(LongDeg + (LongMin / 60) + (LongSec / 3600)) * -1
)
The following sample converts 53°21'N 06°15'W to numeric format. However, without the seconds,
this location doesn't map as accurately.
/*Latitude*/
ifelse(
right(Latitude, 1) = "N",
(parseInt(split(Latitude, '°', 1)) +
parseDecimal(substring(Latitude, (locate(Latitude, '°',3)+1), 2) ) / 60) ,
(parseInt(split(Latitude, '°', 1)) +
parseDecimal(substring(Latitude, (locate(Latitude, '°',3)+1), 2) ) / 60) * -1
)
/*Longitude*/
ifelse(
right(Longitude, 1) = "E",
(parseInt(split(Longitude, '°', 1)) +
parseDecimal(substring(Longitude, (locate(Longitude, '°',3)+1), 2) ) / 60) ,
(parseInt(split(Longitude, '°', 1)) +
parseDecimal(substring(Longitude, (locate(Longitude, '°',3)+1), 2) ) / 60) * -1
)
The formats of GPS latitude and longitude can vary, so customize your formulas to match your data. For
more information, see the following:
You can do this by editing the dataset, and changing the format of the column from text or numeric to
date. A screen appears after you make this change, so you can enter the format. For example, if you are
using a relational data source, you can specify MM-dd-yyyy for a text field containing '09-19-2017', so it
is interpreted as 2017-09-19T00:00:00.000Z. If you are using a nonrelational data source, you can do the
same thing starting with a numeric field or a text field.
Amazon QuickSight only supports text to date for relational (SQL) sources.
For more information on supported date formats, see Supported date formats (p. 73).
Use this procedure to help Amazon QuickSight understand dates in different formats.
1. For a dataset containing unsupported date formats, edit the data as follows. For the column
containing your datetime data, change the data type from text to date. Do this by choosing the
colorful data type icon beneath the column name in the data preview.
367
Amazon QuickSight User Guide
Integrating SageMaker models
Note
Integer dates that aren’t Unix epoch datetimes don't work as is. For example, these formats
are not supported as integers: MMddyy, MMddyyyy, ddMMyy, ddMMyyyy, and yyMMdd. The
workaround is to first change them to text format. Make sure all your rows contain six digits
(not five). Then change the text data type to datetime.
For more information on Unix epoch datetimes, see epochDate (p. 187).
When you change the data type to date, the Edit date format screen appears.
2. Enter your date format, indicating which parts are month, date, year, or time. Formats are case-
sensitive.
3. Choose Validate to make sure Amazon QuickSight can now interpret your datetime data with the
format you specified. Rows that don't validate are skipped and omitted from the dataset.
4. When you are satisfied with the results, choose Update. Otherwise, choose Close.
368
Amazon QuickSight User Guide
How SageMaker integration works
You can augment your Amazon QuickSight Enterprise edition data with Amazon SageMaker machine
learning models. You can run inferences on data stored in SPICE imported from any data source
supported by Amazon QuickSight. For a full list of supported data sources, see Supported data
sources (p. 65).
Using Amazon QuickSight with SageMaker models can save the time that you might otherwise spend
managing data movement and writing code. The results are useful both for evaluating the model and
—when you're satisfied with the results—for sharing with decision-makers. You can begin immediately
after the model is built. Doing this surfaces your data scientists' prebuilt models, and enables you to
apply the data science to your datasets. Then you can share these insights in your predictive dashboards.
With the Amazon QuickSight serverless approach, the process scales seamlessly, so you don't need to
worry about inference or query capacity.
Amazon QuickSight supports SageMaker models that use regression and classification algorithms. You
can apply this feature to get predictions for just about any business use case. Some examples include
predicting the likelihood of customer churn, employee attrition, scoring sales leads, and assessing credit
risks. To use Amazon QuickSight to provide predictions, the SageMaker model data for both input and
output must be in tabular format. In multiclass or multilabel classification use cases, each output column
has to contain a single value. Amazon QuickSight doesn’t support multiple values inside a single column.
Topics
• How SageMaker integration works (p. 369)
• Costs incurred (no additional costs with integration itself) (p. 370)
• Usage guidelines (p. 370)
• Defining the schema file (p. 371)
• Adding a SageMaker model to your QuickSight dataset (p. 373)
1. An Amazon QuickSight administrator adds permissions for Amazon QuickSight to access SageMaker.
To do this, open Security & Permissions settings from the Manage QuickSight page. Go to
QuickSight access to AWS services, and add SageMaker.
When you add these permissions, Amazon QuickSight is added to an AWS Identity and Access
Management (IAM) role that provides access to list all the SageMaker models in your AWS account.
It also provides permissions to run SageMaker jobs that have names that are prefixed with
quicksight-auto-generated-.
2. We recommend that you connect to an SageMaker model that has an inference pipeline, because it
automatically performs data preprocessing. For more information, see Deploy an Inference Pipeline in
the SageMaker Developer Guide.
3. After you identify the data and the pretrained model that you want to use together, the owner of
the model creates and provides a schema file. This JSON file is a contract with SageMaker. It provides
metadata about the fields, data types, column order, output, and settings that the model expects. The
optional settings component provides the instance size and count of the compute instances to use for
the job.
If you're the data scientist who built the model, create this schema file using the format documented
following. If you're a consumer of the model, get the schema file from the owner of the model.
4. In Amazon QuickSight, you begin by creating a new dataset with the data that you want to make
predictions on. If you're uploading a file, you can add the SageMaker model on the upload settings
screen. Otherwise, add the model on the data preparation page.
Before you proceed, verify the mappings between the dataset and the model.
369
Amazon QuickSight User Guide
Costs incurred (no additional costs with integration itself)
5. After the data is imported into the dataset, the output fields contain the data returned from
SageMaker. You use these fields just as you use other fields, within the guidelines described in Usage
guidelines (p. 370).
When you run SageMaker integration, Amazon QuickSight passes a request to SageMaker to run batch
transform jobs with inference pipelines. Amazon QuickSight starts provisions and deployment of the
instances needed in your AWS account. When processing is complete, these instances are shut down
and terminated. The compute capacity incurs costs only when it's processing models.
To make it easier for you to identify them, Amazon QuickSight names all its SageMaker jobs with the
prefix quicksight-auto-generated-.
6. The output of the inference is stored in SPICE and appended to the dataset. As soon as the inference is
complete, you can use the dataset to create visualizations and dashboards using the prediction data.
7. The data refresh starts every time you save the dataset. You can start the data refresh process
manually by refreshing the SPICE dataset, or you can schedule it to run at a regular interval. During
each data refresh, the system automatically calls SageMaker batch transform to update the output
fields with new data.
You can use the Amazon QuickSight SPICE ingestion API operations to control the data refresh
process. For more information about using these API operations, see the Amazon QuickSight API
Reference.
• The cost of model deployment through SageMaker, which is incurred only when the model is running.
Saving a dataset—after either creating or editing it—or refreshing its data starts the data ingestion
process. This process includes calling SageMaker if the dataset has inferred fields. Costs are incurred in
the same AWS account where your QuickSight subscription is.
• Your QuickSight subscription costs are as follows:
• The cost of storing your data in the in-memory calculation engine in QuickSight (SPICE). If you are
adding new data to SPICE, you might need to purchase enough SPICE capacity to accommodate it.
• QuickSight subscriptions for the authors or admins who build the datasets.
• Pay-per-session charges for viewers (readers) to access interactive dashboards.
Usage guidelines
In Amazon QuickSight, the following usage guidelines apply to this Enterprise edition feature:
• The processing of the model occurs in SPICE. Therefore, it can only apply to datasets that are stored in
SPICE. The process currently supports up to 100 million rows per dataset.
• Only QuickSight admins or authors can augment datasets with ML models. Readers can only view the
results when they are part of a dashboard.
• Each dataset can work with one and only one ML model.
• Output fields can't be used to calculate new fields.
• Datasets can't be filtered by fields that are integrated with the model. In other words, if your dataset
field is currently mapped to the ML model, you can't filter on that field.
370
Amazon QuickSight User Guide
Defining the schema file
In SageMaker, the following usage guidelines apply to a pretrained model that you use with Amazon
QuickSight:
• When you create the model, associate it with the Amazon Resource Name (ARN) for the appropriate
IAM role. The IAM role for the SageMaker model needs to have access to the Amazon S3 bucket that
Amazon QuickSight uses.
• Make sure that your model supports .csv files for both input and output. Make sure that your data is in
a tabular format.
• Provide a schema file that contains metadata about the model, including the list of input and output
fields. Currently, you must create this schema file manually.
• Consider the amount of time that it takes to complete your inference, which depends on a number
of factors. These include the complexity of the model, the amount of data, and the compute capacity
defined. Completing the inference can take several minutes to several hours. Amazon QuickSight
caps all data ingestion and inferencing jobs to a maximum of 10 hours. To reduce the time it takes to
perform an inference, consider increasing the instance size or the number of instances.
• Currently, you can use only batch transforms for integration with SageMaker, not real-time data. You
can't use an SageMaker endpoint.
The schema fields are defined as follows. All fields are required unless specified in the following
description. Attributes are case-sensitive.
inputContentType
The content type that this SageMaker model expects for the input data. The only supported value
for this is "text/csv". QuickSight doesn't include any of the header names that you add to the
input file.
outputContentType
The content type of the output that is produced by the SageMaker model that you want to use. The
only supported value for this is "text/csv".
input
A list of features that the model expects in the input data. QuickSight produces the input data in
exactly the same order. This list contains the following attributes:
• name – The name of the column. If possible, make this the same as the name of the corresponding
column in the QuickSight dataset. This attribute is limited to 100 characters.
• type – The data type of this column. This attribute takes the values "INTEGER", "STRING", and
"DECIMAL".
• nullable – (Optional) The nullability of the field. The default value is true. If you set nullable to
false, QuickSight drops rows that don't contain this value before calling SageMaker. Doing this
helps avoid causing SageMaker to fail on missing required data.
output
A list of output columns that the SageMaker model produces. QuickSight expects these fields in
exactly the same order. This list contains the following attributes:
• name – This name becomes the default name for the corresponding new column that's created
in QuickSight. You can override the name specified here in QuickSight. This attribute is limited to
100 characters.
371
Amazon QuickSight User Guide
Defining the schema file
• type – The data type of this column. This attribute takes the values "INTEGER", "STRING", and
"DECIMAL".
instanceTypes
A list of the ML instance types that SageMaker can provision to run the transform job. The list
is provided to the QuickSight user to choose from. This list is limited to the types supported by
SageMaker. For more information on supported types, see TransformResources in the SageMaker
Developer Guide.
defaultInstanceType
(Optional) The instance type that is presented as the default option in the SageMaker wizard in
QuickSight. Include this instance type in instanceTypes.
instanceCount
(Optional) The instance count defines how many of the selected instances for SageMaker to
provision to run the transform job. This value must be a positive integer.
description
This field provides a place for the person who owns the SageMaker model to communicate with the
person who is using this model in QuickSight. Use this field to provide hints about successfully using
this model. For example, this field can contain information about selecting an effective instance
type to choose from the list in instanceTypes, based on the size of dataset. This field is limited to
1,000 characters.
version
The following example shows the structure of the JSON in the schema file.
{
"inputContentType": "CSV",
"outputContentType": "CSV",
"input": [
{
"name": "buying",
"type": "STRING"
},
{
"name": "maint",
"type": "STRING"
},
{
"name": "doors",
"type": "INTEGER"
},
{
"name": "persons",
"type": "INTEGER"
},
{
"name": "lug_boot",
"type": "STRING"
},
{
"name": "safety",
"type": "STRING"
}
],
"output": [
372
Amazon QuickSight User Guide
Adding a SageMaker model to your QuickSight dataset
{
"name": "Acceptability",
"type": "STRING"
}
],
"description": "Use ml.m4.xlarge instance for small datasets, and ml.m4.4xlarge for
datasets over 10 GB",
"version": "1.0",
"instanceCount": 1,
"instanceTypes": [
"ml.m4.xlarge",
"ml.m4.4xlarge"
],
"defaultInstanceType": "ml.m4.xlarge"
}
The structure of the schema file is related to the kind of model that is used in examples provided by
SageMaker.
1. Create a new dataset from the start page by choosing Datasets, and then choose New dataset.
373
Amazon QuickSight User Guide
Preparing dataset examples
Topics
• Preparing a dataset based on file data (p. 374)
• Preparing a dataset based on Salesforce data (p. 376)
• Preparing a dataset based on database data (p. 377)
To prepare a dataset based on text or Microsoft Excel files from a local network or S3
1. Open a file dataset for data preparation by choosing one of the following options:
• Create a new local file dataset, and then choose Edit/Preview data. For more information about
creating a new dataset from a local text file, see Creating a dataset using a local text file (p. 91).
For more information about creating a new dataset from a Microsoft Excel file, see Creating a
dataset using a Microsoft Excel file (p. 87).
• Create a new Amazon S3 dataset, and then choose Edit/Preview data. For more information
about creating a new Amazon S3 dataset using a new Amazon S3 data source, see Creating a
dataset using Amazon S3 files (p. 79). For more information about creating a new Amazon S3
dataset using an existing Amazon S3 data source, see Creating a dataset using an existing Amazon
S3 data source (p. 99).
• Open an existing Amazon S3, text file, or Microsoft Excel dataset for editing, from either the
analysis page or the Your Datasets page. For more information about opening an existing dataset
for data preparation, see Editing datasets (p. 104).
2. (Optional) On the data preparation page, enter a new name into the dataset name box on the
application bar.
This name defaults to the file name for local files. For example, it defaults to Group 1 for Amazon
S3 files.
3. Review the file upload settings and correct them if necessary. For more information about file
upload settings, see Choosing file upload settings (p. 148).
Important
If you want to change upload settings, make this change before you make any other
changes to the dataset. New upload settings cause Amazon QuickSight to reimport the file.
This process overwrites all of your other changes.
374
Amazon QuickSight User Guide
Preparing a dataset based on file data
If you don't have access to enough SPICE capacity, you can make the dataset smaller by using one of
the following options:
Note
The SPICE indicator doesn't update to how much space you save by removing fields or
filtering the data. It continues to reflect the SPICE usage from the last import.
6. Choose Save to save your work, or Cancel to cancel it.
You might also see Save & visualize. This option appears based on the screen that you started from.
If this option isn't there, you can create a new visualization by starting from the dataset screen.
1. Open a text file dataset for preparation by choosing one of the following options:
• Create a new Microsoft Excel dataset, and then choose Edit/Preview data. For more information
about creating a new Excel dataset, see Creating a dataset using a Microsoft Excel file (p. 87).
• Open an existing Excel dataset for editing. You can do this from the analysis page or the Your
Datasets page. For more information about opening an existing dataset for data preparation, see
Editing datasets (p. 104).
2. (Optional) On the data preparation page, enter a name into the dataset name box in the application
bar. If you don't rename the dataset, its name defaults to the Excel file name.
3. Review the file upload settings and correct them if necessary. For more information about file
upload settings, see Choosing file upload settings (p. 148).
Important
If it's necessary to change upload settings, make this change before you make any other
changes to the dataset. Changing upload settings causes Amazon QuickSight to reimport
the file. This process overwrites any changes you have made so far.
4. (Optional) Change the worksheet selection.
5. (Optional) Change the range selection. To do this, open Upload Settings from the on-dataset menu
beneath the login name at upper right.
6. Prepare the data by doing one or more of the following:
375
Amazon QuickSight User Guide
Preparing a dataset based on Salesforce data
If you don't have enough SPICE capacity, you can choose to make the dataset smaller using one of
the following methods:
Note
The SPICE indicator doesn't update to reflect your changes until after your load them. It
shows the SPICE usage from the last import.
8. Choose Save to save your work, or Cancel to cancel it.
You might also see Save & visualize. This option appears based on the screen that you started from.
If this option isn't there, you can create a new visualization by starting from the dataset screen.
1. Open a Salesforce dataset for preparation by choosing one of the following options:
• Create a new Salesforce dataset and choose Edit/Preview data. For more information about
creating a new Salesforce dataset using a new Salesforce data source, see Creating a dataset from
Salesforce (p. 91). For more information about creating a new Salesforce dataset using an existing
Salesforce data source, see Create a dataset using an existing Salesforce data source (p. 99).
• Open an existing Salesforce dataset for editing from either the analysis page or the Your Datasets
page. For more information about opening an existing dataset for data preparation, see Editing
datasets (p. 104).
2. (Optional) On the data preparation page, enter a name into the dataset name box in the application
bar if you want to change the dataset name. This name defaults to the report or object name.
3. (Optional) Change the data element selection to see either reports or objects.
4. (Optional) Change the data selection to choose a different report or object.
If you have a long list in the Data pane, you can search to locate a specific item by entering a search
term into the Search tables box. Any item whose name contains the search term is shown. Search
is case-insensitive and wildcards are not supported. Choose the cancel icon (X) to the right of the
search box to return to viewing all items.
5. Prepare the data by doing one or more of the following:
376
Amazon QuickSight User Guide
Preparing a dataset based on database data
If you don't have enough SPICE capacity, you can remove fields from the dataset or apply a filter
to decrease its size. For more information about adding and removing fields from a dataset, see
Selecting fields (p. 156).
Note
The SPICE indicator doesn't update to reflect the potential savings of removing fields or
filtering the data. It continues to reflect the size of the dataset as retrieved from the data
source.
7. Choose Save to save your work, or Cancel to cancel it.
You might also see Save & visualize. This option appears based on the screen you started from. If
this option isn't there, you can create a new visualization by starting from the dataset screen.
1. Open a database dataset for preparation by choosing one of the following options:
• Create a new database dataset and choose Edit/Preview data. For more information about
creating a new dataset using a new database data source, see Creating datasets from new
database data sources (p. 95). For more information about creating a new dataset using
an existing database data source, see Creating a dataset using an existing database data
source (p. 100).
• Open an existing database dataset for editing from either the analysis page or the Your Datasets
page. For more information about opening an existing dataset for data preparation, see Editing
datasets (p. 104).
2. (Optional) On the data preparation page, enter a name into the dataset name box on the application
bar.
This name defaults to the table name if you selected one before data preparation. Otherwise, it's
Untitled data source.
3. Decide how your data is selected by choosing one of the following:
• To use a single table to provide data, choose a table or change the table selection.
If you have a long table list in the Tables pane, you can search for a specific table by typing a
search term for Search tables.
Any table whose name contains the search term is shown. Search is case-insensitive and wildcards
are not supported. Choose the cancel icon (X) to the right of the search box to return to viewing all
tables.
• To use two or more joined tables to provide data, choose two tables and join them using the
join pane. You must import data into QuickSight if you choose to use joined tables. For more
information about joining data using the Amazon QuickSight interface, see Joining data (p. 317).
377
Amazon QuickSight User Guide
Preparing a dataset based on database data
• To use a custom SQL query to provide data in a new dataset, choose Switch to Custom SQL tool
on the Tables pane. For more information, see Using SQL to customize data (p. 357).
To change the SQL query in an existing dataset, choose Edit SQL on the Fields pane to open the
SQL pane and edit the query.
4. Prepare the data by doing one or more of the following:
If you want to use SPICE, check the SPICE indicator to see if you have enough space to import the
dataset. Importing occurs when you choose either Save & visualize or Save.
If you don't have enough space, you can remove fields from the dataset or apply a filter to decrease
its size.
Note
The SPICE indicator doesn't update to reflect the potential savings of removing fields or
filtering the data. It continues to reflect the size of the dataset as retrieved from the data
source.
6. Choose Save to save your work, or Cancel to cancel it.
You might also see an option to Save & visualize. This option appears based on the screen you
started from. If this option isn't there, you can create a new visualization by starting from the
dataset screen.
378
Amazon QuickSight User Guide
Starting an analysis
Topics
• Starting an analysis in Amazon QuickSight (p. 379)
• Adding sheets (p. 384)
• Adding visuals to Amazon QuickSight analyses (p. 384)
• Analyzing data in visuals (p. 547)
• Arranging visuals in dashboards (p. 573)
• Using themes in Amazon QuickSight (p. 609)
• Working with stories (feature removed) (p. 613)
• Accessing Amazon QuickSight using keyboard shortcuts (p. 613)
1. On the All analyses tab of the Amazon QuickSight start page, choose New analysis. The Datasets
page opens.
2. Choose a dataset, and then choose Create analysis.
379
Amazon QuickSight User Guide
Starting an analysis
If you don't have any datasets, create a new one by choosing New data set. You can create an
analysis as the last step in creating a new dataset. For more information about creating a dataset,
see Creating datasets (p. 94).
3. Create a visual. For more information about creating visuals, see Adding visuals to Amazon
QuickSight analyses (p. 384).
After you are done creating the analysis, you can iterate on it by modifying the visual, adding additional
visuals, adding scenes to the default story, or adding additional stories.
For more information about working with analyses, see the following topics. .
Topics
• Adding a title and description to an analysis (p. 381)
• Renaming an analysis (p. 381)
• Duplicating analyses (p. 381)
• Viewing analysis details (p. 382)
• Saving changes to analyses (p. 382)
• Exporting data from Amazon QuickSight analyses (p. 383)
• Deleting an analysis (p. 384)
380
Amazon QuickSight User Guide
Adding titles and descriptions to an analysis
1. On the analysis page, choose Add in the application bar and then choose Add title.
2. For Sheet title, enter a title and press Enter. To remove a title, choose Add in the application bar
and then choose Delete title. Or, to remove the title, you can select the title and then choose the x-
shaped delete icon.
To create a dynamic sheet title, you can add existing parameters to the sheet title. For more
information, see Using parameters in titles and descriptions in Amazon QuickSight (p. 598).
3. Choose Add in the application bar, and then choose Add description.
4. Enter a description in the Description box and press Enter. To remove a description, choose Add
in the application bar and then choose Remove description. Or, to remove the description, you can
select the description and then choose the x-shaped delete icon.
Renaming an analysis
Use the following procedure to rename an analysis.
To rename an analysis
Duplicating analyses
You can duplicate analyses in Amazon QuickSight. Use the following procedure to learn how.
381
Amazon QuickSight User Guide
Viewing analysis details
To duplicate an analysis
1. From the QuickSight start page, choose Analyses, and then open the analysis that you want to
duplicate.
2. In the analysis, choose Save as in the application bar at upper right.
3. In the Save a copy page that opens, enter a name for the analysis, and then choose Save.
The new analysis opens. You can find the original analysis by returning to the QuickSight start page
and selecting Analyses.
In either Autosave mode, you can undo or redo up to 200 changes that you make by choosing Undo or
Redo on the application bar.
382
Amazon QuickSight User Guide
Exporting data from analyses
• Autosave is on and there is a service failure, such that your most recent changes can't be saved.
• Autosave is off, you turn it on, and one of the backlogged changes now being saved to the server
conflicts with another user's changes.
In this case, Amazon QuickSight gives you the option to do one of two things. You can either let Amazon
QuickSight turn Autosave off and continue working in unsaved mode, or reload the analysis from the
server and then redo your most recent changes.
If your client authentication expires while you are editing an analysis, you are directed to sign in again.
On successful sign-in, you are directed back to the analysis where you can continue working normally.
If your permissions on the analysis are revoked while you are editing it, you can't make any further
changes.
You can export data from an analysis to a CSV or PDF file. See the following sections for more
information.
1. Open Amazon QuickSight and choose Analyses on the navigation pane at left.
2. Open the analysis that you want to export.
3. At upper right, choose Export, Download as PDF. The download is prepared in the background.
When the file is ready to download, a message appears saying Your PDF is ready..
4. Choose Download now to download the file. Choose Close to close without downloading.
If you close this dialog box without downloading the file and want to recreate the file, repeat the
previous step. Also, the downloadable file is available only temporarily. If you wait too long to
download it, the file expires. If this happens, QuickSight instead displays an error message saying
that the request has expired.
5. Repeat the previous steps for each sheet that you want to export.
The process for exporting to a PDF works the same way in both dashboards and analyses.
You can also attach a PDF to dashboard email reports. For more information, see Sending reports by
email (p. 754).
383
Amazon QuickSight User Guide
Deleting an analysis
Deleting an analysis
You can delete an analysis by using the All analyses tab of the Amazon QuickSight start page. Deleting
an analysis doesn't affect any dashboards that are based on that analysis.
To remove an analysis, choose the details icon (⋮) on the analysis, and choose Delete. Confirm your choice
by choosing Delete again. You can't undo this action.
Adding sheets
A sheet is a set of visuals that are viewed together in a single page. When you create an analysis, you
place visuals in the workspace on a sheet. You can imagine this as a sheet from a newspaper, except that
it is filled with data visualizations. You can add more sheets, and make them work separately or together
in your analysis.
The top sheet, also called the default sheet, is the one on the far left. This sheet displays on top in an
analysis or dashboard. Each analysis can contain 30 (default) to 50 sheets.
You can share analyses and publish dashboards with multiple sheets. However, scheduled email reports
only include the top sheet in an analysis.
• To add a new sheet, choose the plus-sign (+) to the right of the sheet tabs.
• To rename a sheet, choose the name of the sheet and start typing. Rename is also available from the
sheet menu ( ).
•
To duplicate a sheet, choose the name of the sheet, then choose Duplicate from the sheet menu ( ).
You can only duplicate a sheet if Autosave is turned on.
•
To delete a sheet, choose the name of the sheet, then choose Delete from the sheet menu ( ). You
can't delete the sheet if it's the only sheet in the analysis.
• To change the order of the sheets, choose the name of the sheet and drag it to a new position.
• To copy a visual to a new sheet, choose Duplicate visual to from the on-visual menu. Then choose the
target sheet. Filters exist only on the sheet that you create them on. To duplicate filters, recreate them
on the target sheet.
You can use the parameter controls on the top sheet to control multiple sheets. To do this, open each
sheet that you want to work with the parameter. Then add a filter that uses the same parameter used
in the control on the top sheet. Or, if you want a new sheet to operate independently, you can add
parameters and parameter controls to it that are separate from those on the top sheet.
After you have created a visual, you can modify it in a range of ways to customize it to your needs.
Possible customizations include changing what fields map to visual elements, changing the visual type,
sorting visual data, or applying a filter.
384
Amazon QuickSight User Guide
Fields as dimensions and measures
Amazon QuickSight supports up to 50 datasets in a single analysis, and up to 30 visuals in a single sheet,
and a limit of 20 sheets per analysis.
You can create a visual in several ways. You can select the fields that you want and use AutoGraph to
let Amazon QuickSight determine the most appropriate visual type. Or you can choose a specific visual
type and choose fields to populate it. If you aren't sure what questions your data can answer for you, you
can choose Suggested on the tool bar and choose a visual that Amazon QuickSight suggests. Suggested
visuals are ones that we think are of interest, based on a preliminary examination of your data. For more
information about AutoGraph, see Using AutoGraph (p. 391).
You can add more visuals to the workspace by choosing Add, then Add visual. Visuals created after
June 21, 2018, are smaller in size, fitting two on each row. You can resize the visuals and drag them to
rearrange them.
To create a useful visual, it helps to know what question you are trying to answer as specifically as
possible. It also helps to use the smallest dataset that can answer that question. Doing so helps you
create simpler visuals that are easier to analyze.
Field limitations
You can only use one date field per visual. This limitation applies to all visual types.
You can't use the same field for more than one dimension field well or drop target on a visual. For more
information about how expected field type is indicated by field wells and drop targets, see Using visual
field controls (p. 548).
Adding a visual
Use the following procedure to create a new visual.
1. On the Amazon QuickSight start page, choose the analysis that you want to add a visual to.
2. On the analysis page, choose the dataset that you want to use from the dataset list at the top of the
Fields list pane. For more information, see Adding a dataset to an analysis (p. 123).
385
Amazon QuickSight User Guide
Adding a visual
3. Choose Add on the application bar, and then choose Add visual.
• Choose the fields to use from the Fields list pane at left. If the Fields list isn't visible, choose
Visualize to display it. Amazon QuickSight creates the visual, using the visual type it determines is
most compatible with the data you selected.
• Create a visual by choosing a visual type and then choosing fields to populate it.
1. Choose the icon of a visual type from the Visual types pane.
2. From the Fields list pane, drag the fields that you want to use to the appropriate field wells.
Typically, you want to use dimension or measure fields as indicated by the color of the target
field well. If you choose to use a dimension field to populate a Value field well, the Count
aggregate function is automatically applied to it to create a numeric value.
Amazon QuickSight creates the visual using the visual type you selected.
• Create a visual using a suggestion.
386
Amazon QuickSight User Guide
Visual types
Topics
• Measures and dimensions in visuals (p. 387)
• Display limits in visuals (p. 388)
• Using AutoGraph (p. 391)
• Using bar charts (p. 392)
• Using box plots (p. 399)
• Using combo charts (p. 400)
• Using custom visual content in Amazon QuickSight (p. 404)
• Using donut charts (p. 408)
• Using funnel charts (p. 410)
• Using gauge charts (p. 411)
• Using heat maps (p. 413)
• Using histograms (p. 415)
• Using KPIs (p. 421)
• Using line charts (p. 423)
• Creating maps and geospatial charts (p. 433)
• Using pie charts (p. 442)
• Using pivot tables (p. 444)
• Using Sankey diagrams in Amazon QuickSight (p. 478)
• Using scatter plots (p. 486)
• Using tables as visuals (p. 488)
• Using tree maps (p. 490)
• Using waterfall charts (p. 492)
• Using word clouds (p. 493)
We use the term dimension to refer to text or date fields that can be items, like products, or attributes
that are related to measures and can be used to partition them. Examples are sales date for sales figures
or product manufacturer for customer satisfaction numbers. Amazon QuickSight automatically identifies
a field as a measure or a dimension based on its data type.
Numeric fields can act as dimensions, for example ZIP codes and most ID numbers. It's helpful to give
such fields a string data type during data preparation. This way, Amazon QuickSight understands that
they are to be treated as dimensions and are not useful for performing mathematical calculations.
You can change whether a field is displayed as a dimension or measure on an analysis-by-analysis basis
instead. For more information, see Fields as dimensions and measures (p. 385).
387
Amazon QuickSight User Guide
Visual types
The number of data points supported varies by visual type. To learn more about display limits for a
particular visual type, see the topic for that type.
The visual title identifies the number of data points displayed if you have reached the display limit for
that visual type. If you have a large dataset and want to avoid running into the visual display limit, use
one or more filters to reduce the amount of data displayed. For more information about using filters with
visuals, see Filtering data in Amazon QuickSight (p. 324).
You can also choose to limit how many data points you want to display in your visual, before they are
added to the other category. This category contains the aggregated data for all the data beyond the
cutoff limit for the visual type you are using—either the one you impose, or the one based on display
limits. You can use the on-visual menu to choose whether to display the other category. The other
category doesn't show on scatter plots, heat maps, maps, tables (tabular reports), or key performance
indicators (KPIs). It also doesn't show on line charts when the x-axis is a date. Drilling down into the
other category is not supported.
388
Amazon QuickSight User Guide
Visual types
1. On the analysis page, choose the visual that you want to modify.
2. Choose the on-visual menu at the upper-right corner of the visual, and then choose Hide "other"
category or Show "other" category, as appropriate.
389
Amazon QuickSight User Guide
Visual types
To find this setting, choose the v-shaped on-visual menu, then choose Format visual. You can use the
following table to determine which field well contains the data point setting and what number of data
points the visual type displays by default.
390
Amazon QuickSight User Guide
Visual types
Topics
• Using AutoGraph (p. 391)
• Using bar charts (p. 392)
• Using box plots (p. 399)
• Using combo charts (p. 400)
• Using custom visual content in Amazon QuickSight (p. 404)
• Using donut charts (p. 408)
• Using funnel charts (p. 410)
• Using gauge charts (p. 411)
• Using heat maps (p. 413)
• Using histograms (p. 415)
• Using KPIs (p. 421)
• Using line charts (p. 423)
• Creating maps and geospatial charts (p. 433)
• Using pie charts (p. 442)
• Using pivot tables (p. 444)
• Using Sankey diagrams in Amazon QuickSight (p. 478)
• Using scatter plots (p. 486)
• Using tables as visuals (p. 488)
• Using tree maps (p. 490)
• Using waterfall charts (p. 492)
• Using word clouds (p. 493)
Using AutoGraph
AutoGraph isn't a visual type itself, but instead lets you tell Amazon QuickSight to choose the visual type
for you. When you create a visual by choosing AutoGraph and then selecting fields, Amazon QuickSight
uses the most appropriate visual type for the number and data types of the fields you select.
391
Amazon QuickSight User Guide
Visual types
• Single-measure - a single-measure bar chart shows values for a single measure for a dimension. For
example, the revenue goal per region, as shown in the following image.
• Multi-measure - a multi-measure bar chart shows values for multiple measure for a dimension. For
example, the revenue goal and cost per region, as shown in the following image.
• Clustered - a clustered bar chart shows values for a single measure for a dimension, grouped by
another dimension. For example, the cost for each channel in a region, as shown in the following
image.
• Stacked - a stacked bar chart is similar to a clustered bar chart in that it displays a measure for two
dimensions. However, instead of clustering bars for each child dimension by the parent dimension,
it displays one bar per parent dimension. It uses color blocks within the bars to show the relative
values of each item in the child dimension. The color blocks reflect the value of each item in the
child dimension relative to the total for the measure. A stacked bar chart uses a scale based on the
maximum value for the selected measure. For example, the revenue goal for each segment by region,
as shown in the following image.
392
Amazon QuickSight User Guide
Visual types
• Stacked 100 percent - a stacked 100 percent bar chart is similar to a stacked bar chart. However,
in a stacked 100 percent bar chart, the color blocks reflect the percentage of each item in the child
dimension, out of 100 percent. For example, the percent each segment costs per region, as shown in
the following image.
Bar charts show up to 2,500 data points on the axis for visuals that don't use group or color. For visuals
that do use group or color, they show up to 50 data points on the axis and up to 50 data points for group
or color. For more information about how Amazon QuickSight handles data that falls outside display
limits, see Display limits in visuals (p. 388).
393
Amazon QuickSight User Guide
Visual types
4. From the Fields list pane, drag a dimension to the X-axis or Y-axis field well.
5. From the Fields list pane, drag a measure to the Value field well.
394
Amazon QuickSight User Guide
Visual types
4. From the Fields list pane, drag a dimension to the X-axis or Y-axis field well.
5. From the Fields list pane, drag two or more measures to the Value field well.
395
Amazon QuickSight User Guide
Visual types
4. From the Fields list pane, drag a dimension to the X-axis or Y-axis field well.
5. From the Fields list pane, drag a measure to the Value field well.
6. From the Fields list pane, drag a dimension to the Group/Color field well.
396
Amazon QuickSight User Guide
Visual types
4. From the Fields list pane, drag a dimension to the X-axis or Y-axis field well.
5. From the Fields list pane, drag a dimension to the Group/Color field well.
6. From the Fields list pane, drag a measure to the Value field well.
7. (Optional) Add data labels and show totals:
a. On the menu in the upper-right corner of the visual, choose the Format visual icon.
b. In the Format visual pane that opens at left, choose Data labels.
c. Select Show data labels.
Labels for each measure value appear in the chart and the option to show totals appears in the
pane.
d. Choose Show totals.
397
Amazon QuickSight User Guide
Visual types
4. From the Fields list pane, drag a dimension to the X-axis or Y-axis field well.
5. From the Fields list pane, drag two or more measures to the Value field well.
398
Amazon QuickSight User Guide
Visual types
Sorting Yes You can sort on the fields you Sorting visual data in Amazon
choose for the axis and the QuickSight (p. 571)
values.
Adding drill- Yes You can add drill-down levels Adding drill-downs to
downs to the axis and Group/Color visual data in Amazon
field wells. QuickSight (p. 152)
Showing stacked Yes Showing totals in a stacked bar Stacked bar charts (p. 396)
bar chart totals chart is only available when
you choose to show data labels.
Outliers are extreme data points that aren't included in the calculation of a box plot's key values. Because
outliers are calculated separately, their data points don't appear immediately after a box plot is created.
Box plots display up to 10,000 data points. If a dataset contains more than 10,000 data points, a warning
appears at the upper-right corner of the visual.
Box plots support up to five metrics and one group-by, but don't render if duplicate metrics are supplied.
Box plots support some calculated fields, but not all. Any calculated field that uses a window function,
for example avgOver, results in a SQL error.
Box plot visuals aren't compatible with MySQL 5.3 and earlier.
399
Amazon QuickSight User Guide
Visual types
• To create a new analysis, choose New analysis at upper right. For more information, see Starting
an analysis in Amazon QuickSight (p. 379).
• To use an existing analysis, choose the analyses that you want to edit.
4. Choose Add, Add visual.
5. At lower left, choose the box plot icon from Visual types.
6. On the Fields list pane, choose the fields that you want to use for the appropriate field wells. Box
plots require at least one unique measure field.
7. (Optional) Add drill-down layers by dragging one or more additional fields to the Group/Color
field well. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
To understand the features supported by box plots, see Format options available
in analytics (p. 536). For customization options, see Formatting visuals in Amazon
QuickSight (p. 496).
400
Amazon QuickSight User Guide
Visual types
• Clustered bar combo charts – display sets of single-color bars where each set represents a parent
dimension and each bar represents a child dimension. Use this chart to make it easy to determine
values for each bar.
• Stacked bar combo charts – display multi-color bars where each bar represents a parent dimension
and each color represents a child dimension. Use this chart to make it easy to see relationships
between child dimensions within a parent dimension. This chart shows the total value for the
parent dimension and how each child adds to the total value. To determine the value for each child
dimension, the chart reader must compare the size of the color section to the data labels for that axis.
Both types of combo chart require only one dimension on the X axis, but are usually more effective when
also displaying at least one measure under Lines.
Use a combo chart only if you want to show a relationship between the bars and the lines. A good rule
of thumb is that if you need to explain how the two chart types relate, you should probably use two
separate charts instead.
Because each chart works differently, it can be helpful to understand the following points before you
begin:
• The data points in each series render on different scales. Combo charts use a scale based on the
maximum value for the selected measure.
• The distance between the numbers on the axis won't match between the lines and bars, even if you
select the same scale for each chart type.
• For clarity, try to use different units for the measure in each data series.
The combo chart is like using two different types of visualization at the same time. Make sure that the
data in the bars (or columns) directly relates to the data in the line or lines. This relationship is not
technically enforced by the tool, so it's essential that you determine this relationship yourself. Without
some relation between the lines and bars, the visual loses meaning.
You can use the combo chart visual type to create a single-measure or single-line chart. A single-measure
combo chart shows one measure for one dimension.
401
Amazon QuickSight User Guide
Visual types
To create a multi-measure chart, you can choose to add multiple lines, or multiple bars. A multi-measure
bar chart shows two or more measures for one dimension. You can group the bars in clusters, or stack
them.
For the bars, use a dimension for the axis and a measure for the value. The dimension is typically a text
field that is related to the measure in some way and can be used to segment it to see more detailed
information. Each bar in the chart represents a measure value for an item in the dimension you chose.
Bars and lines show up to 2,500 data points on the axis for visuals that don't use group or color. For
visuals that do use group or color, bars show up to 50 data points on the axis and up to 50 data points
for group or color, while lines show 200 data points on the axis and up to 25 data points for group or
color. For more information about how Amazon QuickSight handles data that falls outside display limits,
see Display limits in visuals (p. 388).
Changing the axis Yes You can set the range for the Changing range and scale in
range axis. your visuals (p. 530)
402
Amazon QuickSight User Guide
Visual types
Sorting Yes You can sort on the fields you Sorting visual data in Amazon
choose for the axis and the QuickSight (p. 571)
values.
Adding drill- Yes You can add drill-down levels Adding drill-downs to
downs to the axis and Group/Color visual data in Amazon
field wells. QuickSight (p. 152)
Synchronizing y- Yes Synchronize the y-axes for both Changing range and scale in
axis bars and lines into a single axis. your visuals (p. 530)
403
Amazon QuickSight User Guide
Visual types
5. (Optional) Add drill-down layers by dragging one or more additional fields to the X axis or Group/
Color field wells. For more information about adding drill-downs, see Adding drill-downs to visual
data in Amazon QuickSight (p. 152).
For example, you can embed the image of your company logo in your dashboards. You can also embed
an online video from your organization's latest conference, or embed an online form asking readers of
the dashboard if the dashboard is helpful.
404
Amazon QuickSight User Guide
Visual types
After you create custom visual content, you can use navigation actions to navigate within them. You can
also use parameters to control what appears in them.
To embed a webpage, video, online form, or image in your dashboard, choose the custom visual content
icon in the Visual types pane, as shown in the following image.
For more information about adding visuals to a dashboard, see Adding a visual (p. 385).
Use the following procedures to learn how to embed custom visuals in your dashboards.
• Choose web content from sources that support viewing or opening the content in an IFrame. If the
source of the web content doesn't support being viewed or opened in an IFrame, the content doesn't
appear in QuickSight, even if the URL is accurate.
• When possible, use embeddable URLs, especially for videos, online forms, spreadsheets, and
documents. Embeddable URLs create a better experience for readers of your dashboard and make
interacting with the content easier. You can usually find the embeddable URL for content when you
choose to share the content from the source website.
• To embed internal URLs or URLs that you own, you might need to set them to be opened in an IFrame.
• When viewing custom visual content in an analysis or dashboard, make sure you enable all cookies.
Blocking third party cookies results in images not loading in QuickSight.
Embedded images don't appear in a browser that has third-party cookies blocked. To see embedded
images in a dashboard, enable third-party cookies in your browser settings.
1. In the Visual types pane, choose the custom visual content icon.
2. In the visual, choose Customize visual.
3. In the Format visual pane that opens, under Custom content, enter the image URL for the image
that you want to embed.
4. Choose Apply.
405
Amazon QuickSight User Guide
Visual types
If the URL is not an image, such as a URL to a slide show, gallery, or webpage, the following message
appears: This URL doesn't appear to be an image. Update the URL to an image. To
do so, open the image that you want to embed in a separate browser tab, or choose an embeddable
URL for the image (usually found when you choose to share the image).
6. (Optional) For Image sizing options, choose one of the following options:
• Fit to width – This option fits the image to the width of the visual.
• Fit to height – This option fits the image to the height of the visual.
• Scale to visual – This option scales the image to the width and height of the visual. This option
might contort the image.
• Do not scale – This option keeps the image at its original scale and doesn't fit the image to the
dimensions of the visual. With this option, the image is centered in the visual and the parts of the
image that are within the width and height of the visual appear. Some parts of the image might
not appear if the visual is smaller than the image. If the visual is larger than the image, however,
the image is centered in the visual and is surrounded by white space.
1. In the Visual types pane, choose the custom visual content icon.
2. In the visual, choose Customize visual.
3. In the Format visual pane that opens, under Custom content, enter the form URL for the online
form that you want to embed.
If possible, use an embeddable URL for the form. Using an embeddable URL creates a better
experience for readers of your dashboard who might want to interact with the form. You can often
find the embeddable URL when you choose to share the form on the site where you create it.
4. Choose Apply.
406
Amazon QuickSight User Guide
Visual types
1. In the Visual types pane, choose the custom visual content icon.
2. In the visual, choose Customize visual.
3. In the Format visual pane that opens, under Custom content, enter the URL for the webpage that
you want to embed.
4. Choose Apply.
1. In the Visual types pane, choose the custom visual content icon.
2. In the visual, choose Customize visual.
3. In the Format visual pane that opens, under Custom content, enter the embeddable URL for the
video that you want to embed.
To find the embeddable URL for a video, share the video and copy the embed URL from IFrame code.
The following is an example of an embed URL for a YouTube video: https://www.youtube.com/
embed/uniqueid. For a Vimeo video, the following is an example of an embed URL: https://
player.vimeo.com/video/uniqueid.
4. Choose Apply.
407
Amazon QuickSight User Guide
Visual types
Each wedge in a donut chart represents one value in a dimension. The size of the wedge represents
the proportion of the value for the selected measure that the item represents compared to the whole
for the dimension. Donut charts are best when precision isn't important and there are few items in the
dimension.
To learn how to use donut charts in Amazon QuickSight, you can watch this video:
408
Amazon QuickSight User Guide
Visual types
To create a donut chart, use one dimension in the Group/Color field well. With only one field, the chart
displays the division of values by row count. To display the division of dimension values by a metric
value, you can add a metric field to the Value field well.
Donut charts show up to 20 data points for group or color. For more information about how Amazon
QuickSight handles data that falls outside display limits, see Display limits in visuals (p. 388).
Sorting Yes You can sort on the field that Sorting visual data in Amazon
you choose for the value or the QuickSight (p. 571)
group or color.
Adding drill- Yes You can add drill-down levels Adding drill-downs to
downs to the Group/Color field well. visual data in Amazon
QuickSight (p. 152)
Choosing size Yes You can choose how thick the Formatting visuals in Amazon
donut chart is: small, medium, QuickSight (p. 496)
and large.
409
Amazon QuickSight User Guide
Visual types
Showing totals Yes You can choose to display Formatting visuals in Amazon
or hide the aggregate of the QuickSight (p. 496)
Value field. By default, this
displays the total count of the
Group/Color field, or the total
sum of the Value field.
To create a donut chart, drag a dimension to the Group/Color field well. Optionally, drag a measure
to the Value field well.
5. (Optional) Add drill-down layers by dragging one or more additional fields to the Group/Color
field well. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
Funnel charts are often useful in business contexts because you can view trends or potential problem
areas in each stage, such as bottlenecks. For example, they can help you visualize the amount of the
potential revenue in each stage of a sale, from first contact to final sale and on through maintenance.
1. Open Amazon QuickSight and choose Analyses on the navigation pane at left.
2. Choose one of the following:
• To create a new analysis, choose New analysis at upper right. For more information, see Starting
an analysis in Amazon QuickSight (p. 379).
410
Amazon QuickSight User Guide
Visual types
• To use an existing analysis, choose the analysis that you want to edit.
3. Choose Add (+), Add Visual.
4. At lower left, choose the funnel chart icon from Visual types.
5. On the Fields list pane, choose the fields that you want to use for the appropriate field wells. Funnel
charts require one dimension in Group.
6. (Optional) Add drill-down layers by dragging one or more additional fields to the Group/Color
field well. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
To understand the features supported by funnel charts, see Format options available
in analytics (p. 536). For customization options, see Formatting visuals in Amazon
QuickSight (p. 496).
A gauge chart is similar to a nondigital gauge, for example a gas gauge in an automobile. It displays
how much there is of the thing you are measuring. In a gauge chart, this measurement can exist alone
or in relation to another measurement. Each color section in a gauge chart represents one value. In the
following example, we are comparing actual sales to the sales goal, and the gauge shows that we must
sell an additional 33.27% to meet the goal.
To learn how to use gauge charts in Amazon QuickSight, you can watch this video:
411
Amazon QuickSight User Guide
Visual types
To create a gauge chart, you need to use at least one measure. Put the measure in the Value field well.
If you want to compare two measures, put the additional measure in the Target value field well. If you
want to compare a single measure to a target value that isn't in your dataset, you can use a calculated
field that contains a fixed value.
You can choose a variety of formatting options for the gauge chart, including the following settings in
Format visual.
• Value displayed – Hide value, display actual value, or display a comparison of two values
• Comparison method – Compare values as a percent, the actual difference between values, or
difference as a percent
• Axis style –
• Show axis label – Show or hide the axis label
• Range – The numeric minimum and maximum range to display in the gauge chart
• Reserve padding (%) – Added to the top of the range (target, actual value, or max)
• Arc style – Degrees the arc displays (180° to 360°)
• Thickness – Thickness of the arc (small, medial, or large)
Changing the Yes The foreground color the filled Changing colors on visuals in
visual colors area; it represents the Value. Amazon QuickSight (p. 499)
The background color the
unfilled area; it represents the
Target value if one is selected.
412
Amazon QuickSight User Guide
Visual types
Focusing on No
or excluding
elements
Adding drill- No
downs
Each rectangle on a heat map represents the value for the specified measure for the intersection of the
selected dimensions. Rectangle color represents where the value falls in the range for the measure, with
darker colors indicating higher values and lighter colors indicating lower ones.
Heat maps and pivot tables display data in a similar tabular fashion. Use a heat map if you want to
identify trends and outliers, because the use of color makes these easier to spot. Use a pivot table if
you want to further analyze data on the visual, for example by changing column sort order or applying
aggregate functions across rows or columns.
To create a heat map, choose at least two fields of any data type. Amazon QuickSight populates the
rectangle values with the count of the x-axis value for the intersecting y-axis value. Typically, you choose
a measure and two dimensions.
For example, the following heat map shows which products are most used by the customers in these
countries, measured by a simple count.
413
Amazon QuickSight User Guide
Visual types
Heat maps show up to 50 data points for rows and up to 50 data points for columns. For more
information about how Amazon QuickSight handles data that falls outside display limits, see Display
limits in visuals (p. 388).
414
Amazon QuickSight User Guide
Visual types
Sorting Yes You can sort by the fields you Sorting visual data in Amazon
choose for the columns and the QuickSight (p. 571)
values.
Adding drill- Yes You can add drill-down levels Adding drill-downs to
downs to the Rows and Columns field visual data in Amazon
wells. QuickSight (p. 152)
To create a heat map, drag a dimension to the Rows field well, a dimension to the Columns field
well, and a measure to the Values field well.
5. (Optional) Add drill-down layers by dragging one or more additional fields to the Rows or Columns
field wells. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
Using histograms
Use a histogram chart in Amazon QuickSight to display the distribution of continuous numerical values
in your data. Amazon QuickSight uses un-normalized histograms, which use an absolute count of the
data points or events in each bin.
To create a histogram, you use one measure. A new histogram initially displays ten bins (also called
buckets) across the X-axis. These appear as bars on the chart. You can customize the bins to suit your
dataset. The Y-axis displays the absolute count of the values in each bin.
415
Amazon QuickSight User Guide
Visual types
Make sure that you adjust the format settings so that you have a clearly identifiable shape. If your data
contains outliers, this becomes clear if you spot one or more values off to the side of the X-axis. For
information about how Amazon QuickSight handles data that falls outside display limits, see Display
limits in visuals (p. 388).
Histogram features
To understand the features supported by histograms, use the following table.
416
Amazon QuickSight User Guide
Visual types
Focusing on No
or excluding
elements
Sorting No
Adding drill- No
downs
Creating a histogram
Use the following procedure to create a histogram.
To create a histogram
4. On the Fields list pane, choose the field that you want to use in the Value field well. A Count
aggregate is automatically applied to the value.
• The X-axis displays 10 bins by default, representing the intervals in the measure that you choose.
You can customize the bins in the next step.
• The Y-axis displays the absolute count of individual values in each bin.
5. (Optional) Choose Format on the visual control to change the histogram format. You can format the
bins either by count or width, not both together. The count setting changes how many bins display.
The width setting changes how wide or long of an interval each bin contains.
Formatting a histogram
Use the following procedure to format a histogram.
417
Amazon QuickSight User Guide
Visual types
To format a histogram
1. Choose the histogram chart that you want to work with. It should be the highlighted selection. The
visual controls display on the top right of the histogram.
2. Choose the cog icon on the visual control menu to view the Format visual options.
3. On the Format visual pane, set the following options to control the display of the histogram:
Amazon QuickSight displays up to 100 bins (buckets) by default. If you want to display more (up
to 1,000), change the X-axis setting for Number of data points displayed.
• Enable Logarithmic scale in the Y-axis settings.
Sometimes your data doesn't fit the shape that you want and this can provide misleading
results. For example, if the shape is skewed so far to the right that you can't read it properly, you
can apply a log scale to it. Doing this doesn't normalize your data; however, it does reduce the
skew.
• Display Data labels.
You can enable the display of data labels to see the absolute counts in the chart. Even if you
don't want to display these in most cases, you can enable them while you're developing an
analysis. The labels can help you decide on formatting and filtering options because they reveal
counts in bins that are too small to stand out.
To see all the data labels, even if they overlap, enable Allow labels to overlap.
4. (Optional) Change other visual settings. For more information, see Formatting visuals in Amazon
QuickSight (p. 496).
Understanding histograms
Although histograms look similar to bar charts, they are very different. In fact, the only similarity is their
appearance because they use bars. On a histogram, each bar is called a bin or a bucket.
Each bin contains a range of values called an interval. When you pause on one of the bins, details about
the interval appear in a tooltip that shows two numbers enclosed in glyphs. The type of enclosing glyphs
indicates if the numbers inside them are part of the interval that's inside the selected bin, as follows:
For example, let's say that the first bar in a histogram displays the following notation.
[1, 10)
418
Amazon QuickSight User Guide
Visual types
The square bracket means that the number 1 is included in the first interval. The parenthesis means that
the number 10 is excluded.
[10, 20)
In this case, 10 is included in the second interval, and 20 is excluded. The number 10 can't exist in both
intervals, so the notation shows us which one includes it.
Note
The pattern used for marking intervals in a histogram comes from standard mathematical
notation. The following examples show the possible patterns, using a set of numbers that
includes 10, 20, and every number in between.
• [10, 20] – This set is closed. It has hard boundaries on both ends.
• [10, 21) – This set is half open. It has a hard boundary on the left and a soft boundary on the
right.
• (9, 20] – This set is half open. It has a soft boundary on the left and a hard boundary on the
right.
• (9, 21) – This set is open. It has soft boundaries on both ends.
Because the histogram uses quantitative data (numbers) rather than qualitative data, there's a logical
order to the distribution of the data. This is called a shape. The shape is often described the qualities
the shape possesses, based on the count in each bin. Bins that contain a higher number of values form a
peak. Bins that contain a lower number of values form a tail on the edge of a chart, and a valley between
peaks. Most histograms fall into one of the following shapes:
• Asymmetrical or skewed distributions have values that cluster near the left or the right—the low or
high end of the X-axis. The direction of skewness is defined by where the longer tail of the data is,
not by where the peak is. It's defined this way because this direction also describes the location of the
mean (average). In skewed distributions, the mean and the median are two different numbers. The
different types of skewed distribution are as follows:
• Negatively skewed or left skewed – A chart that has the mean to the left of the peak. It has a longer
tail to the left and a peak to the right, sometimes followed by a shorter tail. The following histogram
displays a left skewed distribution.
• Positively skewed or right skewed – A chart that has the mean to the right of the peak. It has a
longer tail to the right and a peak to the left, sometimes preceded by a shorter tail. The following
histogram displays a right skewed distribution.
419
Amazon QuickSight User Guide
Visual types
• Symmetrical or normal distributions have a shape that's mirrored on each side of a center point (for
example, a bell curve). In a normal distribution, the mean and the median are the same value. The
different types of normal distribution are as follows:
• Normal distribution, aka unimodal – A chart that has one central peak representing the most
common value. This is commonly called a bell curve, or a Gaussian distribution. The following
histogram displays a normal distribution.
• Bimodal – A chart that has two peaks representing the most common values. The following
histogram displays a bimodal distribution.
• Multimodal – A chart that has three or more peaks representing the most common values. The
following histogram displays a multimodal distribution.
• Uniform – A chart that has no peaks or valleys, with a relatively equal distribution of data. The
following histogram displays a uniform distribution.
420
Amazon QuickSight User Guide
Visual types
The following table shows how a histogram differs from a bar chart.
A histogram displays the distribution of values in A bar chart compares the values in one field,
one field. grouped by dimension.
A histogram sorts values into bins that represent a A bar chart plots values that are grouped into
range of values, for example 1–10, 10–20, and so categories.
on.
The sum of all bins equals exactly 100% of the A bar chart isn't required to display all of the
values in the filtered data. available data. You can change display settings
at the visual level. For example, a bar chart might
show only the top 10 categories of data.
Rearranging bars detracts from the meaning of Bars can be in any order without changing the
the chart as a whole. meaning of the chart as a whole.
There are no spaces between the bars, to There are spaces between the bars, to represent
represent the fact this is continuous data. the fact that this is categorical data.
If a line is included in a histogram, it represents If a line is included in a bar chart, it's called a
the general shape of the data. combo chart, and the line represents a different
measure than the bars.
Using KPIs
Use a key performance indicator (KPI) to visualize a comparison between a key value and its target value.
A KPI displays a value comparison, the two values being compared, and a progress bar. For example, the
following KPI shows how closely revenue is meeting its forecast.
421
Amazon QuickSight User Guide
Visual types
KPI features
To understand the features supported by the KPI visual type in Amazon QuickSight, use the following
table.
422
Amazon QuickSight User Guide
Visual types
Creating a KPI
Use the following procedure to create a KPI.
To create a KPI
To create a KPI, drag a measure to the Value field well. To compare that value to a target value, drag
a different measure to the Target value field well.
4. (Optional) Choose formatting options by selecting the on-visual menu at the upper-right corner of
the visual, then choosing Format visual.
• One measure over a period of time, for example gross sales by month.
• Multiple measures over a period of time, for example gross sales and net sales by month.
• One measure for a dimension over a period of time, for example number of flight delays per day by
airline.
Line charts show the individual values of a set of measures or dimensions against the range displayed by
the Y axis. Area line charts differ from regular line charts in that each value is represented by a colored
area of the chart instead of just a line, to make it easier to evaluate item values relative to each other.
423
Amazon QuickSight User Guide
Visual types
The following screenshot shows an area line chart. In this version of a line chart, the area between the
line and the x-axis is filled with color.
424
Amazon QuickSight User Guide
Visual types
The following screenshot shows a stacked area line chart. In this version of a line chart, the area between
the line and the X axis is filled with color. Also, the individual lines are layered to more clearly show the
relationships between them. The values on the y-axis show the scale of the differences between data
points.
Because a stacked area line chart works differently than other line charts, simplify it if you can. Then
the audience won't try to interpret the numbers. Instead, they can focus on the relationships of each set
of values to the whole. One way to simplify is to remove the numbers down the left side of the screen
by reducing the step size for the axis. To do this, choose the Options icon from the on-visual menu. In
Format Options under Y-axis, enter 2 as the Step size. The following screenshot shows the result.
425
Amazon QuickSight User Guide
Visual types
Each line on the chart represents a measure value over a period of time. You can interactively view the
values on the chart, as shown in the following screenshot. Hover over any line (1 in the screenshot) to see
a pop-up legend that shows the values for each line on the X axis. If you hover over a data point (2), you
can see the Value for that specific point on the X axis.
Use line charts to compare changes in values for one or more measures or dimensions over a period of
time.
426
Amazon QuickSight User Guide
Visual types
In regular line charts, each value is represented by a line, and in area line charts each value is represented
by a colored area of the chart.
Use stacked area line charts to compare changes in values for one or more groups of measures or
dimensions over a period of time. Stacked area line charts show the total value for each group on the x-
axis. They use color segments to show the values of each measure or dimension in the group.
Line charts show up to 10,000 data points on the x-axis when no color field is selected. When color is
populated, line charts show up to 400 data points on the x-axis and up to 25 data points for color. For
more information about data that falls outside the display limit for this visual type, see Display limits in
visuals (p. 388).
Changing the axis Yes You can set the range for the Y Changing range and scale in
range axis. your visuals (p. 530)
427
Amazon QuickSight User Guide
Visual types
Sorting Yes, with You can sort data for numeric Sorting visual data in Amazon
exceptions measures in the X axis and QuickSight (p. 571)
Value field wells. Other data
is automatically sorted in
ascending order.
Adding drill- Yes You can add drill-down levels Adding drill-downs to
downs to the X axis and Color field visual data in Amazon
wells. QuickSight (p. 152)
• To create a single-measure line chart, drag a dimension to the X axis field well and one measure to
the Value field well.
428
Amazon QuickSight User Guide
Visual types
• To create a multi-measure line chart, drag a dimension to the X axis field well and two or more
measures to the Value field well. Leave the Color field well empty.
• To create a multi-dimension line chart, drag a dimension to the X axis field well, one measure to
the Value field well, and one dimension to the Color field well.
5. (Optional) Add drill-down layers by dragging one or more additional fields to the X axis or Color
field wells. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
A dual-axis chart is a chart with two Y-axes (one axis at the left of the chart, and one axis at the right of
the chart). For example, let's say you create a line chart. It shows the number of visitors who signed up
for a mailing list and for a free service over a period of time. If the scale between those two measures
varies widely over time, your chart might look something like the following line chart. Because the scale
between measures varies so greatly, the measure with the smaller scale appears nearly flat at zero.
If you want to show these measures in the same chart, you can create a dual-axis line chart. The
following is an example of the same line chart with two Y-axes.
429
Amazon QuickSight User Guide
Visual types
1. In your analysis, create a line chart. For more information about creating line charts, see Creating a
line chart (p. 428).
2. In the Value field well, choose a field drop-down menu, choose Show on: Left Y-axis, and then
choose Right Y-axis.
Or you can create a dual-axis line chart using the Format Visual pane:
a. On the menu in the upper-right corner of the line chart, choose the Format visual icon.
430
Amazon QuickSight User Guide
Visual types
b. In the Format visual pane that opens at left, choose Data series.
c. In the Data series section, choose the Show on right axis icon for the value that you want to
place on a separate axis. Use the search bar to quickly find a value if you need to.
431
Amazon QuickSight User Guide
Visual types
The icon updates to indicate that the value is being shown on the right axis. The chart updates with
two axes.
• To synchronize the Y-axes for both lines back into a single axis, choose Single Y-axis at the top of
the Format visual pane.
• To format the axis at the left of the chart, choose Left Y-axis.
• To format the axis at the right of the chart, choose Right Y-axis.
432
Amazon QuickSight User Guide
Visual types
For more information about formatting axis lines, see Axes and grid lines (p. 531). For more
information about adjusting the range and scale of an axis, see Range and scale (p. 530).
• Make sure that your dataset contains location data. Location data is data that corresponds to
latitudinal and longitudinal values. Location data can include a column for latitude and a column for
longitude in your dataset. It can also include a column with city names. QuickSight can chart latitude
and longitude coordinates. It also recognizes geographic components such as country, state or region,
county or district, city, and ZIP code or postal code.
• Make sure that your location data fields are marked as geospatial data types.
• Consider creating geographic hierarchies.
For more information about working with geospatial data, including changing field data types and
creating geospatial hierarchies, see Adding geospatial data (p. 358).
Topics
• Creating point maps (p. 433)
• Creating filled maps (p. 436)
• Interacting with maps (p. 439)
• Changing base maps (p. 440)
To create point maps in QuickSight, make sure that you have the following:
• One geospatial field (such as country, state or region, county or district, city, or ZIP code or postal
code). Or you can use one latitude field and one longitude field.
• One numeric field (measure) for size.
• (Optional) A categorical field (dimension) for color.
433
Amazon QuickSight User Guide
Visual types
1. Add a new visual to your analysis. For more information about starting analyses, see Starting an
analysis in Amazon QuickSight (p. 379). For more information about adding visuals to analyses, see
Adding a visual (p. 385).
2. For Visual type, choose the Points on map icon. It looks like a globe with a point on it.
3. Drag a geographic field from the Fields list pane to the Geospatial field well, for example Country.
You can also choose a latitude or longitude field.
A point map appears with a point for each location in your data.
If the field is part of a geographic hierarchy, the hierarchy displays in the field well.
434
Amazon QuickSight User Guide
Visual types
4. Drag a measure from the Fields list pane to the Size field well.
The points on the map update to show the magnitude of values for each location.
5. (Optional) Drag a dimension from the Fields list pane to the Color field well.
Each point updates to show a point for each categorical value in the dimension.
435
Amazon QuickSight User Guide
Visual types
To create filled maps in QuickSight, make sure that you have the following:
• One geospatial field (such as country, state or region, county or district, or ZIP code or postal code).
• (Optional) A numeric field (measure) for color.
1. Add a new visual to your analysis. For more information about starting analyses, see Starting an
analysis in Amazon QuickSight (p. 379). For more information about adding visuals to analyses, see
Adding a visual (p. 385).
2. For Visual type, choose the Filled map icon.
436
Amazon QuickSight User Guide
Visual types
3. Drag a geographic field from the Fields list pane to the Location field well, for example Country.
A filled map appears with each location in your data filled in by the number of times they appear in
your dataset (the count).
If the field is part of a geographic hierarchy, the hierarchy displays in the field well.
437
Amazon QuickSight User Guide
Visual types
4. (Optional) Drag a measure from the Fields list pane to the Color field well, for example Sales.
438
Amazon QuickSight User Guide
Visual types
By default, map visuals are always zoomed based on the underlying data. When you pan around in the
map or zoom to a different level, the zoom to data icon appears above the zoom in and out icons at
bottom right of the map. Using this option, you can quickly zoom back to the underlying data.
• Click anywhere on the map visual and drag your cursor in the direction that you want to pan the
map.
• On the map visual, choose the plus or minus icons at bottom right. Or you can double-click the map
to zoom in, and shift-double-click to zoom out.
439
Amazon QuickSight User Guide
Visual types
• On the map visual, choose the zoom to data icon. This icon appears when you pan or zoom in on a
map.
In QuickSight, there are four options for base maps: light gray canvas, dark gray canvas, streets, and
imagery. An example of each appears following:
440
Amazon QuickSight User Guide
Visual types
• Streets
• Imagery
1. Create a point or filled map in an analysis. For more information, see Creating maps and geospatial
charts (p. 433).
2. On the map visual, choose the Format visual icon.
441
Amazon QuickSight User Guide
Visual types
3. In the Format visual pane that opens at left, choose the Base map section and then choose the base
map that you want.
Each wedge in a pie chart represents one item in the dimension. Wedge size represents the proportion of
the value for the selected measure that the item represents compared to the whole for the dimension.
Pie charts are best when precision isn't important and there are few items in the dimension.
442
Amazon QuickSight User Guide
Visual types
To create a donut chart, use one dimension in the Group/Color field well. With only one field, the chart
displays the division of values by row count. To display the division of dimension values by a metric
value, you can add a metric field to the Value field well.
Pie charts show up to 20 data points for group or color. For more information about how Amazon
QuickSight handles data that falls outside display limits, see Display limits in visuals (p. 388).
Sorting Yes You can sort on the field that Sorting visual data in Amazon
you choose for the value or the QuickSight (p. 571)
group or color.
Adding drill- Yes You can add drill-down levels Adding drill-downs to
downs to the Group/Color field well. visual data in Amazon
QuickSight (p. 152)
443
Amazon QuickSight User Guide
Visual types
To create a pie chart, drag a dimension to the Group/Color field well. Optionally, drag a measure to
the Value field well.
5. (Optional) Add drill-down layers by dragging one or more additional fields to the Group/Color
field well. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
Heat maps and pivot tables display data in a similar tabular fashion. Use a heat map if you want to
identify trends and outliers, because the use of color makes these easier to spot. Use a pivot table if you
want to analyze data on the visual.
To create a pivot table, choose at least one field of any data type, and choose the pivot table icon.
Amazon QuickSight creates the table and populates the cell values with the count of the column value
for the intersecting row value. Typically, you choose a measure and two dimensions measurable by that
measure.
Pivot tables support scroll down and right. You can add up to 20 fields as rows and 20 fields as columns.
Up to 500,000 records are supported.
• Specify multiple measures to populate the cell values of the table, so that you can see a range of data
• Cluster pivot table columns and rows to show values for subcategories grouped by related dimension
• Sort values in pivot table rows or columns
• Apply statistical functions
• Add totals and subtotals to rows and columns
• Use infinite scroll
• Transpose fields used by rows and columns
To easily transpose the fields used by the rows and columns of the pivot table, choose the orientation
icon
( )
near the top right of the visual. To see options for showing and hiding totals and subtotals, formatting
the visual, or exporting data to a CSV file, choose the V-shaped icon at top right.
As with all visual types, you can add and remove fields. You can also change the field associated with a
visual element, change field aggregation, and change date field granularity. In addition, you can focus on
444
Amazon QuickSight User Guide
Visual types
or exclude rows or columns. For more information about how to make these changes to a pivot table, see
Changing fields used by a visual in Amazon QuickSight (p. 548).
For information on formatting pivot tables, see Formatting visuals in Amazon QuickSight (p. 496).
Topics
• Pivot table features (p. 445)
• Creating a pivot table (p. 446)
• Orienting pivot table values (p. 447)
• Expanding and collapsing pivot table clusters (p. 449)
• Showing and hiding pivot table columns in Amazon QuickSight (p. 449)
• Sorting pivot tables in Amazon QuickSight (p. 452)
• Using table calculations in pivot tables (p. 458)
• Pivot table limitations (p. 477)
• Pivot table best practices (p. 477)
To understand the features supported by pivot tables, use the following table.
445
Amazon QuickSight User Guide
Visual types
Sorting Yes You can sort fields in the Sorting visual data in Amazon
Rows or Columns field wells QuickSight (p. 571)
alphabetically or by a metric in
ascending or descending order. Sorting pivot tables in Amazon
QuickSight (p. 452)
Exporting or Yes You can export all of the data Exporting data from
copying data to a CSV file. visuals (p. 546)
446
Amazon QuickSight User Guide
Visual types
4. From the Fields list pane, choose the fields that you want to include. Amazon QuickSight
automatically places these into the field wells.
To change the placement of a field, drag it to the appropriate field wells. Typically, you use
dimension or measure fields as indicated by the target field well. If you choose to use a dimension
field as a measure, the Count aggregate function is automatically applied to it to create a numeric
value.
• To create a single-measure pivot table, drag a dimension to the Rows field well, a dimension to
the Columns field well, and a measure to the Values field well.
• To create a multi-measure pivot table, drag a dimension to the Rows field well, a dimension to the
Columns field well, and two or more measures to the Values field well.
• To create a clustered pivot table, drag one or more dimensions to the Rows field well, one or more
dimensions to the Columns field well, and a measure to the Values field well.
You can also select multiple fields for all of the pivot table field wells if you want to. Doing this
combines the multi-measure and clustered pivot table approaches.
Note
To view roll-ups for calculated fields, make sure that you are using aggregates. For example,
a calculated field with field-1 / field-2 doesn't display a summary when rolled up.
However, sum(field-1) / sum(field-2) does display a roll-up summary.
1. On the analysis page, choose the pivot table visual that you want to edit.
2. Expand the Field wells pane by choosing the field wells at the top of the visual.
447
Amazon QuickSight User Guide
Visual types
Note
If you use only one metric, you can eliminate the repeated header by formatting the
visual and styling it with the Hide single metric option. For more information, see
Customizing style and font (p. 528).
448
Amazon QuickSight User Guide
Visual types
1. On the analysis page, choose the pivot table visual that you want to edit.
2. Choose one of the following:
• To collapse a group, choose the collapse icon near the name of the field.
• To expand a group, choose the expand icon near the name of the field. The collapse icon shows a
minus sign. The expand icon shows a plus sign.
In the following screenshot, Customer Region and the Enterprise segment are expanded, and
SMB and Startup are collapsed. When a group is collapsed, its data is summarized in the row or
column.
At any time, you can choose to show any hidden fields in the pivot table. When you publish the visual as
part of a dashboard, anyone who subscribes to the dashboard can export the pivot table to a comma-
separated value (CSV) or Microsoft Excel file. They can choose to export only the visible fields, or all
fields. For more information, see Exporting data from a dashboard (p. 15).
1. In your analysis, select the pivot table visual that you want to work with.
2. Choose the column or row header that you want to hide, and then choose Hide.
449
Amazon QuickSight User Guide
Visual types
Or you can choose the field in the Rows or Columns field wells, and then choose Hide.
1. In your analysis, select the pivot table visual that you want to work with.
2. In the Fields well, choose a field in the Values field well, and then choose Hide.
450
Amazon QuickSight User Guide
Visual types
1. In your analysis, select the pivot table visual that you want to work with.
2. In the Fields well, choose the field in the Rows, Columns, Values field well, and then choose Show.
1. In your analysis, select the pivot table visual that you want to work with.
2. In the pivot table, choose any column or row header, and then choose Show all hidden fields.
451
Amazon QuickSight User Guide
Visual types
Or you can choose any field in the Fields well and choose Show all hidden fields.
452
Amazon QuickSight User Guide
Visual types
When you have multiple panes in a pivot table, sorting is applied to each pane independently. For
example, the Segment column in the pivot table on the left is being sorted in ascending order by Cost.
Given that there are multiple panes, the sort starts over for each pane and the rows within each pane (for
Segment) are ordered by lowest to highest cost. The table on the right has the same sort applied, but
the sort is being applied across the entire table, as shown following.
When you apply multiple sorts to a pivot table, sorting is applied from the outside dimension to the
inside dimension. Consider the following example image of a pivot table. The Customer Region
column is sorted by Cost in descending order (as shown in orange). The Channel column is sorted by
Revenue Goal in ascending order (as shown in blue).
453
Amazon QuickSight User Guide
Visual types
Use the following procedure to sort a pivot table using Row or Column headers.
1. In a pivot table chart, choose the header that you want to sort.
2. For Sort by, choose a field to sort by and a sort order.
You can sort dimension fields alphabetically a–z or z–a, or you can sort them by a measure in
ascending or descending order.
454
Amazon QuickSight User Guide
Visual types
Use the following procedure to sort a pivot table using value headers.
1. In a pivot table chart, choose the value header that you want to sort.
2. Choose Ascending or Descending.
455
Amazon QuickSight User Guide
Visual types
Use the following procedure to sort values in a pivot table using the field wells.
1. On the analysis page, choose the pivot table that you want to sort.
2. Expand the Field wells.
3. In the Rows or Columns field well, choose the field that you want to sort, and then choose how you
want to sort the field for Sort by.
You can sort dimension fields in the Rows or Columns field wells alphabetically from a–z or z–a,
or you can sort them by a measure in ascending or descending order. You also have the option to
collapse all or expand all rows or columns for the field you choose in the field well. You can also
remove the field, or to replace it with another field.
• To sort a dimension field alphabetically, hover your cursor over the field in the Rows or Columns
field well, and then choose the a–z or z–a sort icon.
456
Amazon QuickSight User Guide
Visual types
• To sort a dimension field by a measure, hover your cursor over the field in the Rows or Columns
field well. Then choose a measure from the list, and then choose the ascending or descending sort
icon.
Or, if you want more control over how the sort is applied to the pivot table, customize the sort options.
1. On the analysis page, choose the pivot table that you want to sort.
2. Expand Field wells.
3. Choose the field that you want to sort in the Rows or Columns field well, and then choose Sort
options.
4. In the Sort options pane that opens at left, specify the following options:
457
Amazon QuickSight User Guide
Visual types
The data type of the cell value automatically changes to work for your calculation. For example, say that
you apply the Rank function to a currency data type. The values display as integers rather than currency,
because rank isn't measured as currency. Similarly, if you apply the Percent difference function instead,
the cell values display as percentages.
Topics
• Adding and deleting pivot table calculations (p. 458)
• Functions for pivot table calculations (p. 460)
• Ways to apply pivot table calculations (p. 466)
Use the following procedures to add, modify, and remove table calculation on a pivot table.
Topics
• Adding a pivot table calculation (p. 458)
• Changing how a calculation is applied (p. 459)
• Removing a calculation (p. 460)
1. Expand the Field wells pane by choosing the field wells at the top of the visual.
2. Choose the field in the Values well that you want to apply a table calculation to, choose Add table
calculation, and then choose the function to apply.
458
Amazon QuickSight User Guide
Visual types
Note
You can't run Total, Difference, and Percent Difference table calculations when a pivot table is
being sorted by a measure. To use these table calculations, remove the sort from the pivot table.
Use the following procedure to change the way a table calculation is applied to a pivot table.
1. Expand the Field wells pane by choosing field wells at the top of the visual.
2. Choose the field in the Values well that has the table calculation that you want to change, choose
Calculate as, and then choose the way that you want the calculation applied.
459
Amazon QuickSight User Guide
Visual types
Removing a calculation
Use the following procedure to remove a table calculation from a pivot table.
1. Expand the Field wells pane by choosing the field wells at the top of the visual.
2. Choose the field in the Values well that you want to remove the table calculation from, and then
choose Remove.
Topics
• Running total (p. 461)
• Difference (p. 461)
• Percentage difference (p. 462)
• Percent of total (p. 463)
• Rank (p. 464)
• Percentile (p. 465)
460
Amazon QuickSight User Guide
Visual types
Running total
The Running total function calculates the sum of a given cell value and the values of all cells prior to it.
This sum is calculated as Cell1=Cell1, Cell2=Cell1+Cell2, Cell3=Cell1+Cell2+Cell3, and
so on. For example, suppose that you have the following data.
Applying the Running total function across the table rows, using Table across for Calculate as, gives you
the following results.
Difference
The Difference function calculates the difference between a cell value and value of the cell prior to it.
This difference is calculated as Cell1=Cell1-null, Cell2=Cell2-Cell1, Cell3=Cell3-Cell2,
and so on. Because Cell1-null = null, the Cell1 value is always empty. For example, suppose that
you have the following data.
461
Amazon QuickSight User Guide
Visual types
Applying the Difference function across the table rows, using Table across for Calculate as, gives you
the following results.
Percentage difference
The Percentage Difference function calculates the percent difference between a cell value and the
value of the cell prior to it, divided by the value of the cell prior to it. This value is calculated as
Cell1=(Cell1-null)/null, Cell2=(Cell2-Cell1)/Cell1, Cell3=(Cell3-Cell2)/Cell2,
and so on. Because (Cell1-null)/null = null, the Cell1 value is always empty. For example, take
the following rows.
462
Amazon QuickSight User Guide
Visual types
Applying the Percentage Difference function across the table rows, using Table across for Calculate as,
gives you the following results.
Percent of total
The Percent of Total function calculates the percentage the given cell represents of the sum of all of
the cells included in the calculation. This percentage is calculated as Cell1=Cell1/(sum of all
cells), Cell2=Cell2/(sum of all cells), and so on. For example, suppose that you have the
following data.
463
Amazon QuickSight User Guide
Visual types
Applying the Percent of Total function across the table rows, using Table across for Calculate as, gives
you the following results.
Rank
The Rank function calculates the rank of the cell value compared to the values of the other cells included
in the calculation. Rank always shows the highest value equal to 1 and lowest value equal to the count
of cells included in the calculation. If there are two or more cells with equal values, they receive the same
rank but are considered to take up their own spots in the ranking. Thus, the next highest value is pushed
down in rank by the number of cells at the rank above it, minus one. For example, if you rank the values
5,3,3,4,3,2, their ranks are 1,3,3,2,3,6.
464
Amazon QuickSight User Guide
Visual types
Applying the Rank function across the table rows, using Table across for Calculate as, gives you the
following results.
Percentile
The Percentile function calculates the percent of the values of the cells included in the calculation that
are at or below the value for the given cell.
Where:
B = number of scores below x
N = number of scores
465
Amazon QuickSight User Guide
Visual types
Applying the Percentile function across the table rows, using Table across for Calculate as, gives you the
following results.
You can apply table calculations in the ways described following. Table calculations are applied to only
one field at a time. Thus, if you have a pivot table with multiple values, calculations are only applied to
the cells representing the field that you applied the calculation to.
Topics
• Table across (p. 467)
• Table down (p. 467)
• Table across down (p. 468)
• Table down across (p. 470)
• Group across (p. 471)
• Group down (p. 473)
• Group across down (p. 474)
• Group down across (p. 475)
466
Amazon QuickSight User Guide
Visual types
Table across
Using Table across applies the calculation across the rows of the pivot table, regardless of any grouping.
This application is the default. For example, take the following pivot table.
Applying the Running total function using Table across gives you the following results, with row totals
in the last column.
Table down
Using Table down applies the calculation down the columns of the pivot table, regardless of any
grouping. For example, take the following pivot table.
467
Amazon QuickSight User Guide
Visual types
Applying the Running total function using Table down gives you the following results, with column
totals in the last row.
Using Table across down applies the calculation across the rows of the pivot table, and then takes
the results and reapplies the calculation down the columns of the pivot table. For example, take the
following pivot table.
468
Amazon QuickSight User Guide
Visual types
Applying the Running total function using Table across down gives you the following results. In this
case, totals are summed both down and across, with the grand total in the lower-right cell.
In this case, suppose that you apply the Rank function using Table across down. Doing so means that
the initial ranks are determined across the table rows and then those ranks are in turn ranked down the
columns. This approach gives you the following results.
469
Amazon QuickSight User Guide
Visual types
Using Table down across applies the calculation down the columns of the pivot table. It then takes the
results and reapplies the calculation across the rows of the pivot table. For example, take the following
pivot table.
You can apply the Running total function using Table down across to get the following results. In this
case, totals are summed both down and across, with the grand total in the lower-right cell.
470
Amazon QuickSight User Guide
Visual types
You can apply the Rank function using Table down across to get the following results. In this case, the
initial ranks are determined down the table columns. Then those ranks are in turn ranked across the
rows.
Group across
Using Group across applies the calculation across the rows of the pivot table within group boundaries, as
determined by the second level of grouping applied to the columns. For example, if you group by field-2
and then by field-1, grouping is applied at the field-2 level. If you group by field-3, field-2, and field-1,
grouping is again applied at the field-2 level. When there is no grouping, Group across returns the same
results as Table across.
471
Amazon QuickSight User Guide
Visual types
For example, take the following pivot table where columns are grouped by Service Line and then by
Consumption Channel.
You can apply the Running total function using Group across to get the following results. In this case,
the function is applied across the rows, bounded by the columns for each service category group. The
Mobile columns display the total for both Consumption Channel values for the given Service
Line, for the Customer Region and Date (year) represented by the given row. For example, the
highlighted cell represents the total for the APAC region for 2012, for all Consumption Channel values
in the Service Line named Billing.
472
Amazon QuickSight User Guide
Visual types
Group down
Using Group down applies the calculation down the columns of the pivot table within group boundaries,
as determined by the second level of grouping applied to the rows. For example, if you group by field-2
and then by field-1, grouping is applied at the field-2 level. If you group by field-3, field-2, and field-1,
grouping is again applied at the field-2 level. When there is no grouping, Group down returns the same
results as Table down.
For example, take the following pivot table where rows are grouped by Customer Region and then by
Date (year).
You can apply the Running total function using Group down to get the following results. In this case,
the function is applied down the columns, bounded by the rows for each Customer Region group. The
2014 rows display the total for all years for the given Customer Region, for the Service Line and
Consumption Channel represented by the given column. For example, the highlighted cell represents
the total the APAC region, for the Billing service for the Mobile channel, for all the Date values
(years) that display in the report.
473
Amazon QuickSight User Guide
Visual types
For example, if you group a row or column by field-2 and then by field-1, grouping is applied at the
field-2 level. If you group by field-3, field-2, and field-1, grouping is again applied at the field-2 level.
When there is no grouping, Group across down returns the same results as Table across down.
For example, take the following pivot table where columns are grouped by Service Line and then by
Consumption Channel. Rows are grouped by Customer Region and then by Date (year).
474
Amazon QuickSight User Guide
Visual types
You can apply the Running total function using Group across down to get the following results. In this
case, totals are summed both down and across within the group boundaries. Here, these boundaries are
Service Line for the columns and Customer Region for the rows. The grand total appears in the
lower-right cell for the group.
You can apply the Rank function using Group across down to get the following results. In this case, the
function is first applied across the rows bounded by each Service Line group. The function is then
applied again to the results of that first calculation, this time applied down the columns bounded by
each Customer Region group.
475
Amazon QuickSight User Guide
Visual types
For example, if you group a row or column by field-2 and then by field-1, grouping is applied at the
field-2 level. If you group by field-3, field-2, and field-1, grouping is again applied at the field-2 level.
When there is no grouping, Group down across returns the same results as Table down across.
For example, take the following pivot table. Columns are grouped by Service Line and then by
Consumption Channel. Rows are grouped by Customer Region and then by Date (year).
You can apply the Running total function using Group down across to get the following results. In
this case, totals are summed both down and across within the group boundaries. In this case, these are
Service Category for the columns and Customer Region for the rows. The grand total is in the
lower-right cell for the group.
476
Amazon QuickSight User Guide
Visual types
You can apply the Rank function using Group down across to get the following results. In this case, the
function is first applied down the columns bounded by each Customer Region group. The function is
then applied again to the results of that first calculation, this time applied across the rows bounded by
each Service Line group.
To reduce the level of complexity and reduce the potential for errors, you can take the following actions:
In some cases, there's a business need to examine many metrics in relation to each other. In these cases,
it can be better to use multiple visuals on the same dashboard, each showing a single metric. You can
477
Amazon QuickSight User Guide
Visual types
reduce the size of the visuals on the dashboard, and colocate them to form a grouping. If a decision
the viewer makes based on one visual creates the need for a different view, you can deploy custom URL
actions to launch another dashboard according to the choices made by the user.
It's best to think of visuals as building blocks. Rather than using one visual for multiple purposes, use
each visual to facilitate one aspect of a larger business decision. The viewer should have enough data to
make a well-informed decision, without being overwhelmed by the inclusion of all possibilities.
For example, a Sankey diagram can show the number of people migrating from one country to another.
A Sankey diagram can also show the path a web visitor takes from one page to the next on a company
website, with possible stops along the way.
A W 500
A X 23
A Y 147
The following Sankey diagram is created when the dimensions and measure are added to the field well,
with the A node on the left linking to the W, Y, and X nodes on the right. The width of each link between
nodes is determined by the value in the Measure (Weight) column. The nodes are automatically ordered.
478
Amazon QuickSight User Guide
Visual types
To create multilevel Sankey diagrams in Amazon QuickSight, your dataset should still contain a measure
and two dimensions (one for source and one for destination), but in this case your data values differ.
The following table is a simple example of data for a multilevel Sankey diagram with two stages.
A W 500
A X 23
A Y 147
W Z 300
X Z 5
Y Z 50
The following Sankey diagram is created when the dimensions and measure are added to the field well.
Here, the A node on the left links to the W, Y, and X nodes in the middle, and the W, Y, and X nodes then
link to the Z node on the right. The width of each link between nodes is determined by the value in the
Measure (Weight) column.
479
Amazon QuickSight User Guide
Visual types
Sometimes, the data that you use for a Sankey diagram contains cycles. For example, suppose that you're
visualizing user traffic flows between pages on a website. You might discover that users who come to
page A move to page E, and then come back to page A. An entire flow might look something like A-E-A-
B-A-E-A.
When your data contains cycles, the nodes in each cycle are repeated in QuickSight. For example, if your
data contains the flow A-E-A-B-A-E-A, the following Sankey diagram is created.
480
Amazon QuickSight User Guide
Visual types
The following procedure uses an example table (illustrated in following) to demonstrate how to prepare
your data for Sankey diagrams in QuickSight. The table includes three columns: Customer ID, Time, and
Action.
1 9:05 am Step 1
1 9:06 am Step 2
1 9:08 am Step 3
2 11:44 am Step 1
2 11:47 am Step 2
2 11:48 am Step 3
To create a Sankey diagram in QuickSight using this data, first add Source and Destination columns to
the table. Use the following procedure to learn how.
481
Amazon QuickSight User Guide
Visual types
1. Add a Step Number column to the table to number or rank each row.
There are multiple ways to compute the Step Number column. If your data source is compatible
with SQL and your database supports ROW_NUMBER or RANK functions, you can use custom SQL in
QuickSight to order the rows in the Step Number column. For more information about using custom
SQL in QuickSight, see Using SQL to customize data (p. 357).
1 9:05 am Step 1 1
1 9:06 am Step 2 2
1 9:08 am Step 3 3
2 11:44 am Step 1 1
2 11:47 am Step 2 2
2 11:48 am Step 3 3
2. Add a Next Row Number column to the table with values equal to Step Number plus one.
For example, in the first data row of the table, the value for Step Number is 1. To compute the value
for Next Step Number for that row, add 1 to that value.
1+1=2
The value for Step Number in the second data row of the table is 2; therefore, the value for Next
Step Number is 3.
2+1=3
1 9:05 am Step 1 1 2
1 9:06 am Step 2 2 3
1 9:08 am Step 3 3 4
2 11:44 am Step 1 1 2
2 11:47 am Step 2 2 3
2 11:48 am Step 3 3 4
For more information about joining data in QuickSight, see Joining data (p. 317).
482
Amazon QuickSight User Guide
Visual types
Joining the two tables creates two columns for Customer ID, Time, Action, Step Number and Next
Step Number. The columns from the table at the left of the join are Source columns. The columns
from the table at the right of the join are Destination columns.
4. (Optional) Rename columns to indicate sources and destinations.
483
Amazon QuickSight User Guide
Visual types
4. From the Fields list pane, drag the fields that you want to use to the appropriate field wells.
Sankey diagrams are made of a source dimension, a destination dimension, and a measure.
To create a Sankey diagram, drag a dimension to the Source field well, a dimension to the
Destination field well, and a measure to the Weight field well.
Use the following procedure to customize the number of nodes that appear in a Sankey diagram.
QuickSight supports up to 100 Source/Destination nodes.
1. On the analysis page, choose the Sankey diagram visual that you want to format.
2. On the menu in the upper-right corner of the visual, select the Format Visual icon.
3. In the Format visual pane that opens at left, choose either the Source or Destination tab.
4. For Number of nodes displayed, enter a number.
484
Amazon QuickSight User Guide
Visual types
The nodes in the diagram update to the number that you specified. The top nodes are automatically
shown. All other nodes are placed in an Other category.
Note
Specifying the number of Source nodes controls how many Source nodes can appear overall
in the diagram. Specifying the number of Destination nodes controls how many Destination
nodes can appear per Source node. This means that if there is more than one Source node
in your diagram, the overall number of Destination nodes will be higher than the number
specified.
QuickSight supports up to 100 Source/Destination nodes.
For example, the following Sankey diagram has a limit of three source nodes (out of five), so the top
three are shown in the diagram. The other two source nodes are placed in the Other category.
To remove the Other category from the diagram, select it in the view and choose Hide “other”
categories.
Changing the No
legend display
485
Amazon QuickSight User Guide
Visual types
Changing the No
visual colors
Sorting No
Adding drill- No
downs
Conditional No
formatting
Each bubble on the scatter plot represents one item in the dimension. The X and Y axes represent two
different measures that apply to the dimension. A bubble appears on the chart at the point where the
values for the two measures for an item in the dimension intersect. Optionally, you can also use bubble
size to represent an additional measure.
Scatter plots show up to 50 data points for the intersection of the X and Y axis values for visuals that
don't use group or color. For visuals that do use group or color, scatter plots show up to 2500 data
points. For more information about how Amazon QuickSight handles data that falls outside display
limits, see Display limits in visuals (p. 388).
486
Amazon QuickSight User Guide
Visual types
Changing the Yes, with Scatter plots display a legend if Customizing a visual
legend display exceptions you have the Group/Color field legend (p. 499)
well populated.
Changing the axis Yes You can set the range for both Changing range and scale in
range the X and Y axes. your visuals (p. 530)
Adding drill- Yes You can add drill-down levels Adding drill-downs to
downs to the Group/Color field well. visual data in Amazon
QuickSight (p. 152)
487
Amazon QuickSight User Guide
Visual types
To create a scatter plot, drag a measure to the X axis field well, a measure to the Y axis field well,
and a dimension to the Group/Color field well. To represent another measure with bubble size, drag
that measure to the Size field well.
5. (Optional) Add drill-down layers by dragging one or more additional fields to the Group/Color
field well. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
Table visuals don't display a legend. You can hide or display the title on a table. You can also hide or
display totals, and choose to show totals at the top or the bottom of the table. For more information, see
Format options available in analytics (p. 536).
1. Open Amazon QuickSight and choose Analyses on the navigation pane at left.
2. Choose one of the following:
• To create a new analysis, choose New analysis at upper right. For more information, see Starting
an analysis in Amazon QuickSight (p. 379).
• To use an existing analysis, choose the analysis that you want to edit.
3. Choose Add (+), Add Visual.
4. At lower left, choose the table icon from Visual types.
5. On the Fields list pane, choose the fields that you want to use. If you want to add a calculated field,
choose Add (+), Add calculated field.
To create a nonaggregated view of the data, add fields only to the Value field well. Doing this shows
data without any aggregations.
To create an aggregated view of the data, choose the fields that you want to aggregate by, and then
add them to the Group by field well.
1. On your visual, choose the field that you want to hide, then choose Hide column.
2. To display hidden columns, choose any column, then choose Show all hidden columns.
488
Amazon QuickSight User Guide
Visual types
•
Choose the transpose icon ( ) near the top right of the visual. It has two arrows at a 90 degree
angle.
1.
On your visual, choose the Format visual icon ( ) near the top right of the visual.
2. In the Format visual pane, choose Table options, and choose your table's vertical alignment.
1.
On your visual, choose the Format visual icon ( ) near the top right of the visual.
2. In the Format visual pane, choose Table options, and select Wrap header text.
1. Open the analysis that holds your table and click anywhere on Field wells to expand the field wells.
2. Do one of the following:
• Drag and drop one or more fields in Field wells to rearrange their order.
• Select a field directly in the table and choose the left or right arrow on Move column.
1. From the QuickStart page, choose Analyses, and then choose the analysis that you want to
customize.
2. Choose the table that you want to change.
3. On the menu at the upper right of the table, choose Format visual.
4. For Format visual, choose Field styling.
5. On the Field styling pane, choose the field that you want to style from the menu.
6. In the Url options section of the Field styling menu, choose Make URLs hyperlinks.
After you add links to your table, you can choose where you want the links to open when they're selected
in the Open in section of the Field style pane. You can choose to have links open in a new tab, a new
window, or in the same tab.
489
Amazon QuickSight User Guide
Visual types
You can also choose how you want to style the link in the Style as section of Field style pane. Your links
can appear as hyperlinks, icons, or plain text, or you can set a custom link.
To adjust the font size of a link icon or URL, change the Font size in the Cells section of the Table
options pane of the Format visual menu.
You can set any URLs in your table that point to images to render in the table as images. Doing this can
be useful when you want to include an image of a product as a part of a table.
1. From the QuickStart start page, choose Analyses, and then choose the analysis that you want to
customize.
2. Choose the table that you want to change.
3. On the menu at the upper-right of the table, choose Format visual.
4. In the Format visual menu, choose Field styling.
5. In the Field styling pane, choose the field that you want to style from the menu.
6. In the Url options section of the Field styling menu, choose Show URLs as images.
After rendering images in a table, you can choose how to size the images in the Image sizing section of
the Field style pane. You can fit images to their cell's height or width, or you can choose not to scale the
image. Images fit to a cell's height by default.
Each rectangle on the tree map represents one item in the dimension. Rectangle size represents the
proportion of the value for the selected measure that the item represents compared to the whole for the
dimension. You can optionally use rectangle color to represent another measure for the item. Rectangle
color represents where the value for the item falls in the range for the measure, with darker colors
indicating higher values and lighter colors indicating lower ones.
Tree maps show up to 100 data points for the Group by field. For more information about how Amazon
QuickSight handles data that falls outside display limits, see Display limits in visuals (p. 388).
490
Amazon QuickSight User Guide
Visual types
Sorting Yes You can sort on the fields you Sorting visual data in Amazon
choose for size, color, or to QuickSight (p. 571)
group by.
Adding drill- Yes You can add drill-down levels Adding drill-downs to
downs to the Group by field well. visual data in Amazon
QuickSight (p. 152)
491
Amazon QuickSight User Guide
Visual types
4. From the Fields list pane, drag the fields that you want to use to the appropriate field wells.
Typically, you want to use dimension or measure fields as indicated by the target field well. If you
choose to use a dimension field as a measure, the Count aggregate function is automatically applied
to it to create a numeric value.
To create a tree map, drag a measure to the Size field well and a dimension to the Group by field
well. Optionally, drag another measure to the Color field well.
5. (Optional) Add drill-down layers by dragging one or more additional fields to the Group by field
well. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
Waterfall charts are most commonly used to present financial data, because you can show change within
one time period or from one time period to another. This way, you can visualize the different factors
that have an impact your project cost. For example, you can use a waterfall chart to show gross sales to
net income within the same month, or the difference in net income from last year to this year, and the
factors that were responsible for this change.
You can also use waterfall charts to present statistical data, for example how many new employees you
hired and how many employees left your company within a year.
492
Amazon QuickSight User Guide
Visual types
1. Open Amazon QuickSight and choose Analyses on the navigation pane at left.
2. Choose one of the following:
• To create a new analysis, choose New analysis at upper right. For more information, see Starting
an analysis in Amazon QuickSight (p. 379).
• To use an existing analysis, choose the analysis that you want to edit.
3. Choose Add (+), Add Visual.
4. At lower left, choose the waterfall chart icon from Visual types.
5. On the Fields list pane, choose the fields that you want to use for the appropriate field wells.
Waterfall charts require one category or measure in Value.
6. (Optional) Add drill-down layers by dragging one or more additional fields to the Group/Color
field well. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
To understand the features supported by waterfall charts, see Format options available
in analytics (p. 536). For customization options, see Formatting visuals in Amazon
QuickSight (p. 496).
Each word in a word cloud represents one or more values in a dimension. The size of the word represents
the frequency of a value's occurrence in a selected dimension, in proportion to the occurrences of other
values in the same dimension. Word clouds are best when precision isn't important and there aren't a
large number of distinct values.
493
Amazon QuickSight User Guide
Visual types
To create a word cloud, use one dimension in the Group by field well. Optionally, you can add a metric to
the Size field well.
Word clouds usually look better with 20–100 words or phrases, but the format settings offer a wide
range of flexibility. If you choose too many words, they can become too small to be legible, depending
on the size of your display. By default, word clouds display 100 distinct words. To show more, change the
format setting for Number of words.
Word clouds are limited to 500 unique values for Group by. To avoid displaying the word Other, format
the visual to hide the Other category. For more information about how Amazon QuickSight handles data
that falls outside display limits, see Display limits in visuals (p. 388).
494
Amazon QuickSight User Guide
Visual types
Changing the Yes To change the color, choose a Changing colors on visuals in
visual colors word and then choose a color. Amazon QuickSight (p. 499)
Adding drill- Yes You can add drill-down levels Adding drill-downs to
downs to the Group by field well. visual data in Amazon
QuickSight (p. 152)
Using format Yes You can choose to allow Formatting visuals in Amazon
options vertical words, emphasize QuickSight (p. 496)
scale, use a fluid layout, use
lowercase, and set the amount
of padding between words. You
can set the maximum string
length for the word cloud
(default is 40). You can also
choose the number of words
for the Group by field (default
is 100; maximum is 500).
495
Amazon QuickSight User Guide
Formatting visuals
4. From the Fields list pane, drag the fields that you want to use to the appropriate field wells.
Typically, you want to use dimension or measure fields as indicated by the target field well. If you
choose to use a dimension field as a measure, the Count aggregate function is applied by default.
To create a word cloud, add a dimension to the Group by field well. Optionally, add a measure to the
Size field well.
5. (Optional) Add drill-down layers by dragging one or more additional fields to the Group by field
well. For more information about adding drill-downs, see Adding drill-downs to visual data in
Amazon QuickSight (p. 152).
Topics
• Formatting a visual title and subtitle (p. 497)
• Customizing a visual legend (p. 499)
• Changing colors on visuals in Amazon QuickSight (p. 499)
• Customizing tooltips in an Amazon QuickSight visual (p. 507)
• Customizing visual labels (p. 511)
• Customizing data labels on visuals (p. 511)
• Formatting tables and pivot tables in Amazon QuickSight (p. 513)
• Displaying Totals and Subtotals (p. 525)
• Adding conditional formatting to visuals (p. 526)
• Customizing style and font (p. 528)
• Customizing missing data controls (p. 529)
496
Amazon QuickSight User Guide
Formatting visuals
4. In the Format Visual pane that opens at left, choose the Title tab, and then choose from the
following settings:
497
Amazon QuickSight User Guide
Formatting visuals
Use the following procedure to edit the title or subtitle for a visual.
Or, if your titles or subtitles are hidden, you can do the following:
• To enter a custom title or subtitle, enter your title or subtitle text in the editor. Titles can be up to
120 characters long, including spaces. Subtitles can be up to 500 characters long.
• To change the font type, choose a font type from the list at left.
• To change the font size, choose a size from the list at right.
• To change the font weight and emphasis, or to underline or strikethrough text, choose the bold,
emphasis, underline, or strikethrough icons.
• To change the font color, choose the color (Abc) icon, and then pick a color. You can also enter a
hexadecimal number or RGB values.
• To add an unordered list, choose the unordered list icon.
• To change the text alignment, choose the left, center, or right alignment icons.
• To add a parameter to a title or subtitle, choose an existing parameter from the list under
Parameters at right. For more information about how to create parameters, see Setting up
parameters in Amazon QuickSight (p. 584).
• To add a hyperlink, highlight the text that you want to link, choose the hyperlink icon, and then
choose from the following options:
• For Enter link, enter the URL that you want to link to.
Choose the + icon at right to add an existing parameter, function, or computation to the URL.
498
Amazon QuickSight User Guide
Formatting visuals
1.
At the visual's right, choose Format Visual ( ).
2. In the Format Visual pane, expand the Legend section. In this section, you can format the legend
title and position.
3. Choose the X icon at upper right to close the Format Visual pane.
• Bar charts
• Donut charts
• Gauge charts
• Heat maps
• Line charts
• Scatter plots
• Tree maps
499
Amazon QuickSight User Guide
Formatting visuals
To change colors on bar charts, donut charts, gauge charts, line charts, and scatter plots, see Changing
colors on charts (p. 500).
To change colors on heat maps and tree maps, see Changing colors on heat maps and tree
maps (p. 507).
For example, suppose that you set the chart color to green.
All of the bars turn green. Even though you choose the first bar, the chart color applies to all the bars.
Then you set the color for the SMB bar to blue.
500
Amazon QuickSight User Guide
Formatting visuals
Looking at the result, you decide that you need more contrast between the green and blue bars, so you
change the chart color to orange. If you are changing the chart color, it doesn't matter which bar you
choose to open the context menu from.
501
Amazon QuickSight User Guide
Formatting visuals
The SMB bar remains blue. This is because it was directly configured. The remaining bars turn orange.
502
Amazon QuickSight User Guide
Formatting visuals
When you change the color of an element that is grouped, the color for that element is changed in all
of the groups. An example is a bar in a clustered bar chart. In the following example, Customer Segment
is moved out of the Y-axis and into the Group/Color field well. Customer Region is added as the Y-axis.
The chart color stays orange, and SMB stays blue for all Customer Regions.
503
Amazon QuickSight User Guide
Formatting visuals
If your visual has a legend that shows categories (dimensions), you can click on the values in the legend
to see a menu of available actions. For example, suppose that your bar chart has a field in the Color or
Group/Color field well. The bar chart menu displays the actions that you can choose by clicking or right-
clicking on a bar, such as the following:
Following is an example of using the legend to change the color for a dimension.
504
Amazon QuickSight User Guide
Formatting visuals
1. On the analysis page, choose the visual that you want to modify.
2. To change the chart color, choose any element on the visual, and then choose Chart Color.
All elements on the visual are changed to use this color, except for any that have previously had their
color individually set. In that case, the element color overrides the chart color.
505
Amazon QuickSight User Guide
Formatting visuals
4. To change the color for a single element on the visual, choose that element, choose Color
<fieldname>, and then choose the color that you want to use. You can choose a color from the
existing palette, or you can choose a custom color. To use a custom color, enter the hexadecimal
code for that color.
Repeat this step until you have set the color on all elements that you want to modify. To change the
color back to the color it was originally, choose Reset to default.
Use the following procedure to return to using the default colors on a visual.
1. On the analysis page, choose the visual that you want to modify.
2. Choose Chart Color, choose any element on the visual, and then choose Reset to Default. Doing this
changes the chart color back to the default color for that visual type.
All elements on the visual are changed to the default color for the visual type, except for any that
have previously had their color individually set. In that case, the element color setting overrides the
chart color setting.
3. To change the color for a single element back to the default, choose that element, choose Color
<fieldname>, and then choose Reset to Default.
The default color for individual elements is the chart color if you have specified one, or the default
color for the visual type otherwise.
506
Amazon QuickSight User Guide
Formatting visuals
1. Choose the heat map or tree map that you want to edit.
2. Choose Expand for the settings menu, and choose the cog icon to open the Format visual panel.
3. For Color, choose the settings that you want to use:
4. For Gradient color or Discrete color, choose the color square next to the color bar, and then choose
the color that you want to use. Repeat for each color square. The bar holds two colors by default.
5. Select the Enable 3 colors check box if you want to add a third color. A new square appears in the
middle of the color bar.
You can enter a number that defines the midpoint between the two main gradient colors. If you
add a value, the middle color represents the number you entered. If you leave this blank, the middle
color acts like the other colors in the gradient.
6. Select the Enable steps check box if you want to limit the chart to the colors that you chose. Doing
this changes the label on the color bar from Gradient color to Discrete color.
7. For Color for Null Value, choose a color to depict NULL values. This option is only available on heat
maps.
You can provide your viewers with additional information about data in your visual, customizing what
viewers can see. You can even prevent tooltips from appearing when viewers hover a cursor over an
element. To do this, you can customize the tooltips for that visual. Use the following procedures to learn
how.
507
Amazon QuickSight User Guide
Formatting visuals
1. On the analysis page, choose the visual that you want to format.
2. On the menu in the upper-right corner of the visual, choose the Format visual icon.
508
Amazon QuickSight User Guide
Formatting visuals
509
Amazon QuickSight User Guide
Formatting visuals
Clearing the option hides titles in the tooltip. Selecting the option shows the primary field value as
the title in the tooltip.
Clearing the option hides the aggregation for fields in the tooltip. Selecting the option shows the
aggregation for fields in the tooltip.
If you add a measure to the tooltip, you can select how you want the field to be aggregated. To do
so, choose Select aggregation, and then select an aggregation from the list. For more information
about the types of aggregations in QuickSight, see Changing field aggregation (p. 555).
5. Choose Save.
• Under the Fields list, select the field menu for the field that you want to remove (the three dots) and
choose Hide.
• Under the Fields list, select the field menu for a field (the three dots) and choose either Move up or
Move down.
1. Select the field menu for the field that you want to customize (the three dots) and choose Edit.
2. In the Edit tooltip field page that opens, for Label, enter the label that you want to appear in the
tooltip.
3. Choose Save.
510
Amazon QuickSight User Guide
Formatting visuals
1. On the analysis page, choose the visual that you want to format.
2. On the menu in the upper-right corner of the visual, choose the Format visual icon.
3. In the Format visual pane that opens at left, choose Tooltip.
4. Choose Show tooltip.
Clearing the option hides tooltips for the visual. Selecting the option shows them.
1. On the analysis page, choose the visual that you want to format. You can change the labels by
choosing the label directly on the visual, and choosing Rename. To revert to the default name,
delete your entry.
2. To see more options, choose the on-visual menu from the down icon at the upper-right corner of the
visual, and then choose Format visual.
For pivot tables, you can relabel row names, column names, and value names. Additionally, under
Styling, you can choose to hide columns labels or metric labels (for single metrics only).
You can add the same value to the same visual multiple times. You can do so to show the same value
with different aggregations or table calculations applied. By default, the fields all display the same
label. You can edit the names by using the Format Visual panel, which you open by choosing the V-
shaped icon at top right.
3. On the Format Visual pane, enable or disable Show title. This option removes the axis title.
4. Close the Format Visual pane by choosing the X icon in the upper-right corner of the pane.
511
Amazon QuickSight User Guide
Formatting visuals
• Position, which determines where the label appears in relation to the data point (for bar, combo, and
line charts):
• For vertical bar charts, you can customize to set position:
• Above bars
• Inside of bars
• Bottom of bars
• Top of bars
• For horizontal bar charts, you can customize to set position:
• Right of bars
• Inside of bars
• For line charts, you can customize to set position:
• Above lines
• Left or right of points on lines
• Below lines
• For scatter charts, you can customize to set position:
• Above points
• Left or right of points
• Below points
• Font size and color (for bar, combo, line, scatter, and pie charts)
• Label pattern, which determines how data is labeled (for bar, combo, line, and scatter charts):
• For bar, combo, and scatter charts, you can label:
• All
• By group or color
• For line charts, the following label options are available:
• All
• By group or color
• Line ends
• Minimum or maximum value only
• Minimum and maximum values
• For pie charts, the following label options are available:
• Show category
• Show metric
• Choose to show the metric label as value, percent, or both
• Group selection (for bars and lines, when the label pattern is "by group/color")
• Allow labels to overlap (for bars and lines), for use with fewer data points
• For vertical bar, combo, and line charts, labels that are too long are angled by default. You can
configure the degree of angle under the X-axis settings.
Note
If you add more than one measure to an axis, the data label displays the formatting for the first
measure only.
2. Choose the on-visual menu from the down icon at the upper-right corner of the visual, and then
choose Format visual.
3. On the Format Visual pane, choose Data Labels.
4. Enable Show data labels to show and customize labels. Disable this option to hide data labels.
5. Choose the settings that you want to use. The settings offered are slightly different for each chart
type. To see all available options, see the list before this procedure.
You can immediately view the effect of each change on the visual.
6. Close the Format Visual pane by choosing the X icon in the upper-right corner of the pane.
If you have applied conditional formatting to a table or pivot table, it takes precedence over any other
styling you configure.
When you export table or pivot table visuals to Microsoft Excel, the formatting customizations that you
applied to the visual aren't reflected in the downloaded Excel file.
• In your analysis, choose the table or pivot table that you want to customize, and then choose the
Format visual icon.
513
Amazon QuickSight User Guide
Formatting visuals
Following, you can find descriptions for options for customizing each area of your table or pivot table in
the Format visual pane.
514
Amazon QuickSight User Guide
Formatting visuals
Formatting headers
Header height
Header text
515
Amazon QuickSight User Guide
Formatting visuals
• To wrap text in headers that are too long to fit, select Wrap text. Wrapping text in a header
doesn't automatically increase the height of the header. Follow the previous procedure for
increasing header height.
• To customize the size of the text, choose a text size. You can choose between extra small and extra
large text.
• To change the font color, choose the Abc color icon, and then choose a color. You can choose one
of the provided colors, reset the header text color to the default color, or create a custom color.
• To change the horizontal alignment of text in the header, choose a horizontal alignment icon. You
can choose left alignment, center alignment, right alignment, or automatic alignment.
• To change the vertical alignment of text in the header, choose a vertical alignment icon. You can
choose top alignment, middle alignment, or bottom alignment.
The Headers section expands to show options for customizing column and row headers.
2. In the Headers section, do one or more of the following:
• To apply row styling to field names, choose Style field names under Rows.
• To customize the header text size, choose a text size for Text. You can customize the text size for
column headers in the Columns section, and row headers in the Rows section.
• To change the header font color, choose the Abc color icon, and then choose a color. You can
choose a font color for column headers in the Columns section, and for row headers in the Rows
section. You can choose one of the provided colors, reset the header text color to the default color,
or create a custom color.
• To change the horizontal alignment of text in the header, choose an alignment icon. You can
choose left alignment, center alignment, right alignment, or automatic alignment. You can choose
516
Amazon QuickSight User Guide
Formatting visuals
a horizontal alignment for column headers in the Columns section, and for row headers in the
Rows section.
• To change the vertical alignment of text in the header, choose an alignment icon. You can choose
top alignment, middle alignment, or bottom alignment. You can choose a vertical alignment for
column headers in the Columns section, and row headers in the Rows section.
• To hide column field names, choose Hide column field names.
The Headers section expands to show options for customizing column and row headers.
2. In the Columns section, choose the background color icon, and then choose a color.
3. In the Rows section, choose the background color icon, and then choose a color.
517
Amazon QuickSight User Guide
Formatting visuals
Header borders
• To customize the type of border that you want, choose a border type icon. You can choose no
borders, horizontal borders only, vertical borders only, or all borders.
• To customize the border thickness, choose a border thickness.
• To customize the border color, choose the border color icon, and then choose a color. You can
choose one of the provided colors, reset the border color to the default color, or create a custom
color.
The Headers section expands to show options for customizing column and row headers.
2. In the Columns and Rows sections, for Borders, do one or more of the following:
• To customize the type of border that you want, choose a border type icon. You can choose no
borders, horizontal borders only, vertical borders only, or all borders.
• To customize the border thickness, choose a border thickness.
• To customize the border color, choose the border color icon, and then choose a color. You can
choose one of the provided colors, reset the border color to the default color, or create a custom
color.
518
Amazon QuickSight User Guide
Formatting visuals
Formatting cells
Row height
You can customize table row height.
Cell text
You can customize the formatting for cell text within a table.
519
Amazon QuickSight User Guide
Formatting visuals
• To wrap text in headers that are too long to fit, select Wrap text. Wrapping text in cells doesn't
automatically increase the row height. Follow the previous procedure for increasing row height.
• To customize the size of the text, choose a text size. You can choose between extra small and extra
large text.
• To change the font color, choose the Abc color icon, and then choose a color. You can choose one
of the provided colors, reset the cell text color to the default color, or create a custom color.
• To change the horizontal alignment of text in cells, choose a horizontal alignment icon. You can
choose left alignment, center alignment, right alignment, or automatic alignment.
• To change the vertical alignment of text in cells, choose a vertical alignment icon. You can choose
top alignment, middle alignment, or bottom alignment.
• To alternate background colors between rows, select Alternate row colors. Clearing this option
means that all cells have the same background color.
• If you choose to alternate background colors between rows, choose a color for Odd rows and a
color for Even rows by choosing the background color icon for each and selecting a color. You
can choose one of the provided colors, reset the background color to the default color, or create a
custom color.
• If you choose not to alternate background colors between rows, choose the background color icon
and select a color for all cells. You can choose one of the provided colors, reset the background
color to the default color, or create a custom color.
Cell borders
• To customize the type of border that you want, choose a border type icon. You can choose no
borders, horizontal borders only, vertical borders only, or all borders.
• To customize the border thickness, choose a border thickness.
• To customize the border color, choose the border color icon, and then choose a color. You can
choose one of the provided colors, reset the border color to the default color, or create a custom
color.
520
Amazon QuickSight User Guide
Formatting visuals
You can format totals and subtotals separately from other cells in a table or pivot table. Use the
following procedures to learn how.
Position of totals
521
Amazon QuickSight User Guide
Formatting visuals
In pivot tables, you can also add labels to column totals and subtotals. To do so, enter a word or
short phrase for Label in the Columns section.
• To customize the size of the text, choose a text size. You can choose between extra small and extra
large text.
• To change the font color, choose the Abc color icon, and then choose a color. You can choose one
of the provided colors, reset the cell text color to the default color, or create a custom color.
In pivot tables, you can also add format text for column totals and subtotals. To do so, repeat the
above steps in the Columns section.
In pivot tables, you can also add background colors for column totals and subtotals. To do so, choose
a the background color icon for Background in the Columns section.
• To customize the type of border that you want, choose a border type icon. You can choose no
borders, horizontal borders only, vertical borders only, or all borders.
• To customize the border thickness, choose a border thickness.
• To customize the border color, choose the border color icon, and then choose a color. You can
choose one of the provided colors, reset the border color to the default color, or create a custom
color.
In pivot tables, you can also add borders for column totals and subtotals. To do so, repeat the above
steps in the Columns section.
522
Amazon QuickSight User Guide
Formatting visuals
In pivot tables, you can apply any text, background color, and border styling you apply to totals to cells
in that same column or row.
• In the table or pivot table visual, hover your cursor over the line that you want to resize until you see
the horizontal cursor appear. When it appears, select the line and drag it to a new height.
You can adjust the row height by selecting the horizontal lines on cells and row headers.
523
Amazon QuickSight User Guide
Formatting visuals
• In the table or pivot table visual, hover your cursor over the line that you want to resize until you see
the vertical cursor appear. When it appears, select the line and drag it to a new width.
You can adjust the column width by selecting the vertical lines on cells, column headers, and row
headers.
524
Amazon QuickSight User Guide
Formatting visuals
• In the Rows section, choose Show totals to show totals on the bottom row of the visual. Choose
Pin totals to keep the totals visible as you scroll through the table.
• In the Columns section, choose Show totals to show totals on the last column of the visual.
• By default, the total appears without a label. To change this, you can enter a custom name for
Row totals label and Column totals label.
525
Amazon QuickSight User Guide
Formatting visuals
• Gauge charts
• Key performance indicators (KPIs)
• Pivot tables
• Tables
For tables and pivot tables, you can set multiple conditions for fields or supported aggregations, along
with format options to apply to a target cell. For KPIs and gauge charts, you can format the primary
value based on conditions that are applied to any dimension in the dataset. For gauge charts, you can
also format the foreground color of the arc based on conditions.
526
Amazon QuickSight User Guide
Formatting visuals
1. On the analysis page, choose the visual that you want to format.
2. On the visual, open the context menu on the down icon at the upper-right. Then choose Conditional
formatting.
Options for formatting display on the left. Choose one of the following:
• For pivot tables – Begin by choosing a measure that you want to use. You can set conditional
formatting on one or more fields. The selection is limited to the measures that are in the Values
field well.
• For tables – Begin by choosing a field that you want to use. You can set conditional formatting
on one or more fields. You can also choose to apply formatting to the entire row. Formatting
the entire row adds an option to Apply on top, which applies the row formatting in addition to
formatting added by other conditions.
• For KPIs – Apply formatting to the primary value or the progress bar or both.
3. For the remaining steps in this procedure, choose the features that you want to use. Not all options
are available for all visuals.
4. (Optional) Choose Add background color to set a background color. If a background color is already
added, choose Background.
• Fill type – The background color can be Solid or Gradient. If you choose to use a gradient,
additional color options display, enabling you to choose a minimum and maximum value for the
gradient scale. The minimum value defaults to the lowest value, and the maximum value defaults
to the highest value.
• Format field based on – The field to use when applying the format.
• Aggregation – The aggregation to use (displays only the available aggregations).
• Condition – The comparison operator to use, for example "greater than".
• Value – The value to use.
• Color – The color to use.
• Additional options: In pivot tables, you can set what you want to format by choosing options
from the context menu (…): Values, Subtotals, and Totals.
5. (Optional) Choose Add text color to set a text color. If a text color is already added, choose Text.
• Format field based on – The field or item to use when applying the format.
• Aggregation – The aggregation to use (displays only the available aggregations). This option
applies to tables and pivot tables.
• Condition – The comparison operator to use, for example "greater than".
• Value – The value to use.
• Color – The color to use.
• Additional options: In tables and pivot tables, you can set what you want to format by choosing
options from the context menu (…): Values, Subtotals, and Totals.
6. (Optional) Choose Add icons to set an icon or icon set. If an icon is already added, choose Icon.
• Format field based on – The field or item to use when applying the format.
• Aggregation – The aggregation to use (displays only the available aggregations). This option
applies to tables and pivot tables.
• Icon set – The icon set to apply to field in Format field based on. This option applies to tables and
pivot tables.
• Reverse colors – Reverses the colors of the icons for tables and pivot tables.
• Custom conditions – Provides more icon options for tables and pivot tables.
• Condition – The comparison operator to use.
527
Amazon QuickSight User Guide
Formatting visuals
• Format field based on – The field to use when applying the format.
• Condition – The comparison operator to use.
• Value – The value to use.
• Color – The color to use.
8. When you are finished configuring conditional formatting, choose one or more of the following:
1. On the analysis page, choose the chart that you want to format.
2.
Choose the menu on the visualization ( ), and then choose Format visual ( ).
3. Choose Styling.
4. To prevent displaying a single metric label repeatedly, enable Hide single metric.
5. To hide labels for fields in the Columns field well, enable Hide column field names.
6.
To hide collapse ( ) and expand icons ( ), enable Hide +/- buttons.
7. To expand the table to fill your current view, choose Fit table to view. You can't undo this action.
To shrink the table to fit your current view, you can adjust the width of each column. To do this, grab
the right edge of the column, near the column title. Drag the edge in either direction.
528
Amazon QuickSight User Guide
Formatting visuals
8. Choose your preferred font size for each of the following chart types:
• For KPIs, choose the font sizes for the primary and secondary values.
• For pivot tables and tables, choose the font sizes for table headers, cells, totals, and subtotals.
• For other visuals, you can choose font sizes depending on which chart type you are using.
• Broken line: A disjointed line that breaks when a data point is missing. This is the default missing data
format.
• Continuous line: Displays a continuous line by skipping over the missing data point and connecting the
line to the next available data point in the series.
• Show as zero: Sets the value of the missing data point to zero.
1. On the analysis page, choose the visual that you want to format.
2. Choose the Format visual icon in the upper right corner of the visual to access the Format visual
menu.
3. Open the Y axis pane of the format visual menu and navigate to the Missing data section.
4. Select the missing data format that you want.
529
Amazon QuickSight User Guide
Formatting visuals
By default, the axis range starts at 0 and ends with the highest value for the measure being displayed.
For the group-by axis, you can use the data zoom tool on the visual to dynamically adjust the scale.
1. On the analysis page, choose the visual that you want to format.
2. Choose the control menu at the upper-right corner of the visual, and then choose the cog icon.
3. On the Format Visual pane, choose X-Axis or Y-Axis, depending on what type of visual you are
customizing. This is the X-Axis section for horizontal bar charts, the Y-Axis section for vertical bar
charts and line charts, and both axes are available for scatter plots. On combo charts, use Bars and
Lines instead.
4. Enter a new name in the box to rename the axis. To revert to the default name, delete your entry.
5. Set the range for the axis by choosing one of the following options:
• Choose Auto (starting at 0) to have the range start at 0 and end around the highest value for the
measure being displayed.
• Choose Auto (based on data range) to have the range start at the lowest value for the measure
being displayed and end around the highest value for the measure being displayed.
• Choose Custom to have the range start and end at values that you specify.
If you choose Custom, enter the start and end values in the fields in that section. Typically, you
use integers for the range values. For stacked 100 percent bar charts, use a decimal value to
indicate the percentage that you want. For example, if you want the range to be 0–30 percent
instead of 0–100 percent, enter 0 for the start value and .3 for the end value.
530
Amazon QuickSight User Guide
Formatting visuals
6. For Scale, the default is linear scale. To show logarithmic scale, also called log scale, enable the
logarithmic option. QuickSight chooses the axis labels to display based on the range of values in
that axis.
• On a linear scale, the axis labels are evenly spaced to show the arithmetical difference between
them. The labels display the numbers in sets like {1000, 2000, 3000…} or {0, 50 million, 100
million…}, but not {10 thousand, 1 million, 1 billion…}.
Examples:
• Profits in different regions of the same country
• Costs incurred for manufacture of an item
• On a logarithmic scale, the axis values are spaced to show the orders of magnitude as a way of
comparing them. The log scale is often used to display very large ranges of values or percentages,
or to show exponential growth.
Examples:
• High yield stock prices over a long range of time
• Growth of pandemic infection rates
7. To customize the number of values to show on the axis labels, enter in an integer between 1 and 50.
8. For combo charts, choose Single Y Axis to synchronize the Y-axes for both bars and lines into a
single axis.
9. Close the Format Visual pane by choosing the X icon in the upper-right corner of the pane.
You can format axis lines, grid lines, and axis labels and axis sort icons for the following chart types:
• Bar charts
• Box plot charts
• Combo charts
531
Amazon QuickSight User Guide
Formatting visuals
• Histograms
• Line charts
• Scatter plots
• Waterfall charts
1. On the analysis page, choose the visual that you want to format.
2. On the menu in the upper-right corner of the visual, select the format visual icon.
1. In the Format visual pane, choose the axis that you want to format.
2. Choose Show axis line. Clear the check box to hide the axis line for the chosen axis. Select the check
box to show it.
1. In the Format visual pane, choose the axis that you want to format.
2. Choose Show title. Clear the check box to hide the axis title and drop-down caret icon for the
chosen axis. Select the check box to show them.
3. To change the title from the default field name, enter a title in the text box.
Note
In addition to the chart types listed previously in this topic, you can also customize the axis titles
in pie charts, donut charts, funnel charts, heat maps, and tree maps.
532
Amazon QuickSight User Guide
Formatting visuals
1. In the Format visual pane, choose the axis that you want to format.
2. Choose Show sort. Clear the check box to hide the sort icon for the chosen axis. Select the check box
to show it.
When you choose to remove the sort icon, the sort icon is removed from the axis. Any sorts that
were applied to the visual before removing the icon are not removed from the visual.
Note
In addition to the chart types listed previously in this topic, you can also show or hide the sort
icon in pie charts, donut charts, funnel charts, heat maps, and tree maps.
The data zoom bar appears automatically on charts with an X-axis that contain more than one data
point. Adjust the bar from the left and right to zoom to specific data points in the chart.
Note
If you zoom in or out using the data zoom bar, and then choose to hide the data zoom bar,
the zoom position isn't maintained. The visual zooms completely out to include all data
points. Showing the data zoom again returns the visual to its previous state.
1. In the Format visual pane, choose the axis that you want to format.
2. Choose Show labels. Clear the check box to hide the axis labels for the chosen axis. Select the check
box to show it.
1. In the Format visual pane, choose the axis that you want to format.
2. For Label size, choose a size.
1. In the Format visual pane, choose the axis that you want to format.
2. For Label orientation, choose an orientation.
1. In the Format visual pane, choose the axis that you want to format.
2. Choose Show grid lines. Clear the check box to hide grid lines for the chosen axis. Select the check
box to show it.
533
Amazon QuickSight User Guide
Formatting visuals
limits in values. The reference line isn't part of the data that's used to build a chart. Instead, it's based on
a value that you enter or a field that you identify in the dataset used by a chart.
• Bar charts
• Line charts
• Combo charts
You can create, change, and delete reference lines while designing an analysis. You can customize the
line pattern, the label font, and the colors for each of those separately. You can show numeric values as
numbers, currency, or percent. You can also customize a value's numerical format in the same way that
you can customize a field in the field well.
• A constant line displays at a position that's based on a value that you specify in the format settings.
This value doesn't need to relate to any field. You can customize the formatting of the line.
• A calculated line displays at a position that's based on a value that is the result of a function. During
configuration, you specify which measure (metric) you want to use and which aggregation to apply.
These are the same aggregations you can apply to in the field wells. Then, you need to provide an
aggregation to apply to the field calculation for the reference line, for example average, minimum,
maximum, or percentile. The field needs to be in the dataset used by the chart, although it doesn't
need to be displayed in the chart's field wells.
1. Choose your visualization so that it's highlighted and its menu appears. To open the formatting
534
Amazon QuickSight User Guide
Formatting visuals
• Data
• Type – The type of reference line that you want to use. Choose one of the following options:
• To create a constant line based on a single value that you enter, choose Constant line.
• To create a calculated line based on a field, choose Calculated line.
• Value – (For constant lines only) The value that you want to use. This becomes the location of
the line on the visual. It appears immediately, so you can experiment with the setting.
• Column – (For calculated lines only) The column that you want to use for the reference line.
• Aggregated as (column) – (For calculated lines only) The aggregation that you want to apply to
the selected column.
• Calculate – (For calculated lines only) The calculation that you want to apply to the
aggregation.
• Percentile value – (Only if you set Calculate to Percentile) Enter a number from 1 through 100.
• Chart type – (For combo charts) Choose Bars or Lines.
• Line style
• Pattern – The pattern used for the line. Valid options include Dashed, Dotted, and Solid.
• Color – The color used for the line.
• Label
• Type – The type of label to display. Valid options include Value only, Custom text, Custom text
and value, No label. If you choose an option that includes custom text, enter the label text that
you want to appear on the line.
• Enter custom text (text box) – (Only if you set Type to Custom text and value) Choose where to
show the value in relation to the label. Valid options are Left or Right.
• Position – The position of the label in relation to the line. Valid options include a combination
of the following: left, middle, right, above, and below.
• Value format – The format to use for the value. Choose one of the following:
• Same as value – Uses the formatting that's already selected for this field in the visualization.
• Show as – Choose from the available options, for example number, currency, or percent.
• Format – Choose from the available formatting options.
• Font size – The font size to use for the label text.
• Color – The color to use for the label text.
5. Choose Done to save your selections.
1. Choose your visualization so that it's highlighted and its menu appears. To open the formatting
Existing reference lines appear in a list, followed by an Add new line button.
535
Amazon QuickSight User Guide
Formatting visuals
1. Choose your visualization so that it's highlighted and its menu appears. To open the formatting
1. Choose your visualization so that it's highlighted and its menu appears. To open the formatting
• Bar charts (both horizontal and vertical) support the following formatting:
• Customize, display, or hide title, field labels, and data labels
• Customize, display, or hide legend (exception: simple charts without clustering or multiple measures
don't show a legend)
• Specify axis range and steps on the x-axis for horizontal bar charts, and on the y-axis for vertical bar
charts
• Choose how many data points to display on the x-axis for vertical bar charts, and on the y-axis for
horizontal bar charts
• Show or hide axis lines, axis labels, axis sort icons, and chart grid lines
• Customize, display, or remove reference lines
• Show or hide the "other" category
Horizontal bar charts support sorting on the y-axis and Value. Vertical bar charts support sorting on
the x-axis and Value.
536
Amazon QuickSight User Guide
Formatting visuals
• Synchronize the Y axes for both bars and lines into a single axis.
• Choose how many data points to display on the x-axis
• Show or hide axis lines, axis labels, axis sort icons, and chart grid lines
• Customize, display, or remove reference lines
• Show or hide the "other" category
• Show or hide axis lines, axis labels, axis sort icons, and chart grid lines
Line charts support sorting on the x-axis and Value for numeric purposes only.
• Pie charts support the following formatting:
• Customize, display, or hide title, data labels, and legend
• Customize, display, or hide the labels for group or color and value fields
• Show metrics as values, percentages, or both
• Choose how many slices to display from the Group/Color field
• Show or hide the "other" category
Pivot tables support sorting on Column and Row. For more information on sorting pivot table data,
see Sorting pivot tables in Amazon QuickSight (p. 452).
• Scatter plots support the following formatting:
• Customize, display, or hide title, legend, field labels, and data labels
• Customize, display, or remove reference lines
• Specify axis range (on x-axis and y-axis)
• Show or hide axis lines, axis labels, axis sort icons, and chart grid lines
To duplicate a visual, on the v-shaped on-visual menu, choose Duplicate visual to, then choose the sheet
where you want the visual to appear. The display automatically shows you the duplicated visual.
Duplicated visuals keep all the same filters and settings as the source visual. However, if you duplicate
a visual onto a different sheet, all of its copied filters apply to the duplicate only. All copied filters are
scoped down to apply only to that visual. If you want the filters to apply to more visuals on the new
sheet, edit the filter and change the setting.
Parameters and controls apply to all sheets. To make parameter controls work with a visual that you
duplicate to a different sheet, add filters on the target sheet and connect them to the parameter. To do
this, choose Custom filter as the filter type.
539
Amazon QuickSight User Guide
Renaming visuals
To rename a visual
1. On the analysis page, choose the visual that you want to rename.
2. Select the visual name at the top left of the visual and enter a new name.
3. Press Enter or click outside of the visual name field to save the new name.
Use the following sections to learn more about viewing data in visuals.
Topics
• Viewing visual details (p. 540)
• Scrolling through visual data (p. 541)
• Focusing on visual elements (p. 542)
• Excluding visual elements (p. 544)
• Searching for specific values in your data in Amazon QuickSight (p. 544)
540
Amazon QuickSight User Guide
Viewing visual data
Hovering your cursor over a single data point on a scatter plot also displays information about that
specific data point.
You can customize the information that appears when you hover your cursor over data in a chart. For
more information, see Customizing visual tooltips (p. 507).
In these cases, scrub bars appear so you can either reduce the data that is displayed or scrub through it.
This process is similar to the way that you can scrub through a video.
To reduce the length of the scrub bar, hover over one end of it until the cursor changes shape. Then drag
the widget to make the scrub bar larger or smaller. To scroll through the data, click and hold the scrub
bar and slide it toward the end that you want to see.
541
Amazon QuickSight User Guide
Viewing visual data
Focusing on or excluding data causes Amazon QuickSight to create a filter and show only the data that
you selected.
542
Amazon QuickSight User Guide
Viewing visual data
To remove the filter, choose Filters at left and then disable or delete the filter. You can also use Undo to
remove a filter.
If your visual has a legend that shows categories (dimensions), you can click on the values in the legend
to see a menu of available actions. For example, suppose that your bar chart has a field in the Color or
Group/Color field well. The bar chart menu displays the actions that you can choose by clicking or right-
clicking on a bar, such as the following:
The following screenshot shows how to use the legend for focusing on, or excluding, a dimension.
543
Amazon QuickSight User Guide
Viewing visual data
Excluding the element creates a filter that removes only that element from the visual.
To see the excluded element again, you can either choose Undo on the application bar, or you can
disable or delete the filter.
For more information about filters, see Filtering data in Amazon QuickSight (p. 324).
You can search for specific values or all values that contain a specific search query. For example,
searching for al in a list of U.S. states returns Alabama, Alaska, and California.
544
Amazon QuickSight User Guide
Viewing visual data
You can also use wildcard search to search for all values that match a specific character pattern. For
example, you can search for all U.S. states that end with the letters ia and narrow the results down to
California, Georgia, Pennsylvania, Virginia, and West Virginia.
To search for values in a filter or control, enter a search query in the search bar.
• * - Use an asterisk symbol to search for values that match zero to many characters in a specific
position.
• ? - Use a question mark to match a single character in a specific position.
• \ - Use a backslash to escape the *, ?, or \ wildcard characters and search for them in your query. For
example, you can search for phrases that end with a question mark.
Following are examples of how supported wildcard characters can be used in a QuickSight search query.
• al - This query searches for all values with al and returns Alabama, Alaska, and California.
• al* - This query searches for all values that begin with al and end with zero to multiple characters. It
returns Alabama, and Alaska in a list of U.S. states.
• *ia - This query searches for all values that begin with zero to multiple characters and end with
letters ia. It returns California, Georgia, Pennsylvania, Virginia, and West Virginia.
• *al* - This query searches for all values with zero to multiple characters before and after the letters
al. It returns Alabama, Alaska, and California.
• a?a?a?a - This query searches for all values with a single character in the exact positions between the
a letters. It returns Alabama.
• a?a*a - This query searches for all values with a single character between the first two a letters and
multiple characters between the second two a letters. It returns Alabama and Alaska.
• How*\? - This query searches for values that begin with How, followed by zero to multiple characters,
and end with a question mark. The backslash (\) in this query informs QuickSight to search for
question marks in each value, rather than use the question mark symbol as a wildcard character. This
query returns the questions, How are you? and, How is this possible?
• \** - This query searches for values that begin with an asterisk and are followed by zero to multiple
characters. The backslash (\) in this query informs QuickSight to search for an actual asterisk in the
values, rather than use the asterisk symbol as a wildcard character. This query returns values such as
*all, *above, and *below.
• \\* - This query searches for values with a backslash, followed by zero to multiple characters. The
first backslash (\) in this query informs QuickSight to search for the second backslash (\) in each
value, rather than use the backslash symbol as a wildcard character. This query returns results such as
\Home.
• ??? - This query searches for values that contain three characters. It returns values such as ant, bug,
and car.
545
Amazon QuickSight User Guide
Exporting data from visuals
Using the Amazon QuickSight console, you can export data from any type of chart or graph. The export
contains only the data in the fields that are currently visible in the selected visualization. Any data that is
filtered out is excluded from the export file. You can export data into the following formats:
• A text file containing comma-separated values (CSV), available for all visual types.
• A Microsoft Excel workbook file (.xslx), available for pivot tables and table charts only.
• Exported files are downloaded to the default download directory configured in the browser that you're
currently using.
• The downloaded file is named for the visualization that you exported it from. To make the file name
unique, it has a sequential timestamp (a Unix epoch data type).
• For table charts, Amazon QuickSight supports exporting up to 1 million rows or 500 MB of data,
whichever limit is reached first.
For all other visuals, including pivot tables, the limits that apply to exporting are the same limits that
apply to the visual type.
• You can't export data from an insight, because insights consume the data, but don't contain the data.
• QuickSight doesn't support exporting data from more than a single visualization at a time. To export
data from additional visuals in the same analysis or dashboard, repeat this process for each visual. To
export all the data from a dashboard or analysis, you need to connect to the original data source using
valid credentials and a tool that you can use to extract data.
Use the following procedure to export data from a visualization in Amazon QuickSight. Before you begin,
open the analysis or dashboard that contains the data that you want to export.
1. Choose the visualization that you want to export. Make sure that it is selected and highlighted.
2. At top right on the visual, open the menu and choose one of the following:
546
Amazon QuickSight User Guide
Deleting visuals
new sheet after a parameter or filter changes, only the visuals affected by the change refresh on the new
sheet. Otherwise, visuals update every 30 minutes when you switch sheets. This is the default behavior
for all analyses and dashboards.
If you want to refresh all visuals when you switch sheets, regardless of a change, you can do so for each
analysis that you create.
To refresh all visuals each time that you switch sheets in an analysis
To delete a visual
1. On the analysis page, choose the visual that you want to delete.
2. Choose the on-visual menu at the upper-right corner of the visual, and then choose Delete.
Topics
• Changing fields used by a visual in Amazon QuickSight (p. 548)
• Sorting visual data in Amazon QuickSight (p. 571)
547
Amazon QuickSight User Guide
Changing fields used by a visual
The field wells, on-visual editors, and drop targets available for a specific visual depends on the
visual type selected. For details, see the appropriate visual type topic in the Visual types in Amazon
QuickSight (p. 387) section.
Important
You can also change the data type and format of numeric fields by using field wells and on-
visual editors. If you change a field in this way, it changes for the selected visual only. For more
information about changing numeric field data types and formats, see Changing fields used by a
visual in Amazon QuickSight (p. 548).
Use the following topics to learn more about adding, removing, and modifying fields on a visual.
Topics
• Using visual field controls (p. 548)
• Adding or removing a field (p. 552)
• Changing the field associated with a visual element (p. 554)
• Changing field aggregation (p. 555)
• Changing date field granularity (p. 558)
• Customizing a field format (p. 560)
• The field wells. The following screenshot shows the field wells in the default closed state.
548
Amazon QuickSight User Guide
Changing fields used by a visual
Click anywhere on the Field wells to open the field wells. The following screenshot shows the field
wells in the open state.
549
Amazon QuickSight User Guide
Changing fields used by a visual
550
Amazon QuickSight User Guide
Changing fields used by a visual
• You can create a visual and assign fields to different elements on it by selecting fields in the Fields list
pane, or dragging fields to field wells or drop targets.
• You can change the field associated with a visual element by dragging a field to a drop target or field
well, or selecting a different field in a field well or on-visual editor.
• You can change field aggregation or date granularity by using the field wells or the on-visual editors.
The field wells, on-visual editors, and drop targets available on a specific visual depends on the visual
type selected.
For example, when you drag a measure to the value drop target on a new single-measure line chart, you
see the drop target color-coded green. That green color coding indicates that the drop target expects a
measure. The drag label indicates that the target is available to add a field.
551
Amazon QuickSight User Guide
Changing fields used by a visual
When you drag a dimension to the x-axis or color drop target on a new line chart, you see a label color-
coded blue. That blue color coding indicates that the drop target expects a dimension. The drag label
indicates that the target is available to add a field.
You can also drag a measure or dimension to a drop target on a line chart where the element is already
associated with a field. In this case, the drag label indicates that you are replacing the field currently
associated with the drop target.
On some charts, the Axistitle field is hidden when there are two or more fields in the Value field on any
side of the chart. This effect can happen with the following charts:
• Bar charts
552
Amazon QuickSight User Guide
Changing fields used by a visual
• Line charts
• Box plots
• Combo charts
• Waterfall charts
To remove a field from a visual, clear selection from it in the Fields list pane. Or choose an on-visual
editor or field well that uses that field, and then choose Remove from the context (right-click) menu.
553
Amazon QuickSight User Guide
Changing fields used by a visual
2. Drag the field that you want to add from the Fields list pane to the appropriate field well.
Note
You can add the same value to the same visual multiple times. You can do so to show the same
value with different aggregations or table calculations applied. By default, the fields all display
the same label. You can edit the names by using the Format Visual panel, which you open by
choosing the V-shaped icon at top right.
1. On the visual, choose the on-visual editor for the visual element for which you want to change the
field.
2. On the on-visual editor menu, choose the field that you want to associate with that visual element.
554
Amazon QuickSight User Guide
Changing fields used by a visual
2. Choose the field well that represents the element that you want to remap, and then choose a new
field from the menu that appears.
555
Amazon QuickSight User Guide
Changing fields used by a visual
• Count – Provides a count of the number of records containing the selected measure for a given
dimension. An example is a count of Order ID by State.
• Distinct Count – Provides a count of how many different values are in the selected measure, for the
selected dimension or dimensions. An example is a count of Product by Region. A simple count can
show how many products are sold for each region. A distinct count can show how many different
products are sold for each region. You might have sold 2,000 items, but only two different types of
items.
• Max – Calculates the maximum value for the selected field.
• Min – Calculates the minimum value for the selected field.
• Median – Calculates the median value of the specified measure, grouped by the chosen dimension or
dimensions.
• Sum – Totals all of the values for the selected field.
• Standard Deviation – Calculates the standard deviation of the set of numbers in the specified measure,
grouped by the chosen dimension or dimensions, based on a sample or on a biased population.
• Variance – Calculates the variance of the set of numbers in the specified measure, grouped by the
chosen dimension or dimensions, based on a sample or on a biased population.
• Percentile – Computes the nth percentile of the specified measure, grouped by the chosen dimension
or dimensions.
All aggregate functions can be applied to numeric fields. Count is automatically applied to a dimension
if you choose to use it in a field well that expects a measure. If you have used a dimension in that way,
you can also change the aggregate function applied to it. You can't apply aggregate functions to fields in
dimension field wells.
The visual elements that support aggregated fields varies by visual type.
1. On the visual, choose the on-visual editor for the field that you want to apply aggregation to.
2. On the on-visual editor menu, choose Aggregate, then choose the aggregate function that you want
to apply.
556
Amazon QuickSight User Guide
Changing fields used by a visual
2. Choose the field well containing the field that you want to apply an aggregate function to.
557
Amazon QuickSight User Guide
Changing fields used by a visual
3. On the field well menu, choose Aggregate, then choose the aggregate function that you want to
apply.
• Year
• Quarter
• Month
• Week
• Day (this is the default)
• Hour
• Minute
• Second
Hour and minute are available only if the field contains time data.
1. On the visual, choose the field well for the date field whose granularity you want to change.
2. On the field well menu, choose Aggregate, then choose the time interval that you want to apply, as
shown following:
558
Amazon QuickSight User Guide
Changing fields used by a visual
2. Choose the field well containing the date field, and then choose Aggregate. Choose the date
granularity that you want to use.
559
Amazon QuickSight User Guide
Changing fields used by a visual
1. In an analysis, choose a field to format, either by choosing it in the field well or in the Fields list of
the Visualize pane.
2. Choose Show as to change how the field shows in the analysis, and choose from the options on the
context menu. The list of available options varies based on the field's data type. If you choose a non-
numeric field from the fields list, you can change the count format, which is the formatting used
when the field is counted.
3. Choose Format to change the format of the field, and choose from the options on the context
menu. If you don't see an option that you want to use, choose More formatting options from the
context menu.
The Format Data pane opens, presenting options for the type of numeric or date field you chose.
The following screenshots show the Format Data pane.
560
Amazon QuickSight User Guide
Changing fields used by a visual
The options for Show as from the context menu now appear in the drop-down list at the top of the
Format Data pane. The rest of the options are specific to the data type and how you choose to show
the field.
For date and time data, the default format pattern is YYYY-MM-DDTHH:mm:ssZZ, for example
2016-09-22T17:00:00-07:00.
For numbers, you can choose from the following units to display after the number:
• Dollars ($)
• Euros (€)
• Pounds (£)
• Yen (¥)
561
Amazon QuickSight User Guide
Changing fields used by a visual
Use menu options in the Field list pane or the visual field wells to make simple format changes, or use
the Format data pane to make more extensive formatting changes.
Topics
• Format a currency field (p. 562)
• Format a date field (p. 563)
• Format a number field (p. 568)
• Format a percent field (p. 569)
• Format a text field (p. 571)
• Return a field's format to default settings (p. 571)
When you format a currency field, you can either choose the currency symbol from a list of common
options, or open the Format data pane and manually format the field. Manually formatting the field
allows you to choose which symbol to use, which separators to use, the number of decimal places to
show, which units to use, and how to display negative numbers.
Changing a field format changes it for all visuals in the analysis, but does not change it in the underlying
dataset.
If you want to choose the symbol for a currency field from a list of common options, you can access such
a list in several ways. You can access it from the Field list pane, an on-visual editor, or a visual field well.
• In the Field list pane, choose the selector icon to the right of the number field that you want to
format.
• On any visual that contains an on-visual editor associated with the currency field that you want to
format, choose that on-visual editor. Expand the Field wells pane, and then choose the field well
associated with the number field that you want to change.
2. Choose Format, and then choose the currency field that you want:
• In the Field list pane, choose the selector icon to the right of the number field that you want to
format.
• On any visual that contains an on-visual editor associated with the number field that you want to
format, choose that on-visual editor. Expand the Field wells pane, and then choose the field well
associated with the number field that you want to change.
562
Amazon QuickSight User Guide
Changing fields used by a visual
• Under Decimal, choose a dot or a comma for the decimal separator. A dot is the default. If you
choose a comma instead, use a dot or a space as the thousands separator.
• Under Thousands, select or clear Enabled to indicate whether you want to use a thousands
separator. Enabled is selected by default.
• If you are using a thousands separator, choose whether to use a comma, dot, or space for the
separator. A comma is the default. If you choose a dot instead, use a comma as the decimal
separator.
5. Expand the Decimal Places section and choose the number of decimal places to use. The default is
2. Field values are rounded to the decimal places specified. For example, if you specify two decimal
places, the value 6.728 is rounded to 6.73.
6. Expand the Units section and choose from the following options:
• Choose the unit to use. Choosing a unit adds the appropriate suffix to the number value. For
example, if you choose Thousands, a field value of 1234 displays as 1.234K.
When you format a date field, you can choose a list of common formatting options. Or you can open the
Format data pane to choose from a list of common formats, or specify custom formatting for the date
and time values.
Changing a field format changes it for all visuals in the analysis that use that dataset, but does not
change it in the dataset itself.
563
Amazon QuickSight User Guide
Changing fields used by a visual
If you want to format a date field by choosing from a list of common options, you can access such a list
in several ways. You can access it from the Field list pane, a visual on-visual editor, or a visual field well.
• In the Field list pane, choose the selector icon to the right of the number field that you want to
format.
• On any visual that contains an on-visual editor associated with the number field that you want to
format, choose that on-visual editor. Expand the Field wells pane, and then choose the field well
associated with the number field that you want to change.
2. Choose Format, and then choose the format that you want. The following quick formatting options
are offered for date fields:
• In the Field list pane, choose the selector icon to the right of the number field that you want to
format.
• On any visual that contains an on-visual editor associated with the number field that you want to
format, choose that on-visual editor. Expand the Field wells pane, and then choose the field well
associated with the number field that you want to change.
2. Choose Format, and then choose More Formatting Options.
The default selection is Custom, with a default format pattern of MMM D, YYYY h:mma, for example
Sep 20, 2022 5:30pm.
4. Expand the Time section. Choose an existing time format, or choose Custom and specify a format
pattern in the Custom section lower down in the Format data pane. If you choose Custom for the
Time section, you must also choose Custom for the preceding Date section. The pattern that you
specify in the Custom section must include any date and time formatting that you want.
The default selection is Custom, with a default format pattern of MMM D, YYYY h:mma, for example
Sep 20, 2022 5:30pm.
5. If you chose Custom in the Date and Time sections, expand the Custom section and specify the
format pattern that you want, using the format pattern syntax specified in Moment.js Display
Format in the Moment.js JavaScript documentation.
Note
Time zone related display tokens (Z and z) from the Moment.js library are not supported in
QuickSight.
If you chose something other than Custom in the Date and Time sections, Custom is populated with
the format pattern that reflects your selections. For example, if you chose Jun 21, 2016 in the Date
564
Amazon QuickSight User Guide
Changing fields used by a visual
section and 17:00:00pm in the Time section, the Custom section shows the format pattern MMM D,
YYYY H:mm:ssa.
6. (Optional) Expand the Custom section and use Preview to verify your specified format.
7. Expand the Null values section and choose whether to display null values as null or as a custom
value. Using null is the default.
In Amazon QuickSight, you can customize how dates are formatted in your filter and parameter controls.
For example, you can specify to format the date in a control as 20-09-2021, or, if you'd rather, as
09-20-2021. You can also specify to shorten the month in your dates (such as September) to three
letters (Sep), among other customizations.
Following is a list of tokens you can use to create custom date formats. You can use them in combination
with one another to control how dates appear in your controls.
99 or 21 A 2-digit representation of a YY
year.
565
Amazon QuickSight User Guide
Changing fields used by a visual
am or pm am/pm a
AM or PM AM/PM A
566
Amazon QuickSight User Guide
Changing fields used by a visual
To quickly customize dates and times to appear as one of the following example formats, you can use
the following QuickSight preset tokens.
Example Token
8:30 PM LT
8:30:25 PM LTS
August 2 1985 LL
Aug 2 1985 ll
Following are three common date examples and their associated token formats for your quick reference.
Monday, September 20, 2021 17:30:15 dddd, MMMM DD, YYYY HH:mm:ss
To include words in your date formats, such as the word "of" in 20th of Sep, 2021, enter backslashes
(\) before each character in the word. For example, for the 20th of Sep, 2021 date example, use the
following token format: Do \o\f MMM, YYYY.
Use the following procedure to learn how to use date token formats to customize dates for a filter
control.
1. In a QuickSight analysis, choose the filter control that you want to customize.
2. On the filter control, choose the Edit control icon.
567
Amazon QuickSight User Guide
Changing fields used by a visual
3. On the Edit control page that opens, for Date format, enter the custom date format that you want.
Use the tokens listed previously in this topic.
For example, let's say that you want to customize your dates using the following format: Sep 3rd,
2020 at 5pm. To do so, you can enter the following token format:
A preview of the date format appears below the input field as you enter each token.
4. Choose Apply.
When you format a number field, you can choose the decimal place and thousand separator format
from a list of common options. Or you can open the Format Data pane and manually format the field.
Manually formatting the field enables you to choose which separators to use and the number of decimal
places to show. It also enables you to choose which units to use, and how to display negative numbers.
Changing a field format changes it for all visuals in the analysis, but does not change it in the underlying
dataset.
If you want to format a number field by choosing from a list of common options, you can access such a
list from the Field list pane, an on-visual editor, or a visual field well.
3. Expand the Separators section and choose from the following options:
• Under Decimal, choose a dot or a comma for the decimal separator. A dot is the default. If you
choose a comma instead, use a dot or a space as the thousands separator.
• Under Thousands, select or clear Enabled to indicate whether you want to use a thousands
separator. Enabled is selected by default.
• If you are using a thousands separator, choose whether to use a comma, dot, or space for the
separator. A comma is the default. If you choose a dot instead, use a comma as the decimal
separator.
4. Expand the Decimal Places section and choose from the following options:
• Choose Auto to have Amazon QuickSight automatically determine the appropriate number of
decimal places, or choose Custom to specify a number of decimal places. Auto is the default.
• If you chose Custom, enter the number of decimal places to use. Field values are rounded to the
decimal places specified. For example, if you specify two decimal places, the value 6.728 is rounded
to 6.73.
5. Expand the Units section and choose from the following options:
• Choose the unit to use. Choosing a unit adds the appropriate suffix to the number value. For
example, if you choose Thousands, a field value of 1234 displays as 1.234K.
When you format a percent field, you can choose the number of decimal places from a list of common
options. Or you can open the Format data pane and manually format the field. Manually formatting the
field enables you to choose which separators to use. It also enables you to choose the number of decimal
places to show and how to display negative numbers.
Changing a field format changes it for all visuals in the analysis, but does not change it in the underlying
dataset.
If you want to choose the number of decimal places for a percent field from a list of common options,
you can access such a list in several ways. You can access it from the Field list pane, an on-visual editor,
or a visual field well.
• In the Field list pane, choose the selector icon to the right of the number field that you want to
format.
• On any visual that contains an on-visual editor associated with the percent field that you want to
format, choose that on-visual editor. Expand the Field wells pane, and then choose the field well
associated with the number field that you want to change.
2. Choose Format, and then choose the number of decimal places that you want. The following quick
formats are offered for percent fields:
• In the Field list pane, choose the selector icon to the right of the number field that you want to
format.
• On any visual that contains an on-visual editor associated with the number field that you want to
format, choose that on-visual editor. Expand the Field wells pane, and then choose the field well
associated with the number field that you want to change.
2. Choose Format, and then choose More Formatting Options.
• Under Decimal, choose a dot or a comma for the decimal separator. A dot is the default. If you
choose a comma instead, use a dot or a space as the thousands separator.
• Under Thousands, select or clear Enabled to indicate whether you want to use a thousands
separator. Enabled is selected by default.
• If you are using a thousands separator, choose whether to use a comma, dot, or space for the
separator. A comma is the default. If you choose a dot instead, use a comma as the decimal
separator.
4. Expand the Decimal Places section and choose from the following options:
• Choose Auto to have Amazon QuickSight automatically determine the appropriate number of
decimal places, or choose Custom to specify a number of decimal places. Auto is the default.
• If you chose Custom, enter the number of decimal places to use. Field values are rounded to
the decimal places specified. For example, if you specify two decimal places, the value 6.728 is
rounded to 6.73.
5. Expand the Negatives section and choose whether to display a negative value by using a minus sign
or by enclosing it in parentheses. Using a minus sign is the default.
6. Expand the Null values section and choose whether to display null values as null or as a custom
value. Using null is the default.
Note
When using a table or pivot table, null values only display for fields that are placed in
the Rows, Columns, or Group by field wells. Null values for fields in the Values field well
appear empty in the table or pivot table.
570
Amazon QuickSight User Guide
Sorting visual data
• In the Field list pane, choose the selector icon to the right of the number field that you want to
format.
• On any visual that contains an on-visual editor associated with the percent field that you want to
format, choose that on-visual editor. Expand the Field wells pane, and then choose the field well
associated with the number field that you want to change.
2. Choose Format, and then choose More Formatting Options.
1. In the Field list pane, choose the selector icon to the right of the field that you want to reset.
2. Choose Format, and then choose More Formatting options.
Pivot tables behave differently than tables when sorting values. For more information about sorting
pivot tables, see Sorting pivot tables in Amazon QuickSight (p. 452).
For SPICE datasets, you can sort text strings of sizes up to the following limitations:
When you exceed the limitations, the visual displays a notification at the upper right.
You can sort any visual type that supports sorting. If a visual type supports sorting, you can sort by using
either the quick sort option or a field well.
571
Amazon QuickSight User Guide
Sorting visual data
• Choose the sort icon that appears near the field name on either axis. In direct queries, this icon
appears for any data type. For SPICE, this icon is available only for datetime, numeric, and decimal
data types.
• Choose the field name and then choose the sort option from the menu. If the label doesn't display
on the axis, check the visual format to see if the axis is set to display labels. The display labels
are automatically hidden on smaller visuals. You might need to make the visual large enough to
display labels.
1. Open the analysis with the visual that you want to sort and click anywhere on Field wells to expand
the field wells.
572
Amazon QuickSight User Guide
Arranging visuals in dashboards
2. Choose a field well that supports sorting, then choose Sort by, Sort options.
3. On the Sort options pane, sort by specific fields, choose an aggregation, or sort ascending or
descending, or do a combination of these.
Amazon QuickSight Sort options pane to sort by off-visual fields.
4. Choose Apply to save your changes. Or choose Clear to start over or Cancel to go back.
1. Open the analysis with the visual you want to sort and click anywhere on Field wells to expand the
field wells.
573
Amazon QuickSight User Guide
Customizing dashboard layouts
Topics
• Customizing dashboard layouts in Amazon QuickSight (p. 574)
• Adding interactivity to dashboards in Amazon QuickSight (p. 583)
Use the following topics to learn more about customizing dashboards and visuals.
Topics
• Types of layout (p. 574)
• Choosing a layout (p. 575)
• Customizing visuals in a free-form layout (p. 576)
• Conditional rules (p. 580)
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.
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.
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.
574
Amazon QuickSight User Guide
Customizing dashboard layouts
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 QuickSight 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. From the Amazon QuickSight start page, choose Analyses, and then choose the analysis that you
want to change.
2. On the analysis page, choose Settings at left.
575
Amazon QuickSight User Guide
Customizing dashboard layouts
3. In the Settings pane, under Dashboard layouts, choose the layout you want.
4. When finished, choose Apply.
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.
4. 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.
576
Amazon QuickSight User Guide
Customizing dashboard layouts
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.
You can also enter a color's hexadecimal code or change the color's opacity.
6. Choose Apply.
577
Amazon QuickSight User Guide
Customizing dashboard layouts
You can also reset a visual’s customized background back to its default appearance.
You can also enter a color's hexadecimal code or change the color's opacity.
6. Choose Apply.
The Context menu opens on data-point clicks. Common actions in the Context menu include Focus,
Exclude, and Drill-down.
578
Amazon QuickSight User Guide
Customizing dashboard layouts
The On-visual menu appears on the top-right side of a visual. The On-visual menu is used to access
the Format visual menu, 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.
579
Amazon QuickSight User Guide
Customizing dashboard layouts
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
QuickSight (p. 583).
1. From the QuickStart start page, choose Analyses, and then choose the analysis that you want to
customize.
2. Choose the visual that you want to add a rule to.
580
Amazon QuickSight User Guide
Customizing dashboard layouts
3. On the menu in the upper-right hand side of the visual, choose Format visual.
4. In the Format visual menu, choose Rules.
5. In the Rules pane, 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.
1. From the Amazon QuickSight start page, choose Analyses, and then choose the analysis you want to
customize.
2. Choose the visual that you want to add a rule to.
3. On the menu in the upper-right hand side of the visual, choose Format visual.
4. In the Format visual pane that appears on the left, choose Rules.
5. Choose the Add box
6. In the first menu in the Add rule pane, choose the parameter you want.
7. 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.
8. Enter the value you want the conditional rule to meet.
Note
Values are case-sensitive.
9. Choose Add rule to apply the new conditional rule to the visual. To cancel the rule, choose Cancel.
1. On the menu in the upper-right hand side of the visual, choose Format visual.
2. In the Format visual pane that appears on the left, choose Rules.
581
Amazon QuickSight User Guide
Customizing dashboard layouts
3. Choose the menu icon on the right-hand side of the rule you want to edit, and choose Edit.
4. Make the changes that you want and choose Save.
1. On the menu in the upper-right hand side of the visual, choose Format visual.
2. In the Format visual pane that appears on the left, choose Rules.
3. Choose the menu icon on the right-hand side of the rule you want to edit and choose Delete.
1. From the QuickStart start page, choose Analyses, and then choose the analysis you want to
customize.
2. On the Controls bar at the top of your workspace, choose the dropdown icon.
3. Choose the parameter control associated with the conditional rule you created.
4. 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.
1. From the QuickStart start page, choose Analyses, and then choose the analysis you want to
customize.
2. On the Controls bar at the top of your workspace, choose the control that you want to move.
3. At the upper right-hand side of the control, open the Menu options menu.
4. Choose Move to sheet.
582
Amazon QuickSight User Guide
Adding interactivity to dashboards
Topics
• Parameters in Amazon QuickSight (p. 583)
• Using custom actions for filtering and navigating (p. 603)
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:
Some ways that you can use parameters are the following:
Topics
• Setting up parameters in Amazon QuickSight (p. 584)
• Using a control with a parameter in Amazon QuickSight (p. 585)
• Creating parameter defaults in Amazon QuickSight (p. 587)
• Connecting to parameters in Amazon QuickSight (p. 592)
583
Amazon QuickSight User Guide
Adding interactivity to dashboards
1. Choose an analysis to work with, and decide which field you want to parameterize.
2. Choose the Parameters pane from the left side of the screen.
3. Add a new parameter by choosing the add icon (+) 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.
4. For Name, enter an alphanumeric value for the parameter.
5. For Data type, choose String, Number, Integer, or Datetime, and then complete the following
steps.
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.
2. (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.
3. (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.
2. 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).
A dynamic default is a per-user default value for the first page load of the dashboard. Using a
dynamic default, you can create a personalized view for each user.
584
Amazon QuickSight User Guide
Adding interactivity to dashboards
Dynamic defaults don't prevent someone from selecting a different value. If you want to also secure
the data, you can add row-level locking. For more information, see Using row-level security (RLS)
with user-based rules to restrict access to a dataset (p. 109).
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 (p. 585).
7. 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.
• 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 (p. 545).
Use the following procedure 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.
585
Amazon QuickSight User Guide
Adding interactivity to dashboards
2. 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.
3. 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 (|), 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 Amazon QuickSight (p. 565).
4. (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.
5. (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.
6. (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.
• 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).
7. 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:
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 visuals in Amazon QuickSight (p. 496).
• 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.
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
587
Amazon QuickSight User Guide
Adding interactivity to dashboards
change this. To restrict the values that a person can select, consider using row-level security. For
more information, see Using row-level security (RLS) with user-based rules to restrict access to a
dataset (p. 109).
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 QuickSight (p. 584).
2. 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.
• After you create the dataset, make sure to double-check the data types that QuickSight 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 AWS CLI to get the information.
To run CLI commands, make sure that you have the AWS CLI installed and configured. For more
information, see Installing the AWS CLI in the AWS 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 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 QuickSight. This user name is often the same as a person's email alias before
the @ sign, but not always.
588
Amazon QuickSight User Guide
Adding interactivity to dashboards
To get a list of users, use the ListUsers QuickSight API operation or AWS CLI command. The CLI
command is shown in the following example. Specify the AWS Region for your identity provider,
for example us-east-1.
awsacct1="111111111111"
namespace="default"
region="us-east-1"
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"
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:quicksight:us-east-1:111111111111:user/default/anacasilva",
"UserName": "anacarolinasilva",
"Email": "[email protected]",
"Role": "ADMIN",
"Active": true,
"PrincipalId": "federated/iam/AIDAJ64EIEIOPX5CEIEIO"
},
{
"Arn": "arn:aws: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:quicksight:us-east-1:111111111111:user/default/embedding/
cxoportal",
"UserName": "embedding/cxoportal",
"Email": "[email protected]",
"Role": "AUTHOR",
"Active": true,
"PrincipalId": "federated/iam/AROAJTGEIEIOWB6BEIEIO:cxoportal"
},
{
"Arn": "arn:aws:quicksight:us-east-1:111111111111:user/default/
[email protected]",
"UserName": "[email protected]",
"Email": "[email protected]",
"Role": "AUTHOR",
"Active": true,
"PrincipalId": "user/d-96123-example-id-1123"
}
589
Amazon QuickSight User Guide
Adding interactivity to dashboards
• 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 QuickSight. To identify groups that you can add to the dataset, use one or
more of the following QuickSight API operations or CLI commands:
• ListGroups – Lists QuickSight groups by AWS account ID and namespace for the AWS Region
that contains your identity provider.
• ListGroupMemberships – Lists the users in the specified QuickSight group.
• ListUserGroups – Lists the QuickSight groups that a QuickSight 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.
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 QuickSight Enterprise edition.
2. 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.
590
Amazon QuickSight User Guide
Adding interactivity to dashboards
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 QuickSight Enterprise edition.
2. 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.
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.
3. Import this data into QuickSight, and save it as a new dataset.
4. 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 (p. 123).
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
591
Amazon QuickSight User Guide
Adding interactivity to dashboards
name. Also make sure that your analysis is using this dataset. For help with these requirements, see the
procedures preceding.
1. In the QuickSight console, open the Parameters menu at left and choose an existing parameter.
Choose Edit parameter from the parameter's menu. To add a new parameter, choose the plus (+)
sign near Parameters.
2. Choose Set a dynamic default.
3. 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.
4. Choose Apply to save your setting changes, and then choose Update to save the parameter changes.
To exit without saving changes, choose Cancel instead.
5. 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
QuickSight (p. 594)
Amazon QuickSight 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.
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 choose your next step from the shortcuts on this screen.
592
Amazon QuickSight User Guide
Adding interactivity to dashboards
• To create a filter, choose Filter to the left of the screen. 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 Parameters on the left. 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 in Amazon QuickSight (p. 594)
• Using calculated fields with parameters in Amazon QuickSight (p. 595)
• Using custom actions with parameters in Amazon QuickSight (p. 596)
593
Amazon QuickSight User Guide
Adding interactivity to dashboards
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.
2. 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.
3. Choose Use Parameters.
4. 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.
594
Amazon QuickSight User Guide
Adding interactivity to dashboards
Note
Parameters that can hold multiple values must use equal or not equal as the comparison
type.
5. 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.
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.
595
Amazon QuickSight User Guide
Adding interactivity to dashboards
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(
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.
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
QuickSight (p. 605). If you just want to use a parameter in a link without creating a URL action, see
Using parameters in a URL (p. 597).
596
Amazon QuickSight User Guide
Adding interactivity to dashboards
You can use a parameter name and value in a URL in Amazon QuickSight 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 AWS servers. This functionality keeps your data
values more secure.
• 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]".
• 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
597
Amazon QuickSight User Guide
Adding interactivity to dashboards
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 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 (p. 603).
When you create parameters in Amazon QuickSight, you can use them in titles and descriptions
throughout your charts and analyses to dynamically display parameter values.
598
Amazon QuickSight User Guide
Adding interactivity to dashboards
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 (p. 583).
Use the following procedure to learn how to add parameters to chart titles and subtitles.
1. Open the Format visual pane for the visual that you want to format.
2. In the Format visual pane, choose the Title tab.
3. Select Show title or Show subtitle. These options might already be selected.
4. Choose the three dots at the right of Edit title or Edit subtitle, and then choose a parameter from
the list.
599
Amazon QuickSight User Guide
Adding interactivity to dashboards
The parameter is added to the title in the Format visual pane. In the chart, the parameter value is
displayed in the title.
For more information about editing titles and subtitles in visuals, see Formatting a visual title and
subtitle (p. 497).
Use the following procedure to learn how to add parameters to axis titles.
1. Open the Format visual pane for the visual that you want to format.
2. In the Format visual pane, choose the axis that you want to format.
3. Select Show title.
4. Choose the three dots at the right of the default axis title, and then choose a parameter from the
list.
600
Amazon QuickSight User Guide
Adding interactivity to dashboards
The parameter is added to the axis title in the Format visual 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 (p. 531).
Use the following procedure to learn how to add parameters to legend titles.
1. Open the Format visual pane for the visual that you want to format.
2. In the Format visual pane, choose Legend.
3. Select Show legend title.
4. 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 Format visual pane. In the chart, the parameter
value is displayed in the legend title.
601
Amazon QuickSight User Guide
Adding interactivity to dashboards
For more information about formatting legends, see Customizing a visual legend (p. 499).
Use the following procedure to learn how to add parameters to parameter control titles.
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.
602
Amazon QuickSight User Guide
Adding interactivity to dashboards
For more information about using parameter controls, see Parameter controls (p. 585).
1. On the analysis page, choose Add in the application bar and then choose Add title or Add
description.
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 (p. 381).
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.
603
Amazon QuickSight User Guide
Adding interactivity to dashboards
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 (p. 159).
• 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 (p. 604)
• Creating and editing custom actions in Amazon QuickSight (p. 605)
• Repairing custom actions (p. 607)
• Understanding field mapping for custom actions in Amazon QuickSight (p. 608)
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
604
Amazon QuickSight User Guide
Adding interactivity to dashboards
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.
1. In your analysis, choose a visual or insight that you want to add interactive filtering to.
2. Choose Actions at left.
3. Choose Filter same-sheet visuals. Doing this immediately adds one-click filtering.
4. Repeat this process for each visual that you wish to make interactive.
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 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.
605
Amazon QuickSight User Guide
Adding interactivity to dashboards
• 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.
A cascading filter applies all the visuals that are set up in the Target visuals section of a specific
filter action. Amazon QuickSight 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 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.
•
(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 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.
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.
2.
(Optional) To edit or view an existing action, choose the menu icon ( ) next to the name of the
action.
•
The add ( ) icon near the Actions heading
• The Define a custom action button
4.
For Action name, define an action name. To make the action name dynamic, use to add
parameter or field values.
606
Amazon QuickSight User Guide
Adding interactivity to dashboards
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 QuickSight 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.
1. From the start page, choose Analyses. Then choose the analysis to fix.
2. Choose the visual or insight where the action no longer works. Make sure that it's highlighted on the
sheet.
3. Choose Actions.
4.
Locate the action you want to fix, and choose , Edit.
5. 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.
607
Amazon QuickSight User Guide
Adding interactivity to dashboards
• 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.
6. If the action type is Navigation action, follow the guidance on the error message, which reflects the
type of change that caused the error.
7. If the action type is URL action, check the URL setting for variables marked with double angle
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>
If the error also exists in an associated dashboard, share and publish the dashboard again to
propagate the fix.
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.
608
Amazon QuickSight User Guide
Using themes in Amazon QuickSight
• 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 (p. 159).
An analysis can have only one theme applied. If you apply a theme to an analysis (by using the Apply
button), it instantly changes it for everyone—both analysis and dashboard viewers. To explore and save
color options without applying them, avoid editing and saving the applied theme.
All colors come in pairs of background and foreground colors. The foreground colors are meant to
specifically appear above their matching background color, so choose something that contrasts well.
609
Amazon QuickSight User Guide
Using themes in Amazon QuickSight
• Buttons
• Borders around the selected
visual
• Loading indicators
• Narration customizations
• Links
• Filter panes for embedded
dashboards
Data Empty fill color This is the color used with your
data colors to indicate a lack
of data. For example, this color
appears in the empty portion of
the progress bars that are shown
in key performance indication
(KPI) and gauge charts, or for
empty heat map cells.
610
Amazon QuickSight User Guide
Using themes in Amazon QuickSight
1. Open an analysis, or create a new one. You must have an analysis open to work with themes.
However, the view you see with the theme applied is only a preview.
Themes are separate from analyses. No changes are made to your analysis, even when you save a
theme.
2. Choose Themes on the left. The theme panel opens.
3. The list of themes shows the following:
• Applied theme shows the theme that is currently applied to this analysis and its dashboards.
• My themes shows themes that you created and themes that are shared with you.
• Starter themes shows themes created by Amazon QuickSight.
4. Each theme has context menu that you can access from the … icon.
The actions that are available to you on each theme depend on your level of access.
• Theme owners – If you created the theme, or someone shared it with you and made you an owner,
you can do the following:
• Edit – Change the settings for the theme, and save them.
• Save – Save changes you made to the theme. If you edit the applied theme save your changes,
the new theme settings apply to all the analyses and dashboards that use it. An informational
message displays before you overwrite an applied theme.
• Share – Share the theme and assign user or owner permissions to other people.
611
Amazon QuickSight User Guide
Using themes in Amazon QuickSight
• Delete – Delete a theme. You can't undo this action. An informational message displays before
you confirm deletion.
• Theme users – If someone shared the theme with you, or if it's an Amazon QuickSight theme, you
can do the following:
• Apply – Apply the theme to the current analysis. This option also applies the theme to
dashboards created from the analysis. An informational message displays before you overwrite
an applied theme.
• Save as – Save the current theme to another name, so you can edit it.
• Analysis authors – If you have access to the analysis, but not the theme, you can do the following:
• You can see the analysis with the theme applied.
• You can see the theme in the Theme panel.
• You can use Save as to create your own copy of the theme.
• Dashboard viewers – If you have access to the dashboard, but not the theme, you can do the
following:
• You can see the dashboard with the theme applied.
• You can't see the theme or its settings. Dashboard users can't see the Theme panel.
5. To explore a theme's settings, choose the icons on the left to see settings for colors.
The following procedure walks you through creating a theme. You can start on the analysis, or a copy of
the analysis, that you want to use to preview the colors. Or you can start a new analysis. After you save
the theme, you can apply it to the current analysis or to other analyses. If you share it, other people can
use it too.
You must have an analysis open to work with themes. However, the view you see with the theme
applied is only a preview. Themes are separate from analyses. No changes are made to your analysis,
even when you save a theme.
2. Choose Main. The color picker used in each of these settings is the standard one used throughout
Amazon QuickSight.
Set colors for Primary background and Primary foreground to use in visuals and other high impact
UI.
Set colors for Secondary background and Secondary foreground to use in sheets and sheet
controls.
Set colors for Accent and Accent foreground to use in interactive hints including buttons, borders
around selected visuals, loading indicators, narration customizations, links, and the filter pane in
embedded dashboards.
3. Choose Data.
Set the Colors to use as data colors. Charts rotate through these when assigning colors. You can
add or delete colors, or change the order they're in by dragging and dropping. To change an existing
color, select it to open the color editor.
Set colors for Min max gradient to use when a gradient is used as a scale, for example in heat maps.
Set the color for Empty fill to use when showing a lack of data, for example the unfilled part of a
progress bar.
4. Choose Layout.
612
Amazon QuickSight User Guide
Working with stories (feature removed)
Enable or disable the Border check box to show or hide the border around the visuals that aren't
currently selected.
Enable or disable the Margin check box to show or hide the space between the sheet boundaries
and the visuals.
Enable or disable the Gutter check box to show or hide the space between visuals in the grid.
5. Choose Other.
Set the color for Success to use in success messages, for example when you successfully download
a .csv file. The success foreground color isn't currently used.
Set the color for Warning to use in warning and informational messages. The warning foreground
color isn't currently used.
Set the color for Danger to use in error messages. The danger foreground color isn't currently used.
Set the color for Dimension to use for the names of fields that are identified as dimensions. This
option also sets the color for dimensions in the filter panel of embedded dashboards.
Set the color for Measure to use for the names of fields that are identified as measures. This option
also sets the color for measures in the filter panel of embedded dashboards.
6. To save the theme, choose Main and give the new theme a name, and then choose Save at the
upper-right of the browser.
Saving a theme doesn't apply it to the analysis, even though you can see a preview of the colors that
uses the current analysis.
7. To share the theme, save or close the theme you are viewing. Find the theme in your theme
collection. Choose Share from the context menu (…).
8. To apply the theme, save or close the theme you are viewing. Find the theme in your theme
collection. Choose Apply from the context menu (…).
613
Amazon QuickSight User Guide
Using shortcuts within a visual
• Use the ESC key to clear the selection from a visual or menu item.
You can also use these keyboard shortcuts to navigate and enter the on-visual menu on the upper-right
corner of a visual. To do this, select the visual that you want and use the TAB key to get to the field that
you want to select. If you miss the field that you want, use the Shift+TAB keys to go back a field.
614
Amazon QuickSight User Guide
Using machine learning (ML) and natural language capabilities, Amazon QuickSight Enterprise Edition
takes you beyond descriptive and diagnostic analysis, and launches you into forecasting and decision-
making. You can understand your data at a glance, share your findings, and discover the best decisions
to achieve your goals. You can do this without developing teams and technology to create the necessary
machine learning models and algorithms.
You likely have already built visualizations that answer questions about what happened, when, where,
and provide drill down for investigation and identification of patterns. With ML insights, you can avoid
spending hours manually analyzing and investigating. You can select from a list of customized context-
sensitive narratives, called autonarratives, and add them to your analysis. In addition to choosing
autonarratives, you can choose to view forecasts, anomalies, and factors contributing to these. You can
also add autonarratives that explain the key takeaways in plain language, providing a single data-driven
truth for your company.
As time passes and data flows through the system, Amazon QuickSight continually learns so it can
deliver ever more pertinent insights. Instead of deciding what the data means, you can decide what to do
with the information it provides.
With a shared foundation based on machine learning, all of your analysts and stakeholders can see
trends, anomalies, forecasts, and custom narratives built on millions of metrics. They can see root causes,
consider forecasts, evaluate risks, and make well-informed, justifiable decisions.
You can create a dashboard like this with no manual analysis, no custom development skills, and no
understanding of machine learning modeling or algorithms. All this capability is built into Amazon
QuickSight Enterprise Edition.
Note
Machine learning capabilities are used as needed throughout the product. Features that actively
use machine learning are labeled as such.
• ML-powered anomaly detection – Amazon QuickSight uses Amazon's proven machine learning
technology to continuously analyze all your data to detect anomalies (outliers). You can identify
the top drivers that contribute to any significant change in your business metrics, such as higher-
than-expected sales or a dip in your website traffic. Amazon QuickSight uses the Random Cut Forest
algorithm on millions of metrics and billions of data points. Doing this enables you to get deep
insights that are often buried in the aggregates, inaccessible through manual analysis.
• ML-powered forecasting – Amazon QuickSight enables nontechnical users to confidently forecast
their key business metrics. The built-in ML Random Cut Forest algorithm automatically handles
complex real-world scenarios such as detecting seasonality and trends, excluding outliers, and
imputing missing values. You can interact with the data with point-and-click simplicity.
615
Amazon QuickSight User Guide
Understanding the ML algorithm
• Autonarratives – By using automatic narratives in Amazon QuickSight, you can build rich dashboards
with embedded narratives to tell the story of your data in plain language. Doing this can save hours
of sifting through charts and tables to extract the key insights for reporting. It also creates a shared
understanding of the data within your organization so you make decisions faster. You can use the
suggested autonarrative, or you can customize the computations and language to meet your unique
requirements. Amazon QuickSight is like providing a personal data analyst to all of your users.
Topics
• Understanding the ML algorithm used by Amazon QuickSight (p. 616)
• Dataset requirements for using ML insights with Amazon QuickSight (p. 619)
• Working with insights in Amazon QuickSight (p. 619)
• Creating autonarratives with Amazon QuickSight (p. 624)
• Detecting outliers with ML-powered anomaly detection (p. 646)
• Forecasting and creating what-if scenarios with Amazon QuickSight (p. 657)
Amazon QuickSight uses a built-in version of the Random Cut Forest (RCF) algorithm. The following
sections explain what that means and how it is used in Amazon QuickSight.
• Anomaly – Something that is characterized by its difference from the majority of the other things in
the same sample. Also known as an outlier, an exception, a deviation, and so on.
• Data point – A discrete unit—or simply put, a row—in a dataset. However, a row can have multiple data
points if you use a measure over different dimensions.
• Decision Tree – A way of visualizing the decision process of the algorithm that evaluates patterns in
the data.
• Forecast – A prediction of future behavior based on current and past behavior.
• Model – A mathematical representation of the algorithm or what the algorithm learns.
• Seasonality – The repeating patterns of behavior that occur cyclically in time series data.
• Time series – An ordered set of date or time data in one field or column.
Topics
• What's the difference between anomaly detection and forecasting? (p. 617)
• What RCF is and what it does (p. 617)
• How RCF is applied to detect anomalies (p. 617)
• How RCF is applied to generate forecasts (p. 618)
• References for machine learning and RCF (p. 618)
616
Amazon QuickSight User Guide
What's the difference between
anomaly detection and forecasting?
Both anomaly detection and forecasting begin by examining the current known data points. Amazon
QuickSight anomaly detection begins with what is known so it can establish what is outside the known
set, and identify those data points as anomalous (outliers). Amazon QuickSight forecasting excludes
the anomalous data points, and sticks with the known pattern. Forecasting focuses on the established
pattern of data distribution. In contrast, anomaly detection focuses on the data points that deviate from
what is expected. Each method approaches decision-making from a different direction.
As an unsupervised algorithm, RCF uses cluster analysis to detect spikes in time series data, breaks in
periodicity or seasonality, and data point exceptions. Random cut forests can work as a synopsis or
sketch of a dynamic data stream (or a time-indexed sequence of numbers). The answers to our questions
about the stream come out of that synopsis. The following characteristics address the stream and how
we make connections to anomaly detection and forecasting:
• A streaming algorithm is an online algorithm with a small memory footprint. An online algorithm
makes its decision about the input point indexed by time t before it sees the (t+1)-st point. The small
memory allows nimble algorithms that can produce answers with low latency and allow a user to
interact with the data.
• Respecting the ordering imposed by time, as in an online algorithm, is necessary in anomaly detection
and forecasting. If we already know what will happen the day after tomorrow, then predicting what
happens tomorrow isn't a forecast—it's just interpolating an unknown missing value. Similarly, a new
product introduced today can be an anomaly, but it doesn't necessarily remain an anomaly at the end
of the next quarter.
An anomaly is a data point that draws your attention away from normal points—think of an image of
a red flower in a field of yellow flowers. This "displacement of attention" is encoded in the (expected)
position of a tree (that is, a model in RCF) that would be occupied by the input point. The idea is to
create a forest where each decision tree grows out of a partition of the data sampled for training the
algorithm. In more technical terms, each tree builds a specific type of binary space partitioning tree on
the samples. As Amazon QuickSight samples the data, RCF assigns each data point an anomaly score.
It gives higher scores to data points that look anomalous. The score is, in approximation, inversely
proportional to the resulting depth of the point in the tree. The random cut forest assigns an anomaly
score by computing the average score from each constituent tree and scaling the result with respect to
the sample size.
617
Amazon QuickSight User Guide
How RCF is applied to generate forecasts
The votes or scores of the different models are aggregated because each of the models by itself is a
weak predictor. Amazon QuickSight identifies a data point as anomalous when its score is significantly
different from the recent points. What qualifies as an anomaly depends on the application.
The paper Random Cut Forest Based Anomaly Detection On Streams provides multiple examples of this
state-of-the-art online anomaly detection (time-series anomaly detection). RCFs are used on contiguous
segments or “shingles" of data, where the data in the immediate segment acts as a context for the
most recent one. Previous versions of RCF-based anomaly-detection algorithms score an entire shingle.
The algorithm in Amazon QuickSight also provides an approximate location of the anomaly in the
current extended context. This approximate location can be useful in the scenario where there is delay
in detecting the anomaly. Delays occur because any algorithm needs to characterize "previously seen
deviations" to "anomalous deviations," which can unfold over some time.
The algorithm in Amazon QuickSight is called BIFOCAL. It uses two RCFs to create a CALibrated BI-FOrest
architecture. The first RCF is used to filter out anomalies and provide a weak forecast, which is corrected
by the second. Overall, this approach provides significantly more robust forecasts in comparison to other
widely available algorithms such as ETS.
The number of parameters in the Amazon QuickSight forecasting algorithm is significantly fewer
than for other widely available algorithms. This allows it to be useful out of the box, without human
adjustment for a larger number of time series data points. As more data accumulates in a particular time
series, the forecasts in Amazon QuickSight can adjust to data drifts and changes of pattern. For time
series that show trends, trend detection is performed first to make the series stationary. The forecast of
that stationary sequence is projected back with the trend.
Because the algorithm relies on an efficient online algorithm (RCF), it can support interactive "what-
if" queries. In these, some of the forecasts can be altered and treated as hypotheticals to provide
conditional forecasts. This is the origin of the ability to explore "what-if" scenarios during analysis.
• The article Robust Random Cut Forest (RRCF): A No Math Explanation provides a lucid explanation
without the mathematical equations.
• The book The Elements of Statistical Learning: Data Mining, Inference, and Prediction, Second Edition
(Springer Series in Statistics) provides a thorough foundation on machine learning.
• Random Cut Forest Based Anomaly Detection On Streams, a scholarly paper that dives deep into the
technicalities of both anomaly detection and forecasting, with examples.
A different approach to RCF appears in other AWS services. If you want to explore how RCF is used in
other services, see the following:
618
Amazon QuickSight User Guide
Dataset requirements
• At least one metric (for example, sales, orders, shipped units, sign ups, and so on).
• At least one category dimension (for example, product category, channel, segment, industry, and so
on). Categories with NULL values are ignored.
• Anomaly detection requires a minimum of 15 data points for training. For example, if the grain of your
data is daily, you need at least 15 days of data. If the grain is monthly, you need at least 15 months of
data.
• Forecasting work best with more data. Make sure that your dataset has enough historical data for
optimal results. For example, if the grain of your data is daily, you need at least 38 days of data. If the
grain is monthly, you need at least 43 months of data. Following are the requirements for each time
grain:
• Years: 32 data points
• Quarters: 35 data points
• Months: 43 data points
• Weeks: 35 data points
• Days: 38 data points
• Hours: 39 data points
• Minutes: 46 data points
• Seconds: 46 data points
• If you want to analyze anomalies or forecasts, you also need at least one date dimension.
If you don't have a dataset to get started, you can download this sample dataset: ML Insights Sample
Dataset VI. After you have a dataset ready, create a new analysis from the dataset.
• Suggested insights
Amazon QuickSight creates a list of suggested insights based on its interpretation of the data
you put into your visuals. The list changes based on context. In other words, you can see different
suggestions depending on what fields you add to your visual and what type of visual you choose.
For example, if you have a time-series visualization, your insights might include period-over-period
changes, anomalies, and forecasts. As you add more visualizations to your analysis, you generate more
suggested insights.
• Custom insights
Custom insights enable you to create your own computation, using your own words to give context to
the fields that appear in the widget. When you create a custom insight, you add it to the analysis, and
619
Amazon QuickSight User Guide
Adding suggested insights
then choose what type of calculation that you want to use. Then, you can add text and formatting to
make it look how you want. You can also add more fields, calculations, and parameters.
You can add any combination of suggested and custom insights to your analysis, to create the decision-
making environment that best serves your purposes.
Topics
• Adding suggested insights (p. 620)
• Adding custom insights to your analysis (p. 623)
Before you begin, make sure that your dataset meets the criteria outlined in Dataset requirements for
using ML insights with Amazon QuickSight (p. 619).
620
Amazon QuickSight User Guide
Adding suggested insights
Each visual also displays a small box on its top border to display how many insights are available for
that visual. You can choose this box to open the Insights panel, and it opens to whatever view you
most recently had open.
621
Amazon QuickSight User Guide
Adding suggested insights
The insights that appear are controlled by the data type of the fields you choose to include in your
visual. This list is generated each time you change your visual. If you make changes, check Insights
to see what is new. To get a specific insight, see Adding custom insights to your analysis (p. 623).
3. (Optional) Open the context menu with more options for one of the insights. To do this, choose the
ellipses on the top right of the insight (…).
The options are different for each type of insight. The options that you can interact with include the
following:
• Change the time series aggregation – To year, quarter, month, week, day, hour, or minute.
• Analyze contributions to metrics – Choose contributors and a time frame to analyze.
• Show all anomalies – Browse anomalies in this time frame.
• Edit forecast – Choose forecast length, prediction interval, and seasonality.
• Focus on or Exclude – Zoom in or zoom out on your dimensional data.
• Show details – View more information about a recent anomaly (outlier).
• Provide feedback on the usefulness of the insight in your analysis.
4. Add a suggested insight to your analysis by choosing the plus sign (+) near the insight title.
5. (Optional) After you add an insight to your analysis, customize the narrative that you want it to
display. To do this, choose the v-shaped on-visual menu, then choose Customize narrative. For more
information, see Creating autonarratives with Amazon QuickSight (p. 624).
622
Amazon QuickSight User Guide
Adding custom insights to your analysis
If your insight is for anomalies (outliers), you can also change the settings for the anomaly detection
job. To do this, choose Configure anomaly. For more information, see Setting up ML-powered
anomaly detection for outlier analysis (p. 648).
6. (Optional) To remove the insight from your analysis, choose the v-shaped on-visual menu at the top
right of the visual. Then choose Delete.
1. Start with an existing analysis. On the top menu bar, choose Add+. Then choose Add Insight.
A container for the new insight is added to the analysis. The following screen appears.
• Choose the computation that you want to use from the list. As you choose each item, an example
of that insight's output displays. When you find the one that you want to use, choose Select.
• Exit this screen and customize the insight manually. An unconfigured insight has a Customize
insight button. Choose the button to open the Configure narrative screen. For more information
on using the expression editor, see Creating autonarratives with Amazon QuickSight (p. 624).
Because you are initiating the creation of the insight, it's not based on an existing visual. When the
insight is added to the analysis, it displays a note showing what kind of data it needs to complete
your request. For example, it might ask for 1 dimension in Time. In this case, you add a dimension
to the Time field well.
3. After you have the correct data, follow any remaining screen prompts to finish creating the custom
insight.
623
Amazon QuickSight User Guide
Autonarratives
4. (Optional) To remove the insight from your analysis, choose the v-shaped on-visual menu at the top
right of the visual. Then choose Delete.
Amazon QuickSight automatically interprets the charts and tables in your dashboard and provides a
number of suggested insights in natural language. The suggested insights that you can choose from are
ready-made and come with words, calculations, and functions. But you can change them if you want to.
You can also design your own. As the author of the dashboard, you have complete flexibility to customize
the computations and language for your needs. You can use narratives to effectively tell the story of your
data in plain language.
Note
Narratives are separate from machine learning. They only use ML if you add forecast or anomaly
(outlier) computations to them.
Topics
• Insights that include autonarratives (p. 624)
• Working with the expression editor screen and menus (p. 625)
• Adding URLs (p. 627)
• Walkthrough: Use the narrative expression editor (p. 628)
• Working with autonarrative computations (p. 630)
• Bottom ranked – For example, the bottom three states by sales revenue. Requires that you have at
least one dimension in the Categories field well.
• Bottom movers – For example, the bottom three products sold, by sales revenue. Requires that you
have at least one dimension in the Time field well and at least one dimension in the Categories field
well.
• Forecast (ML-powered insight) – For example, "Total sales are forecasted to be $58,613 for Jan 2016."
Requires that you have at least one dimension in the Time field well.
• Growth rate – For example, "The 3-month compounded growth rate for sales is 22.23%." Requires
that you have at least one dimension in the Time field well.
• Maximum – For example, "Highest month is Nov 2014 with sales of $112,326." Requires that you have
at least one dimension in the Time field well.
624
Amazon QuickSight User Guide
Working with the expression editor screen and menus
• Metric comparison – For example, "Total sales for Dec 2014 is $90,474, 10% higher than target
of $81,426." Requires that you have at least one dimension in the Time field well and at least two
measures in the Values field well.
• Minimum – For example, "Lowest month is Feb 2011 with sales of $4,810." Requires that you have at
least one dimension in the Time field well.
• Anomaly detection (ML-powered insight) – For example, top three outliers and their contributing
drivers for total sales on January 3, 2019. Requires that you have at least one dimension in the Time
field well, at least one measure in the Values field well, and at least one dimension in the Categories
field well.
• Period over period – For example, "Total sales for Nov 2014 increased by 44.39% ($34,532) from
$77,793 to $112,326." Requires that you have at least one dimension in the Time field well.
• Period to date – For example, "Year-to-date sales for Nov 30, 2014 increased by 25.87% ($132,236)
from $511,236 to $643,472." Requires that you have at least one dimension in the Time field well.
• Top ranked – For example, top three states by sales revenue. Requires that you have at least one
dimension in the Categories field well.
• Top movers – For example, top products by sales revenue for November 2014. Requires that you have
at least one dimension in the Time field well and at least one dimension in the Categories field well.
• Total aggregation – For example, "Total revenue is $2,297,200." Requires that you have at least one
dimension in the Time field well and at least one measure in the Values field well.
• Unique values – For example, "There are 793 unique values in Customer_IDs." Requires that you
have at least one dimension in the Categories field well.
On the right side of the screen, there's a list of items that you can add to the narrative:
• Computations – Use this to choose from the computations that are available in this insight. You can
expand this list.
• Parameters – Use this to choose from the parameters that exist in your analysis. You can expand this
list.
625
Amazon QuickSight User Guide
Working with the expression editor screen and menus
• Functions – Use this to choose from functions that you can add to a narrative. You can expand this list.
• Add computation – Use this button to create another computation. New computations appear in the
Computations list, ready to add to the insight.
At the bottom of the narrative expression editor, there's a preview of the narrative that updates as
you work. This area also shows an alert if you introduce an error into the narrative or if the narrative is
empty. To see a preview of ML-powered insights like anomaly detection or forecasting, run your insight
calculation at least once before customizing the narrative.
Editing tools are located across the top of the screen. They offer the following options:
• Insert code – You can insert the following code blocks from this menu:
• Expressions – Add a free-form expression.
• Inline IF – Add an IF statement that displays inline with the existing block of text.
• Inline FOR – Add a FOR statement that displays inline with the existing block of text.
• Block IF – Add an IF statement that displays in a separate block of text.
• Block FOR – Add a FOR statement that displays in a separate block of text.
The IF and FOR statements enable you to create content that is conditionally formatted. For example,
you might add a block IF statement, then configure it to compare an integer to a value from a
calculation. To do this, you use the following steps, also demonstrated in Walkthrough: Use the
narrative expression editor (p. 628):
1. Open the calculations menu at right, and choose one of the blue highlighted items from one of the
calculations. Doing this adds the item to the narrative.
2. Click once on the item to open it.
3. Enter the comparison that you want to make. The expression looks something like this:
PeriodOverPeriod.currentMetricValue.value>0.
4. Save this expression in the pop-up editor, which prompts you for Conditional content.
5. Enter what you want to display in the insight, and format it as you want it to appear. Or if you
prefer, you can add an image or a URL—or add a URL to an image.
• Paragraph – This menu offers options for changes to the font size:
• H1 Large header
• H2 Header
• H3 Small header
• ¶1 Large paragraph
• ¶2 Paragraph
• ¶3 Small paragraph
• Font – Use this menu tray to choose options for text formatting. These include bold, italic, underline,
strikethrough, foreground color of the text (the letters themselves), and background color of the text.
Choose the icon to turn on an option; choose it again to toggle the option off.
• Formatting – Use this menu tray to choose options for paragraph formatting, including bulleted list,
left justify, center, and right justify. Choose the icon to turn on an option, choose it again to toggle the
option off.
• Image – Use this icon add an image URL. The image displays in your insight, provided the link is
accessible. You can resize images. To display an image based on a condition, put the image inside an IF
block.
• URL – Use this icon to add a static or dynamic URL. You can also add URLs to images. For example,
you can add traffic light indicator images to an insight for an executive dashboard, with links to a new
sheet for red, amber, and green conditions.
626
Amazon QuickSight User Guide
Adding URLs
Adding URLs
Using the URL button on the editing menu of the narrative expression editor, you can add static and
dynamic URLs (hyperlinks) into a narrative. You can also use the following keyboard shortcuts: ⌘+⇧+L or
Ctrl+⇧+L.
A static URL is a link that doesn’t change; it always opens the same URL. A dynamic URL is a link that
changes based on the expressions or parameters that you provide when you set it up. It's built with
dynamically evaluated expressions or parameters.
Following are of examples of when you might add a static link in your narrative:
• In an IF statement, you might use the URL in the conditional content. If you do and a metric fails to
meet an expected value, your link might send the user to a wiki with a list of best practices to improve
the metric.
• You might use a static URL to create a link to another sheet in the same dashboard, by using the
following steps:
1. Go to the sheet that you want to make the link to.
2. Copy that sheet's URL.
3. Return to the narrative editor and create a link using the URL that you just copied.
Following are examples of when you might add a dynamic link in your narrative:
https://google.com?q=<<formatDate(now(),'yyyy-MM-dd')>>
This link sends a query to Google with search text that is the evaluated value of the following.
formatDate(now(), 'yyyy-MM-dd')
If the value of now() is 02/02/2020, then the link on your narrative contains https://
google.com?q=2020-02-02.
• To create a link that updates a parameter. To do this, create or edit a link and set the URL to the
current dashboard or analysis URL. Then add the expression that sets the parameter value to at the
end, for example #p.myParameter=12345.
Suppose that the following is the dashboard link that you start with.
https://us-east-1.quicksight.aws.amazon.com/sn/analyses/00000000-1111-2222-3333-44444444
If you add a parameter value assignment to it, it looks like the following.
https://us-east-1.quicksight.aws.amazon.com/sn/
analyses/00000000-1111-2222-3333-44444444#p.myParameter=12345
For more information on parameters in URLs, see Using parameters in a URL (p. 597).
627
Amazon QuickSight User Guide
Walkthrough: Use the narrative expression editor
1. Begin with an existing analysis. Add a period over period insight to it. The easiest way to do this
is to choose the + icon, then Add insight, then choose a type of insight from the list. To learn
what type of computational insights you can add as autonarratives, see Insights that include
autonarratives (p. 624).
After you choose a type of insight, choose Select to create the widget. To create an empty narrative,
close this screen without choosing a template. To follow this example, choose Period over period.
If you had a visual selected when you added the insight, the field wells have preconfigured fields for
the date, metric, and category. These come from the visualization that you chose when you created
the insight. You can customize the fields as needed.
You can only customize a narrative for a new or existing insight (text-based) widget. You can't add
one to an existing visual (chart based), because it's a different type of widget.
2. Edit the narrative in the expressions editor by choosing the on-visual menu, then choosing
Customize narrative. The following screen appears, filling the entire browser window except for the
Amazon QuickSight menu.
628
Amazon QuickSight User Guide
Walkthrough: Use the narrative expression editor
Doing this inserts the expression GrowthRate.timePeriods, which is the number of periods you set
in the configuration for GrowthRate.
8. Complete the sentence with days is (a space before and afterwards), and add the expression
GrowthRate.compoundedGrowthRate.formattedValue, followed by a period (.). Choose the
expression from the list, rather than typing it in. However, you can edit the contents of the
expression after you add it.
Note
The formattedValue expression returns a string that is formatted based on the formatting
applied for the metric on the field. To perform metric math, use value instead, which
returns the raw value as an integer or decimal.
9. Add a conditional statement and formatting. Place your cursor at the end of the template, after the
formattedValue expression. Add a space if necessary. On the Edit narrative menu bar, choose
Insert code, and then choose Inline IF from the list. An expression block opens.
10. With the expression block open, choose GrowthRate, compoundedGrowthRate, value from the
expression list. Enter >0 at the end of the expression. Choose Save. Don't move your cursor yet.
A prompt appears for the conditional content; enter better than expected! Then select the text
you just entered, and use the formatting toolbar at the top to turn it green and bold.
11. Add another expression block for the case when the growth rate wasn't that great by repeating the
previous step. But this time, make it <0 and enter the text worse than expected. Make it red
instead of green.
12. Choose Save. The customized narrative that we just created should look similar to the following.
629
Amazon QuickSight User Guide
Computations
The expression editor provides you with a sophisticated tool to customize your narratives. You can also
reference the parameters you create for your analysis or dashboard, and use a set of built-in functions
for further customization.
Tip
To create an empty narrative, add an insight using the + icon and then Add insights. But instead
of choosing a template, simply close the screen.
The best way to get started with customizing narratives is to use the existing templates to learn
the syntax.
After you create an autonarrative, the expression editor opens. You can also activate the expression
editor by choosing the on-visual menu, and then Customize Narrative. To add a computation while using
the expression editor, choose + Add computation.
You can use the following code expression to build your autonarrative. These are available from the list
that's labeled Insert code. Code statements can display inline (in a sentence) or as a block (in a list).
You can use the following computations to build your autonarrative. You can use the expression editor
without editing any syntax, but you can also customize it if you want to. To interact with the syntax, open
the computational widget in the autonarrative expression editor.
Topics
• ML-powered anomaly detection for outliers (p. 631)
• Bottom movers computation (p. 632)
• Bottom ranked computation (p. 633)
• ML-powered forecasting (p. 635)
• Growth rate computation (p. 636)
• Maximum computation (p. 637)
• Metric comparison computation (p. 638)
• Minimum computation (p. 639)
• Period over period computation (p. 640)
630
Amazon QuickSight User Guide
Computations
To use this function, you need at least one dimension in the Time field well, at least one measure in
the Values field well, and at least one dimension in the Categories field well. The configuration screen
provides an option to analyze the contribution of other fields as key drivers, even if those fields aren't in
the field wells.
For more information, see Detecting outliers with ML-powered anomaly detection (p. 646).
Note
You can't add ML-powered anomaly detection to another computation, and you can't add
another computation to an anomaly detection.
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name that you provide when
you create the insight. Choose the output parameter by clicking on it only once. If you click twice, you
add the same output twice. You can use items displayed in bold monospace font following in the
narrative.
631
Amazon QuickSight User Guide
Computations
To use this function, at least one dimension in the Time field well and at least one dimension in the
Categories field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Date
The order that you want to use, percent difference or absolute difference.
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
Note
These are the same output parameters as the ones that are returned by the top movers
computation.
632
Amazon QuickSight User Guide
Computations
To use this function, you need at least one dimension in the Categories field well.
633
Amazon QuickSight User Guide
Computations
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Category
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
Note
These are the same output parameters as the ones that are returned by the top ranked
computation.
Example
The following screenshot shows the default configuration for the bottom ranked computation.
634
Amazon QuickSight User Guide
Computations
ML-powered forecasting
The ML-powered forecast computation forecasts future metrics based on patterns of previous metrics by
seasonality. For example, you can create a computation to forecast total revenue for the next six months.
To use this function, you need at least one dimension in the Time field well.
For more information about working with forecasts, see Forecasting and creating what-if scenarios with
Amazon QuickSight (p. 657).
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Date
The number of time periods in the future that you want to forecast. Ranges from 1 to 1,000.
Periods backward
The number of time periods in the past that you want to base your forecast on. Ranges from 0 to
1,000.
Seasonality
The number of seasons included in the calendar year. The default setting, automatic detects this for
you. Ranges from 1 to 180.
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
635
Amazon QuickSight User Guide
Computations
To use this function, you need at least one dimension in the Time field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Date
The number of time periods in the future that you want to use to compute the growth rate.
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
636
Amazon QuickSight User Guide
Computations
Maximum computation
The maximum computation finds the maximum dimension by value. For example, you can create a
computation to find the month with the highest revenue.
To use this function, you need at least one dimension in the Time field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Date
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
Note
These are the same output parameters as the ones that are returned by the minimum
computation.
637
Amazon QuickSight User Guide
Computations
To use this function, you need at least one dimension in the Time field well and at least two measures in
the Values field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Date
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
638
Amazon QuickSight User Guide
Computations
Minimum computation
The minimum computation finds the minimum dimension by value. For example, you can create a
computation to find the month with the lowest revenue.
To use this function, you need at least one dimension in the Time field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Date
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
639
Amazon QuickSight User Guide
Computations
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
Note
These are the same output parameters as the ones that are returned by the maximum
computation.
To use this function, you need at least one dimension in the Time field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Date
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
640
Amazon QuickSight User Guide
Computations
To use this function, you need at least one dimension in the Time field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Date
641
Amazon QuickSight User Guide
Computations
Value
The date granularity that you want to use for the computation, for example year to date.
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
• formattedAbsoluteValue – The absolute value of the difference formatted by the metric field.
To use this function, you need at least one dimension in the Time field well and at least one dimension in
the Categories field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Category
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
Note
These are the same output parameters as the ones that are returned by the bottom movers
computation.
643
Amazon QuickSight User Guide
Computations
To use this function, you need at least one dimension in the Categories field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Category
644
Amazon QuickSight User Guide
Computations
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
Note
These are the same output parameters as the ones that are returned by the bottom ranked
computation.
To use this function, you need at least one dimension in the Time field well and at least one measure in
the Values field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Value
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
645
Amazon QuickSight User Guide
Detecting outliers
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
To use this function, you need at least one dimension in the Categories field well.
Parameters
name
A unique descriptive name that you assign or change. A name is assigned if you don't create your
own. You can edit this later.
Category
Computation outputs
Each function generates a set of output parameters. You can add these outputs to the autonarrative to
customize what it displays. You can also add your own custom text.
To locate the output parameters, open the Computations tab on the right, and locate the computation
that you want to use. The names of the computations come from the name you provide when you create
the insight. Choose the output parameter by clicking on it only once. If you click twice, you add the same
output twice. Items displayed in bold can be used in the narrative.
646
Amazon QuickSight User Guide
Concepts for anomaly or outlier detection
enables you to get deep insights that are often buried in the aggregates and not scalable with manual
analysis. With ML-powered anomaly detection, you can find outliers in your data without the need for
manual analysis, custom development, or ML domain expertise.
Amazon QuickSight notifies you on your visuals if it detects that you can analyze an anomaly or do some
forecasting on your data.
Important
ML-powered anomaly detection is a compute-intense task. Before you start using it, you can
get an idea of costs by analyzing the amount of data that you want to use. We offer a tiered
pricing model that is based on the number of metrics you process per month. To learn more
about usage-based pricing, see Amazon QuickSight Pricing.
Topics
• Concepts for anomaly or outlier detection (p. 647)
• Setting up ML-powered anomaly detection for outlier analysis (p. 648)
• Exploring outliers and key drivers with ML-powered anomaly detection and contribution
analysis (p. 653)
Humans easily recognize patterns and spot things that aren't like the others. Our senses provide this
information for us. If the pattern is simple, and there is only a little data, you can easily make a graph to
highlight the outliers in your data. Some simple examples include the following:
Some data points represent a significant event, and others represent a random occurrence. Analysis
uncovers which data is worth investigating, based on what driving factors (key drivers) contributed to the
event. Questions are essential to data analysis. Why did it happen? What's it related to? Did it happen
only once or many times? What can you do to encourage or discourage more like it?
Understanding how and why a variation exists, and whether there is a pattern in the variations, requires
more thought. Without the assistance of machine learning, each person might come to a different
conclusion, because they have different experience and information. Therefore, each person might make
a slightly different business decision. If there is a lot of data or variables to consider, it can require an
overwhelming amount of analysis.
ML-powered anomaly detection identifies the causations and correlations to enable you to make data-
driven decisions. You still have control over defining how you want the job to work on your data. You
can specify your own parameters, and choose additional options, such as identifying key drivers in a
contribution analysis. Or you can use the default settings. The following section walks you through the
setup process, and provides explanations for the options available.
647
Amazon QuickSight User Guide
Setting up ML-powered anomaly
detection for outlier analysis
Topics
• Viewing anomaly and forecast notifications (p. 648)
• Adding an ML insight to detect outliers and key drivers (p. 649)
• Using contribution analysis for key drivers (p. 652)
1. In an existing line chart, look for an insight notification in the menu on the visual widget.
2. Choose the lightbulb icon to display the notification, as shown in the following screenshot.
648
Amazon QuickSight User Guide
Setting up ML-powered anomaly
detection for outlier analysis
3. If you want more information about the ML insight, you can follow the screen prompts to add an ML
insight.
In your insight widget, you can add up to five dimension fields that are not calculated fields. In the field
wells, values for Categories represent the dimensional values that Amazon QuickSight uses to split the
metric. For example, let's say that you are analyzing revenue across all product categories and product
SKUs. There are 10 product categories, each with 10 product SKUs. Amazon QuickSight splits the metric
by the 100 unique combinations and runs anomaly detection on each combination for the split.
The following procedure shows how to do this, and also how to add contribution analysis to detect the
key drivers that are causing each anomaly. You can add contribution analysis later, as described in Using
contribution analysis for key drivers (p. 652).
649
Amazon QuickSight User Guide
Setting up ML-powered anomaly
detection for outlier analysis
1. Open your analysis and, on the top menu, choose Add, then Add insight. From the list, choose
Anomaly detection and Select.
2. Follow the screen prompt on the new widget, which tells you to choose fields for the insight. Add at
least one date, one measure, and one dimension.
3. Choose Get started on the widget. The configuration screen appears.
4. Under Compute options, choose values for the following options.
i. Hierarchical
Choose this option if you want to analyze the fields hierarchically. For example, if you chose
a date (T), a measure (N), and three dimension categories (C1, C2, and C3), QuickSight
analyses the fields hierarchically, as shown following.
ii. Exact
Choose this option if you want to analyze only the exact combination of fields in the
Category field well, as they are listed. For example, if you chose a date (T), a measure
(N), and three dimension categories (C1, C2, and C3), QuickSight analyses only the exact
combination of category fields in the order they are listed, as shown following.
T-C1-C2-C3-N
iii. All
Choose this option if you want to analyze all field combinations in the Category field well.
For example, if you chose a date (T), a measure (N), and three dimension categories (C1, C2,
and C3), QuickSight analyses all combinations of fields, as shown following.
If you chose a date and a measure only, QuickSight analyses the fields by date and then by
measure.
In the Fields to be analyzed section, you can see a list of fields from the field wells for
reference.
b. For Name, enter a descriptive alphanumeric name with no spaces, or choose the default value.
This provides a name for the computation.
If you plan on editing the narrative that automatically displays on the widget, you can use
the name to identify this widget's calculation. Customize the name if you plan to edit the
autonarrative and if you have other similar calculations in your analysis.
5. In the Display options section, choose the following options to customize what is displayed in your
insight widget. You can still explore all your results, no matter what you display.
a. Maximum number of anomalies to show – The number of outliers you want to display in the
narrative widget.
b. Severity – The minimum level of severity for anomalies that you want to display in the insight
widget.
650
Amazon QuickSight User Guide
Setting up ML-powered anomaly
detection for outlier analysis
A level of severity is a range of anomaly scores that is characterized by the lowest actual
anomaly score included in the range. All anomalies that score higher are included in the range.
If you set severity to Low, the insight displays all of the anomalies that rank between low and
very high. If you set the severity to Very high, the insight displays only the anomalies that have
the highest anomaly scores.
• Very high
• High and above
• Medium and above
• Low and above
c. Direction – The direction on the x-axis or y-axis that you want to identify as anomalous. You can
choose from the following:
• Absolute value – The actual value to use. For example, suppose this is 48. Amazon QuickSight
then identifies values as anomalous when the difference between a value and the expected
value is greater than 48.
• Percentage – The percentage threshold to use. For example, suppose this is 12.5%. Amazon
QuickSight then identifies values as anomalous when the difference between a value and the
expected value is greater than 12.5%.
e. Sort by – Choose a sort method for your results. Some methods are based on the anomaly score
that Amazon QuickSight generates. Amazon QuickSight gives higher scores to data points that
look anomalous. You can use any of the following options:
• Weighted anomaly score – The anomaly score multiplied by the log of the absolute value of
the difference between the actual value and the expected value. This score is always a positive
number.
• Anomaly score – The actual anomaly score assigned to this data point.
• Weighted difference from expected value – The anomaly score multiplied by the difference
between the actual value and the expected value (default).
• Difference from expected value – The actual difference between the actual value and the
expected value (that is, actual−expected).
• Actual value – The actual value with no formula applied.
6. In the Schedule options section, set the schedule for automatically running the insight
recalculation. The schedule runs only for published dashboards. In the analysis, you can run it
manually as needed. Scheduling includes the following settings:
• Occurrence – How often that you want the recalculation to run: every hour, every day, every week,
or every month.
• Start schedule on – The date and time to start running this schedule.
• Timezone – The time zone that the schedule runs in. To view a list, delete the current entry.
7. In the Top contributors section, set Amazon QuickSight to analyze the key drivers when an outlier
(anomaly) is detected.
651
Amazon QuickSight User Guide
Setting up ML-powered anomaly
detection for outlier analysis
For example, Amazon QuickSight can show the top customers that contributed to a spike in sales
in the US for home improvement products. You can add up to four dimensions from your dataset.
These include dimensions that you didn't add to the field wells of this insight widget.
For a list of dimensions available for contribution analysis, choose Select fields.
8. Choose Save to confirm your choices. Choose Cancel to exit without saving.
9. From the insight widget, choose Run now to run the anomaly detection and view your insight.
The amount of time that anomaly detecton takes to complete varies depending on how many unique
data points you are analyzing. The process can take a few minutes for a minimum number of points, or it
can take many hours.
While it's running in the background, you can do other work in your analysis. Make sure to wait for it to
complete before you change the configuration, edit the narrative, or open the Explore anomalies page
for this insight.
The insight widget needs to run at least once before you can see results. If you think the status might be
out of date, you can refresh the page. The insight can have the following states.
Narrative about the detected anomalies (outliers) The job has run successfully. The message says
when this widget's calculation was last updated.
Alert icon with an exclamation point (!) This icon indicates there was an error during the
last run. If the narrative also displays, you can
still use Explore anomalies to use data from the
previous successful run.
If you are already using anomaly detection without contribution analysis, you can enable the existing ML
insight to find key drivers. Use the following procedure to add contribution analysis and identify the key
drivers behind outliers. Your insight for anomaly detection needs to include a time field and at least one
aggregated metric (SUM, AVERAGE, or COUNT). You can include multiple categories (dimension fields) if
you wish, but you can also run contribution analysis without specifying any category or dimension field.
You can also use this procedure to change or remove fields as key drivers in your anomaly detection.
1. Open your analysis and locate an existing ML insight for anomaly detection. Select the insight
widget to highlight it.
2. Choose Menu Options (…) from the menu on the visual.
3. Choose Configure anomaly to edit the settings.
652
Amazon QuickSight User Guide
Exploring outliers and key drivers
4. The Contribution analysis (optional) setting allows Amazon QuickSight to analyze the key drivers
when an outlier (anomaly) is detected. For example, Amazon QuickSight can show you the top
customers that contributed to a spike in sales in the US for home improvement products. You can
add up to four dimensions from your dataset, including dimensions that you didn't add to the field
wells of this insight widget.
To view a list of dimensions available for contribution analysis, choose Select fields.
If you want to change the fields you're using as key drivers, change the fields that are enabled in this
list. If you disable all of them, QuickSight won't perform any contribution analysis in this insight.
5. To save your changes, scroll to the bottom of the configuration options, and choose Save. To exit
without saving, choose Cancel. To completely remove these settings, choose Delete.
To begin, choose Explore anomalieson the insight widget. The following screenshot shows the anomaly
exploration screen as it appears when you first open it. In this example, contribution analysis is set up
and displays two key drivers.
The sections of the screen include the following, from top left to bottom right:
• Contributors displays key drivers. To see this section, you need to have contributors set up in your
anomaly configuration.
• Controls contains settings for anomaly exploration.
• Number of anomalies displays outliers detected over time. You can hide or show this chart section.
• Your field names for category or dimension fields function as titles for charts that display anomalies
for each category or dimension.
The following sections provide detailed information for each aspect of exploring anomalies.
653
Amazon QuickSight User Guide
Exploring outliers and key drivers
• Narrative – At top left, a narrative displays to describe any change in the metrics.
654
Amazon QuickSight User Guide
Exploring outliers and key drivers
• Top contributors configuration – Choose Configure to change the contributors and the date range to
use in this section.
• Sort by – Sets the sort applied to the results that display below. You can choose from the following:
• Absolute difference
• Contribution percentage (default)
• Deviation from expected
• Percentage difference
• Top contributor results – Displays the results of the top contributor analysis for the point in time
selected on the timeline at right.
Contribution analysis identifies up to four of the topmost contributing factors or key drivers of an
anomaly. For example, Amazon QuickSight can show you the top customers that contributed to a
spike in sale in the US for health products. This panel appears only if you chose fields to include in
contribution analysis when you configured the anomaly.
If you don't see this panel and you want to display it, you can enable it. To do this, return to the
analysis, choose anomaly configuration from the insight's menu, and choose up to four fields to
analyze for contributions. Keep in mind that if you make changes in the sheet controls that exclude the
contributing drivers, the Contributions panel closes.
• Controls – The current settings display at the top of the workspace. You can expand this by using the
double arrow icon on the far right. The following settings are available for exploring outliers generated
by ML-powered anomaly detection:
• Severity – Sets how sensitive your detector is to detected anomalies (outliers). You should expect
to see more anomalies with the threshold set to Low and above, and fewer anomalies when the
threshold is set to High and above. This sensitivity is determined based on standard deviations of
the anomaly score generated by the RCF algorithm. The default is Medium and above.
• Direction – The direction on the x-axis or y-axis that you want to identify as anomalous. The default
is [ALL]. You can choose the following:
• Set to Higher than expected to identify higher values as anomalies.
• Set to Lower than expected to identify lower values as anomalies.
• Set to [ALL] to identify all anomalous values, high and low.
655
Amazon QuickSight User Guide
Exploring outliers and key drivers
• Minimum Delta - absolute value – enter a custom value to use to as the absolute threshold to
identify anomalies. Any amount higher than this value counts as an anomaly.
• Minimum Delta - percentage – enter a custom value to use to as the percentage threshold to
identify anomalies. Any amount higher than this value counts as an anomaly.
• Sort by – Choose the method that you want to apply to sorting anomalies. These are listed in
preferred order on the screen. Following, they are listed alphabetically:
• Weighted anomaly score – The anomaly score multiplied by the log of the absolute value of
the difference between the actual value and the expected value. This score is always a positive
number.
• Anomaly score – The actual anomaly score assigned to this data point.
• Weighted difference from expected value – (Default) The anomaly score multiplied by the
difference between the actual value and the expected value.
• Difference from expected value – The actual difference between the actual value and the
expected value (actual−expected).
• Actual value – The actual value with no formula applied.
• Categories – One or more settings can appear at the end of the other settings. There is one for each
category field that you added to the category field well. You can use category settings to limit the
data that displays in the screen.
This chart shows anomalies (outliers) for the most recent data point in the time series. When expanded,
it displays the following components:
• Anomalies – The center of the screen displays the anomalies for the most recent data point in the time
series. One or more graphs display with a chart showing variations in a metric over time. To use this
graph, you select a point along the time line. The currently selected point in time is highlighted in the
graph, and has a context menu offering you the option to analyze contributions to the current metric.
You can also drag the cursor over the time line without choosing a specific point, to display the metric
value for that point in time.
• Anomalies by date – If you choose SHOW ANOMALIES BY DATE, another graph appears that shows
how many significant anomalies there were for each time point. You can see details in this chart on
each bar's context menu.
• Timeline adjustment – Each graph has a timeline adjustor tool below the dates, which you can use to
compress, expand, or choose a period of time to view.
656
Amazon QuickSight User Guide
ML-powered forecasts and what-ifs
Each category or dimension has a separate chart that uses the field name as the chart title. Each chart
contains the following components:
• Configure alerts – If you are exploring anomalies from a dashboard, you can use this button to
subscribe to alerts and contribution analysis (if it's configured). You can set up the alerts for the level
of severity (medium, high, and so on). You can get the top five alerts for Higher than expected, Lower
than expected, or ALL. Dashboard readers can configure alerts for themselves. The Explore Anomalies
page doesn't display this button if you opened the page from an analysis.
Note
The ability to configure alerts is available only in published dashboards.
• Status – Under the Anomalies header, the status label displays information on the last run, for
example "Anomalies for Revenue on November 17, 2018." This label tells you how many metrics were
processed and how long ago. You can choose the link to learn more about the details, for example how
many metrics were ignored.
For example, suppose that you are a business manager. Suppose that you want to forecast sales to see if
you are going to meet your goal by the end of the year. Or, suppose that you expect a large deal to come
through in two weeks and you want to know how it's going to affect your overall forecast.
You can forecast your business revenue with multiple levels of seasonality (for example, sales with
both weekly and quarterly trends). Amazon QuickSight automatically excludes anomalies in the data
657
Amazon QuickSight User Guide
Using forecasts and what-if scenarios
(for example, a spike in sales due to price drop or promotion) from influencing the forecast. You also
don't have to clean and reprep the data with missing values because Amazon QuickSight automatically
handles that. In addition, with ML-powered forecasting, you can perform interactive what-if analyses to
determine the growth trajectory you need to meet business goals.
Use the following procedure to add a graphical forecast to your analysis, and explore what-if scenarios.
Although the following procedure is for graphical forecasting, you can also add a forecast as a narrative
in an insight widget. To learn more, see Creating autonarratives with Amazon QuickSight (p. 624).
1. Create a visual that uses a single date field and up to three metrics (measures).
2. On the menu in the upper-right corner of the visual, choose the Menu options icon (the three dots),
and then choose Add forecast.
QuickSight automatically analyzes the historical data using ML, and displays a graphical forecast
for the next 14 periods. Forecast properties apply to all metrics in your visual. If you want individual
forecasts for each metric, consider creating a separate visual for each metric and adding a forecast
to each.
658
Amazon QuickSight User Guide
Using forecasts and what-if scenarios
3. On the Forecast properties panel at left, customize one or more of the following settings:
• Forecast length – Set Periods forward to forecast, or set Periods backward to look for patterns
to base the forecast on.
• Prediction interval – Set the estimated range for the forecast. Doing this changes how wide the
band of possibility is around the predicted line.
• Seasonality – Set the number of time periods involved in the predictable seasonal pattern of data.
The range is 1–180, and the default setting is Automatic.
• Forecast boundaries – Set a minimum and/or maximum forecast value to prevent forecast values
from going above or below a specified value. For example, if your forecasting predicts the number
of new hires the company will make in the next month to be in the negative numbers, you can set
a forecast boundary minimum to zero. This stops the forecasted values from ever going below
zero.
If your forecast contains multiple metrics, you can isolate one of the forecasts by selecting anywhere
inside the orange band. When you do this, the other forecasts disappear. Select the isolated forecast
band again to have them reappear.
4. Analyze what-if scenarios by choosing a forecasted data point (in the orange band) on the chart, and
then choosing What-if analysis from the context menu.
The What-if analysis panel opens at left. Set the following options:
• Scenario – Set a target for a date, or set a target for a time range.
• Dates – If you are setting a target for a specific date, enter that date here. If you are using a time
range, set the start and end dates.
• Target – Set a target value for the metric.
If you keep your changes, you see the new forecast adjusted for the target, alongside the original
forecast without the what-if.
659
Amazon QuickSight User Guide
Using forecasts and what-if scenarios
The what-if analysis is represented on the visual as a dot on the metric line. You can hover over the
data points on the forecasting line to see the details.
• To interact with or remove a what-if analysis, choose the dot on the metric line.
• To create additional what-if scenarios, close the what-if analysis before choosing a new point on the
line.
Note
What-if analyses can exist inside an analysis only, not inside a dashboard.
660
Amazon QuickSight User Guide
Try Q
Amazon QuickSight Q, powered by machine learning, uses natural language processing to answer
your business questions quickly. By using Q, you can save weeks of effort on the part of your business
intelligence (BI) teams, who otherwise might have to build predefined data models and dashboards.
Q is optimized to understand business language that you use every day as part of your work, including
phrases related to sales, marketing, and retail. For example, suppose that a sales leader wants to identify
product categories that brought in the highest revenue in a region. They can simply ask, "What are the
top-selling categories in California?" Q understands that "top-selling" means highest revenue and return
the top-ranked categories in California by revenue.
Q provides autocomplete suggestions, performs spell-checks, and suggests acronyms and synonyms that
you can customize to be business-specific. Also, if Q gets an answer wrong, you can provide feedback to
Q to correct the answer. This feedback is passed on to the BI team, who can fine-tune the data model or
add more data.
Topics
• Trying Amazon QuickSight Q (p. 661)
• Getting started with Amazon QuickSight Q (p. 663)
• Working with Amazon QuickSight Q topics (p. 671)
• Asking questions with Amazon QuickSight Q (p. 713)
• Providing feedback about Amazon QuickSight Q topics (p. 718)
• Correcting wrong answers provided by Amazon QuickSight Q (p. 720)
• Verifying Amazon QuickSight Q answers (p. 731)
• Unsubscribing from Amazon QuickSight Q (p. 733)
If you're curious about Amazon QuickSight Q, you can try it out for free before getting the Q add-on. You
can try Q by participating in a short demonstration. You can also sign up for a free trial.
661
Amazon QuickSight User Guide
Try Q
To try Q
3. On the next page, choose a sample topic. You can choose topics on product sales, marketing
campaigns, financial services, clinical trials, student enrollment statistics, and AWS cost and usage.
A sample topic page opens with sample questions you can ask at left.
4. In the Questions you can ask about this sample pane at left, hover your cursor over a question that
you want to try and choose ASK THIS QUESTION.
662
Amazon QuickSight User Guide
Getting started
6. When finished, you can sign up for a free one-month trial by choosing Start free trial. If you're an
administrator, you're prompted to choose the AWS Regions that you want to get the trial for. If
you're an author, a request to sign up for the trial is sent to your administrator.
The free trial is offered for one month. At the end of the trial, the Q add-on is automatically added
to your account and you are billed for the add-on. For more information about Q add-on pricing, see
Amazon QuickSight Pricing.
If at anytime during the trial you decide not to get the Q add-on, you can unsubscribe from Q. For
more information, see Unsubscribing from Amazon QuickSight Q (p. 733).
Alternatively, you can close the demonstration by selecting the X icon at top right, or by choosing
Back to Home page at top left.
663
Amazon QuickSight User Guide
Step 1: Get the Q add-on
To get started using Amazon QuickSight Q, first get the Q add-on for your QuickSight account and
specify the AWS Regions that you want the subscription to be available for. Pricing for the add-
on applies to your entire QuickSight account and isn't specific to a Region. After you subscribe to
Q, QuickSight authors can create topics, ask questions, and share topics with QuickSight readers.
QuickSight readers can also ask questions using the Q bar.
To help you create effective topics and practice asking Q questions about your data, QuickSight offers a
step-by-step setup and getting started video. You can also find an interactive walkthrough that shows
you how to ask questions about a topic using the Q bar, create topics, and optimize topics for natural
language.
Topics
• Step 1: Get the Q add-on (p. 664)
• Step 2: Create a sample Q topic (p. 665)
• Step 3: Explore the sample topic (p. 666)
• Step 4: Practice asking questions with the Q bar (p. 668)
1. On the QuickSight start page, choose your user name at upper right, and then choose Manage
QuickSight.
2. Choose Your subscriptions at left.
3. On the Manage Subscriptions page that opens, choose Get Q add-on.
4. On the Get QuickSight Q add-on page that opens, choose the AWS Regions that you want to get
the add-on for, and then choose Continue. For a list of supported AWS Regions for QuickSight Q,
see Supported AWS Regions for Amazon QuickSight Q (p. 916).
You can find details about the subscription pricing for the Q add-on at the top of the page.
5. (Optional) On the next page, choose one of the following workshops for your QuickSight authors to
learn how to use Q, and then choose Continue:
• 1-day Q workshop for authors – When you choose this option, someone from our Sales team
will contact you to schedule a day-long workshop. During the workshop, you can build a proof-of-
concept Q environment with your own data. You also can learn data modeling best practices for
Q. The workshop also shows how to create and share topics with readers in your organization. You
can get started using Q right away when you choose this option.
• Custom Q workshop for authors – When you choose this option, our experts will work with you
to design a customized training and support program based on your needs. After you complete
the training, you have full access to Q features. In the meantime, you can familiarize yourself with
Q by watching our getting started video. You can also practice creating topics that are natural-
language-friendly by using sample data.
6. On the next page, review the Q add-on pricing information and then choose Confirm subscription.
Q might take several minutes to set up. When it's finished setting up, a status bar at the top of the
Topics page confirms that you're subscribed and that setup is complete.
664
Amazon QuickSight User Guide
Step 2: Create a sample Q topic
You can manage your Q subscription anytime. To do this, choose your user name at the upper right
of any QuickSight page, choose Manage QuickSight, Your subscriptions, and then choose Manage
regions at right of QuickSight Q add-on.
665
Amazon QuickSight User Guide
Step 3: Explore the sample topic
The topic creation process begins. This might take several minutes. While you wait, we recommend
watching the getting started video. It contains the most important steps authors need to do to
create a successful topic.
You can find the sample topic on the Topics page. This page includes a list of all your topics. Each listing
includes the topic name, refresh history, number of questions asked using it, and feedback data. Because
this is your first time using Q, only the sample topic is listed.
1. On the Topics page, choose the sample topic. In this example, the Software Sales sample topic is
used.
The topic opens to the topic Summary page. Here you can see how your readers engage with your
topic and what feedback and ratings they give on the answers provided. Here you can also see a list
of the datasets used to create the topic.
2. Choose the Data tab.
The Data tab lists all the fields in your topic. Here you can configure your metadata to make your
topic more natural-language-friendly and to improve your topic performance.
666
Amazon QuickSight User Guide
Step 3: Explore the sample topic
The step-by-step walkthrough points out the following four best practices for configuring natural-
language-friendly topics. Choose Next on the walkthrough to follow along with each of the
following best practices:
a. Exclude unused fields – Remove any fields that you don't want included in answers to your
readers' questions. In this example, the field Row ID was removed. As a result, Q doesn't index
the Row ID field as a term or use any of its values (customer mailing addresses) in answers.
b. Verify friendly field names – Rename fields to use names that your readers might use when
asking a question about the topic. In this example, the author renamed the field cstmr_nm to
Customer.
To rename a field, choose the pencil icon at the right of the field name and then enter a name
for the field.
c. Add synonyms to fields – Not everyone in your organization knows the names of your fields,
so it's necessary to include commonly used terms for your fields as synonyms. In this example,
the author added the synonyms buyer, purchaser, Company, and client to the Customer
field. That way, if a reader asks, "Show me top 10 clients", Q knows they're referring to data in
the Customer field.
To add a synonym to a field, choose the pencil icon beneath the Synonyms column for the
field, enter a word or phrase, and then press Enter on your keyboard. To add another synonym,
choose the + icon.
667
Amazon QuickSight User Guide
Step 4: Practice asking questions with the Q bar
d. Review field configurations – To help Q understand your data and use it correctly to answer
readers' questions, we recommend that you review and update your field details.
Here you can specify how you want Q to use the field. Should it be used as a measure or a
dimension? Is it a location, person, or a date? Should it be aggregated as a sum or a count by
default? Is it currency or a number? In field details, you can specify this information. In this
example, the Customer field has been configured as a Dimension with a default aggregation
of Count distinct. It has also been identified as an Organization.
To tell Q more about your fields, choose the field list at far right and then add your changes to
the field details.
For more information about best practices and making topics natural-language-friendly, see Making
Amazon QuickSight Q topics natural-language-friendly (p. 690).
1. Select a topic.
668
Amazon QuickSight User Guide
Step 4: Practice asking questions with the Q bar
To select a topic, choose the topic list at left of the Q bar, and then choose the topic that you want
to ask about. Because the sample topic is the only topic that you have at this time, it's already
selected for you.
2. Click or tap inside the Q bar and enter a question. Press Enter on your keyboard when you're
finished.
The sample topic includes several sample questions to ask Q. For example, if you enter Who had
the most sales last quarter?, Q responds with a horizontal bar chart showing sales by
customer in the previous quarter.
3. Review how Q interpreted your question. You can see a description of the visualization at upper left
of the Q answer.
669
Amazon QuickSight User Guide
Step 4: Practice asking questions with the Q bar
Notice how Q underlined key terms in the question also. Those are the terms Q mapped to data
fields in the topic. In this example, the term customer was mapped to who; sales was mapped to
the sales field; and quarter was mapped to the previous quarter field.
Q knows how to map these terms to data fields in the topic because the owner of the topic
configured it to be natural-language-friendly. However, if you ask a question that Q doesn't know
how to interpret, you can improve Q's accuracy by providing feedback and making corrections, as
described later.
4. Change the chart type. To do this, choose the bar chart icon at the answer's upper right, and then
choose the type of chart that you want.
For more information about asking questions using the Q bar, including the types of questions Q
recognizes, see Asking questions with Amazon QuickSight Q (p. 713).
670
Amazon QuickSight User Guide
Working with topics
Now that you've explored the sample topic and practiced asking questions, you're ready to start creating
topics and asking questions about them. To learn how, continue to Working with Amazon QuickSight Q
topics (p. 671).
Topics are collections of one or more datasets that represent a subject area that your business users can
ask questions about. In Amazon QuickSight, you can create and manage topics in the Topics pane.
When you create a topic, your business users can ask questions about it in the Q bar. At any time, you can
open a topic to change it or review how it's performing.
671
Amazon QuickSight User Guide
Working with topics
If at any time you want to return to a list of all your topics, choose All topics at left of the topic
workspace.
Continue on to the following help topics to learn more about working with Q topics.
Topics
• Creating Amazon QuickSight Q topics (p. 673)
• Topic workspace (p. 675)
• Working with datasets in an Amazon QuickSight Q topic (p. 681)
• Making Amazon QuickSight Q topics natural-language-friendly (p. 690)
• Sharing Amazon QuickSight Q topics (p. 699)
• Reviewing Amazon QuickSight Q topic performance and feedback (p. 703)
672
Amazon QuickSight User Guide
Creating topics
To turn on questions for your datasets, you have to create a topic. When you create topics in Amazon
QuickSight, you can add multiple datasets to them and then configure all fields in the datasets to make
them natural-language-friendly. Doing this is required for Q to provide your business users with the
correct visualizations and answers to their questions.
After you share your topic with QuickSight readers and they use it to ask questions in the Q bar, you can
see a summary of how the topic is performing. You can also see a list of everything users asked and how
well Q responded, and any answers you have verified.
Creating a topic
Use the following procedure to create a topic.
To create a topic
673
Amazon QuickSight User Guide
Creating topics
2. On the Topics page that opens, choose New topic at upper right.
Your business users identify the topic by this name and use it to ask questions.
b. For Description, enter a description for the topic.
Your users can use this description to get more details about the topic.
c. Choose Continue.
4. On the Add data to topic page that opens, choose one of the following options:
674
Amazon QuickSight User Guide
Topic workspace
• To add one or more datasets that you own or have permission to, choose Datasets, and then
select the dataset or datasets that you want to add.
• To add datasets from dashboards that you have created or that have been shared with you, choose
Datasets from a dashboards, and then select a dashboard from the list.
Note
Currently, QuickSight Q doesn't support datasets that use row-level or column-level
security.
5. Choose Add data.
Your topic is created and the page for that topic opens. The next step is to configure the topic
metadata to make it natural-language-friendly for your readers. For more information, see Making
Amazon QuickSight Q topics natural-language-friendly (p. 690). Or continue to the next topic to
explore the topic workspace.
Topic workspace
After you create a topic, or when you choose an existing topic from the list on the Topics page, the topic
opens to that topic's workspace. Four tabs appear here that you can use as described in the following
sections.
675
Amazon QuickSight User Guide
Topic workspace
Summary
• Suggestions – Suggestions provide step-by-step guidance for how you can improve a topic. These
steps help you understand how to create better-performing topics.
To follow a suggestion, choose the action button in the Suggestion banner and follow the
recommended steps.
Currently, there are eight preset suggestions that Q offers in the order shown by the following table.
After you complete a step for a suggestion, a new suggestion is offered when you return to the
Summary tab.
Exclude unnecessary fields Review all fields of your topic This suggestion encourages
and exclude those that must you to exclude fields that
not be used to provide answers. aren't relevant to your readers.
676
Amazon QuickSight User Guide
Topic workspace
Update semantic types for Improve answer quality by This suggestion encourages
fields telling us more about data you to update semantic types
contained in each field in the for your fields. Semantic types
form of Semantic type. help Q understand when to
use a field in context to related
questions. They include the
field role, data type, default
aggregation, and more.
Test topic by asking questions Verify your topic performance This suggestion encourages
by asking questions about it in you to test your topic by asking
the Q bar. a question in the Q bar. Make
sure to format your question in
a way that Q can understand.
For more information, see
Asking questions with Amazon
QuickSight Q (p. 713).
Provide feedback on answers You can review feedback for This suggestion encourages you
answers on your topic. Try to ask your readers to provide
asking a question and providing specific feedback related to
feedback for an answer. their questions.
Preconfigure answers for You can verify answers This suggestion encourages you
questions generated by your topic by to review answers created by
creating reviewed answers. Try your topic and verify that the
creating a reviewed answer. answers are accurate.
Review questions with negative You can review answers with This suggestion encourages you
feedback. negative feedback from to review individual questions
users and make necessary your readers asked and gave
improvements to topic. negative feedback for. You can
view the question and answer
to identify gaps in this topic's
settings and correct them.
677
Amazon QuickSight User Guide
Topic workspace
Review questions with You can review answers with This suggestion encourages
comments comments to improve topic you to review free-form
performance. comments from your readers
about questions they asked.
Reviewing comments can help
you identify ways to improve
your readers' question and
answer experience.
• Metrics and key performance indicators (KPIs) on topic engagement and performance – In this
section, you can see how your readers engage with your topics and what feedback and ratings they
give on the answers provided. You can view engagement for all the questions users asked, or select a
specific question. You can also change the time span of the metrics from one year down to one week.
For more information, see Reviewing Amazon QuickSight Q topic performance and feedback (p. 703).
• Datasets – This section shows the datasets that were used to create the topic. In this section, you can
add additional datasets or import datasets from existing dashboards. You can also edit the metadata
for a topic dataset, set a data refresh schedule, change the name of the dataset, and more. For more
information, see Working with datasets in an Amazon QuickSight Q topic (p. 681).
678
Amazon QuickSight User Guide
Topic workspace
Data
The Data tab shows all the fields included in the topic. Here you configure your topic metadata to make
your topic natural-language-friendly and to improve your topic performance. For more information, see
Making Amazon QuickSight Q topics natural-language-friendly (p. 690).
User activity
This tab shows all the questions that your topic receives and the overall feedback for each question. You
can see an overview of how many questions were asked and what percentage of them were positive and
negative. You can filter by feedback and whether someone left a comment with their feedback. For more
information, see Reviewing Amazon QuickSight Q topic performance and feedback (p. 703).
679
Amazon QuickSight User Guide
Topic workspace
Verified answers
Verified answers are questions that you have preconfigured visuals for. You can create a verified answer
to a question by asking the question in the Q bar and then marking it as reviewed. By using the Verified
Answers tab, you can review your verified answers and the feedback they receive by your users.
For more information, see Verifying Amazon QuickSight Q answers (p. 731).
680
Amazon QuickSight User Guide
Working with datasets in a topic
When you create a topic, you can add additional datasets to it or import datasets from existing
dashboards. At any time, you can edit metadata for a dataset and set a data refresh schedule. You can
also add new fields to a dataset in a topic by creating calculated fields, filters, or named entities.
Topics
• Adding datasets to a topic (p. 681)
• Adding datasets with row-level security (RLS) to a topic (p. 682)
• Importing datasets into a topic from a dashboard (p. 683)
• Refreshing datasets in a topic (p. 684)
• Removing datasets from a topic (p. 686)
• Adding calculated fields to a topic dataset (p. 686)
• Adding filters to a topic dataset (p. 687)
• Adding named entities to a topic dataset (p. 689)
681
Amazon QuickSight User Guide
Working with datasets in a topic
Note
Currently, QuickSight Q doesn't support datasets that use row-level or column-level security.
1. Open the topic that you want to add one or more datasets to.
2. On the Summary page, under Datasets, choose Add datasets.
3. On the Add datasets page that opens, choose the dataset or datasets that you want to add, and
then choose Add datasets.
The dataset is added to the topic and Q begins indexing the dataset's unique string values.
You can edit the field configurations right away. For more information about the Q index, see
Refreshing Amazon QuickSight Q topic indexes (p. 711). For more information about editing field
configurations for Q, see Making Amazon QuickSight Q topics natural-language-friendly (p. 690).
• Don't allow users to ask questions regarding this field – Select this option if a field contains sensitive
values that you don't want to expose to users asking questions with Q.
• Allow users to ask questions regarding this field – Select this option if there is no sensitive
information contained in the field and you want users to be able to ask questions regarding it with Q.
All metrics in a topic respect the RLS rules applied to your dataset. For example, if a user asks, "show me
sales by region," the data that Q returns is based on the user's access to the underlying data. So, if they're
only allowed to see the East region, only data for the East region appears in the Q answer.
However, RLS rules aren't applied to automatic suggestions when users are asking questions. As users
enter questions,they can see dimensional values suggested to them that they don't have RLS access to.
They don't get answers for these dimensional values if they ask a question about them. For example,
suppose that the same user is entering the question "show me sales in the" and sees the West region
appear as an automatic suggestion. In this case, they don't get an answer for it, even if they ask, because
they don't have RLS access to that region.
682
Amazon QuickSight User Guide
Working with datasets in a topic
For more information about adding RLS to a dataset, see Using row-level security (RLS) in Amazon
QuickSight (p. 109).
3. On the data preparation page, choose the field menu (the three dots) for a field that you want to
allow for Q, and then choose Row level security for Q.
4. On the Row level security for QuickSight Q page that opens, choose Allow users to ask questions
regarding this field.
5. Choose Apply.
A blue Q icon appears next to the field to indicate that Q questions are allowed for it.
You can choose to reverse this and not allow questions for the field. To do so, repeat steps 1–3 and
choose Don't allow users to ask questions regarding this field.
6. When finished editing the dataset, choose Save & publish in the blue toolbar at upper right.
7. Add the dataset to your Q topic. For more information, see the previous section, Adding datasets to
a topic (p. 681).
If you want to change which fields you allow in Q after you add the dataset with RLS to your topic,
repeat steps 1–6, and then refresh the dataset in your topic. For more information, see Refreshing
datasets in a topic (p. 684).
683
Amazon QuickSight User Guide
Working with datasets in a topic
3. On the Add data to topic page that opens, choose the dashboard or dashboards that you want to
import data from, and then choose Add data.
Q doesn't replicate your datasets when you add them to a topic. Q creates an index of unique string
values and doesn't index metrics. For example, measures stored as integers are not indexed by Q.
Questions asked always fetch the latest sales metrics based on data in your dataset.
For more information about refreshing the topic index, see Refreshing Amazon QuickSight Q topic
indexes (p. 711)
You can set a refresh schedule for a dataset in a topic, or refresh the dataset manually. You can also see
when the data was last refreshed.
• If the dataset is a SPICE dataset, select Refresh topic when dataset is imported into SPICE.
684
Amazon QuickSight User Guide
Working with datasets in a topic
Currently, hourly refresh SPICE datasets aren't supported in Q. SPICE datasets that are set to
refresh every hour are automatically converted to a daily refresh. For more information about
setting refresh schedules for SPICE datasets, see Refreshing SPICE data (p. 133).
• If the dataset is a direct query dataset, do the following:
1. For Timezone, choose a time zone.
2. For Repeats, choose how often you want the refresh to happen. You can choose to refresh the
dataset daily, weekly, or monthly.
3. For Refresh time, enter the time that you want the refresh to start.
4. For Start first refresh on, choose a date that you want start refreshing the dataset on.
4. Choose Save.
1. On the topic Summary page, under Datasets, choose the dataset that you want to refresh.
2. Choose Refresh now.
1. On the topic Summary page, under Datasets, choose the dataset that you want to see refresh
history for.
2. Choose View history.
The Update history page opens with a list of the times the dataset was refreshed.
685
Amazon QuickSight User Guide
Working with datasets in a topic
3. On the Are you sure you want to delete? page that opens, choose Delete to remove the dataset
from the topic. Choose Cancel if you don't want to remove the dataset from the topic.
For example, if your dataset contains columns for sales and expenses, you can combine them in a
calculated field with a simple function to create a profit column. The function might look like the
following: sum({Sales}) - sum({Expenses}).
686
Amazon QuickSight User Guide
Working with datasets in a topic
You can see a list of fields in the dataset in the Fields pane at right. You can also see a list of
supported functions in the Functions pane at right.
For more information about the functions and operators you can use to create calculations in
QuickSight, see the Calculated field function and operator reference for Amazon QuickSight
(p. 172).
5. When finished, choose Save.
The calculated field is added to the list of fields in the topic. You can add a description to it and
configure metadata for it to make it more natural language friendly.
687
Amazon QuickSight User Guide
Working with datasets in a topic
Depending on the type of field you choose, you're offered different filtering options.
For more information about filter text fields, see Adding text filters (p. 332).
2. For Rule, choose a rule.
3. For Value, enter one or more values.
• If you chose a date field (for example, Date), do the following:
1. For Filter type, choose the type of filter that you want, and then enter the date or dates
that you want to apply the filter to.
For more information about filtering dates, see Adding date filters (p. 336).
• If you chose a numeric field (for example, Compensation), do the following:
1. For Aggregation, choose how you want to aggregate the filtered values.
2. For Rule, choose a rule for the filter, and then enter a value for that rule.
For more information about filtering numeric fields, see Adding numeric filters (p. 335).
d. (Optional) To specify when the filter is applied, choose Apply the filter anytime the dataset is
used, and then choose one of the following:
• Apply always – When you choose this option, the filter is applied whenever any column from
the dataset you specified is linked to a question.
• Apply always, unless a question results in an explicit filter from the dataset – When you
choose this option, the filter is applied whenever any column from the dataset you specified is
linked to a question. However, if the question mentions an explicit filter on the same field, the
filter isn't applied.
e. When finished, choose Save.
688
Amazon QuickSight User Guide
Working with datasets in a topic
The filter is added to the list of fields in the topic. You can edit the description for it or adjust
when the filter is applied.
A named entity is a collection of fields that display together in an answer. For example, using the
transaction address example, you can create a named entity called Address. You can then add the
Branch Name, State, and City columns to it, which already exist in the dataset. When someone asks a
question about address, the answer displays the branch, state, and city where a transaction took place.
The ordering of the fields listed here are the order they appear in answers. To move a field,
choose the six dots at left of the field name and drag and drop the field to the order that you
want.
f. When finished, choose Save.
689
Amazon QuickSight User Guide
Making topics natural-language-friendly
The named entity is added to the list of fields in the topic. You can add edit the description for it and
add synonyms to it to make it more natural language friendly.
When you create a topic, Amazon QuickSight Q creates, stores, and maintains an index with definitions
for data in that topic. Q uses this index to generate correct answers, provide autocomplete suggestions
when someone asks a question, and suggest mappings of terms to columns or data values. This is how Q
can interpret key terms in your readers' questions and map them to your data.
To help Q interpret your data and better answer your readers' questions, provide as much information
about your datasets and their associated fields as possible.
Use the following procedures to do so, making your topics more natural-language-friendly.
Tip
You can edit multiple fields at a time using bulk actions. Use the following procedure to bulk-
edit fields in a topic.
For example, if your dataset is named D_CUST_DLY_ORD_DTL, you might rename it in the topic to
Customer Daily Order Details. That way, when your readers see it listed in the Q bar for your
topic, they can quickly determine if the data is relevant to them or not.
690
Amazon QuickSight User Guide
Making topics natural-language-friendly
2. On the Summary tab, under Datasets, choose the down arrow at the far right of the dataset to
expand it.
3. Choose the pencil icon next to the dataset name at left, and then enter a friendly name. We
recommend using a name that your readers will understand.
4. For Description, enter a description for the dataset that describes the data it contains.
691
Amazon QuickSight User Guide
Making topics natural-language-friendly
In some cases, there are multiple valid date columns in a topic, such as order date and shipped date. In
these cases, you can help readers by specifying a default date for Q to use to answer their questions.
Readers can choose a different date if the default date doesn't answer their question.
You can also tell Q how granular to be with your date time columns by specifying a time basis. The time
basis for a dataset is the lowest level of time granularity that is supported by all measures in the dataset.
This setting helps Q aggregate metrics in the dataset across different time dimensions and is applicable
for datasets that support a single date time granularity. This option can be set for denormalized datasets
with a large number of metrics. For example, if a dataset supports several metrics at a daily aggregation,
then you can set the time basis of that dataset to Daily. Q then uses that to determine how to aggregate
metrics.
692
Amazon QuickSight User Guide
Making topics natural-language-friendly
Q uses field names to understand the fields and link them to terms in your readers' questions. When your
field names are user-friendly, it's easier for Q to draw links between the data and a reader’s question.
These friendly names are also presented to readers as part of the answer to their question to provide
additional context.
693
Amazon QuickSight User Guide
Making topics natural-language-friendly
To help Q make sense of these terms and map them to the correct fields, you can add one or more
synonyms to your fields. Doing this improves Q's accuracy.
As with field names, your readers might use different names to refer to specific values in your fields. For
example, if you have a field that contains the values NW, SE, NE, and SW, you can add synonyms for those
values. You can add Northwest for NW, Southeast for SE, and so on.
5. On the Field Value Synonyms page that opens, choose Add, and then do the following:
a. For Value, choose the value that you want to add synonyms to.
b. For Synonyms, enter one or more synonyms for the value.
6. Choose Save.
7. To add synonyms for another value, repeat steps 5–6.
8. When you finish, choose Done.
694
Amazon QuickSight User Guide
Making topics natural-language-friendly
You can tell Q whether a field in your dataset is a dimension or a measure and specify how that field
should be aggregated. You can also clarify how the values in a field should be formatted, and what type
of data is in the field. Configuring these additional settings helps Q create accurate answers for your
readers when they ask a question.
For example, setting the fields Patient ID, Employee ID, and Ratings helps Q interpret those fields
as integers. This setting means that Q doesn't try to aggregate them as it does measures.
5. (Optional) If your measure is inversely proportional (for example, the lower the number, the better),
choose Inverted measure.
This tells Q how to interpret and display the values in this field.
695
Amazon QuickSight User Guide
Making topics natural-language-friendly
A default aggregation is the aggregation that's applied when there's no explicit aggregation function
mentioned or identified in a reader's question. For example, let's say one of your readers asks Q, "How
many products were sold yesterday?" In this case, Q uses the field Product ID, which has a default
aggregation of count distinct, to answer the question. Doing this results in a visual showing the
distinct count of Product ID.
Not allowed aggregations are aggregations that are excluded from being used on a field to answer a
question. They're excluded even if the question specifically asks for a not allowed aggregation. For
example, let's say you specify that the Product ID field should never be aggregated by sum. Even if one
of your readers asks, "How many total products were sold yesterday?" Q doesn't use sum to answer the
question.
If Q is incorrectly applying aggregate functions on a field, we recommend that you set not allowed
aggregations for the field.
You can aggregate measures by sum, average, max, and min. You can aggregate dimensions by
count and count distinct.
696
Amazon QuickSight User Guide
Making topics natural-language-friendly
5. (Optional) For Not allowed aggregations, choose an aggregation that you don't want Q to use.
6. (Optional) If you don't want Q to aggregate the field in a filter, choose Never aggregate in a filter.
697
Amazon QuickSight User Guide
Making topics natural-language-friendly
Use the following procedure to specify field semantic types and subtypes.
For measures, you can select duration, date part, location, boolean, currency, percentage, age,
distance, and identifier types. For dimensions, you can select date part, location, Boolean, person,
organization, and identifier types.
5. For Semantic sub-type, choose an option to further specify the kind of information the data
represents.
The options here depend on the semantic type that you chose and the role associated with the field.
For a list of semantic types and their associated subtypes for measures and dimensions, see the
following table.
Age Measures
698
Amazon QuickSight User Guide
Sharing topics
GBP
Week
Month
Year
Quarter
Meter
Yard
Foot
Minute
Hour
Day
Country
State
City
Organization Dimensions
Percentage Measures
Person Dimensions
699
Amazon QuickSight User Guide
Sharing topics
After you create a topic, you can share it with others in your organization. Sharing a topic allows your
users to select the topic and ask questions about it in the Q bar. After you share a topic with your users,
you can assign permissions to them that specify who can change the topic.
To share a topic
2. On the Topics page that opens, open the topic that you want to share.
3. On the page that opens, choose Share at upper right.
4. On the Share topic with users page that opens, choose the user or users that you want to share the
topic with.
You can use the search bar to search for users by email address.
700
Amazon QuickSight User Guide
Sharing topics
5. Choose either Viewer or Co-owner under the Permission column to assign permissions to your
users.
For more information about these permissions, see the following section, Managing topic
permissions (p. 701).
701
Amazon QuickSight User Guide
Sharing topics
2. On the Q Topics page that opens, open the topic that you want to manage permissions for.
3. On the topic page that opens, choose Share at upper right.
4. On the Share topic with users page that opens, choose Manage topic access.
5. On the Manage topic permissions page that opens, find the user that you want to manage access
for, and then for Permission, choose one of the following options:
702
Amazon QuickSight User Guide
Reviewing topic performance and feedback
After you create a topic and share it with your users, you can review how that topic is performing. When
someone uses your topic to ask a question or provides feedback on how well Q responded, it's recorded
on the topic's Summary and User Activity tabs.
On the topic's Summary tab, you can view historical data for the number of questions asked over time,
in time periods from seven days to a year. You can also see a distribution of questions that received
positive, negative, or no feedback, and also questions that were unanswerable.
On the User Activity tab, you can see a list of the questions that users asked and any positive or negative
feedback and comments that they left.
Reviewing this information can help you determine whether your topic is meeting your users' needs.
For example, let's say you have a topic that's receiving a lot of negative feedback from your users. When
you review your user activity, you notice that several users are leaving comments on a question that Q
is showing them the wrong data. In response, you examine the questions that they asked, and notice
that they were using a term that you didn't anticipate. You decide to add that term as a synonym to the
correct field in the topic. Over time, you notice an increase in positive feedback.
703
Amazon QuickSight User Guide
Reviewing topic performance and feedback
2. On the Topics page that opens, open the topic that you want to review.
The topic opens and the Statistics section shows the topic's statistics.
704
Amazon QuickSight User Guide
Reviewing topic performance and feedback
3. (Optional) To change the amount of historical data shown in the chart, choose one of the following
options: 7 days, 30 days, 90 days, 120 days, or 12 months.
4. (Optional) To remove questions that were unanswerable from the data, clear Include Unanswerable
data.
705
Amazon QuickSight User Guide
Reviewing topic performance and feedback
5. (Optional) To remove questions that didn't receive feedback from the data, clear Include No
feedback data.
706
Amazon QuickSight User Guide
Reviewing topic performance and feedback
2. On the Topics page that opens, open the topic that you want to review feedback for.
3. On the topic's page that opens, choose the User Activity tab.
The user activity for the topic is shown. At the top, you can see the total number of questions
asked and the number of questions that were answerable and unanswerable. You can also see
the percentage of questions that were rated positive and negative. Additionally, you can see the
percentage of questions that were disambiguated. This means that someone entered a question and
mapped one of the words in the question to a field in the topic.
You can choose any of these statistics to filter the list of questions.
707
Amazon QuickSight User Guide
Reviewing topic performance and feedback
4. (Optional) To view a comment left by a user on a question, choose the down arrow at right of the
question.
5. (Optional) To view the fields used to respond to a question, choose the down arrow at right of the
question.
The fields used are shown at right. Choose a field name to edit its metadata.
6. (Optional) To view a question that was disambiguated, choose the down arrow at right of a question
with a term highlighted in red.
708
Amazon QuickSight User Guide
Reviewing topic performance and feedback
A description of the term and the field that was used to disambiguate it is shown. To add synonyms
for the field, choose Add synonyms.
7. (Optional) To view how Q responded to a question, choose View next to the question in the list.
8. (Optional) To filter the list of questions, choose Filter by at right, and then filter by one of the
following options.
• See all questions – This option removes all filters and shows all questions that a topic has
received.
• Answerable – This option filters the list of questions to those that were answerable. Answerable
questions are questions that Q was able to respond to.
• Unanswerable – This option filters the list of questions to those that were unanswerable.
Unanswerable questions are questions that Q could not respond to.
• Disambiguated – This option filters the list of questions to those that were disambiguated,
meaning questions with terms that users manually mapped a field to.
• No feedback – This option filters the list of questions to those that didn't receive feedback.
• Negative – This option filters the list of questions to those that received negative feedback.
• Positive – This option filters the list of questions to those that received positive feedback.
• No comments – This option filters the list of questions to those that didn't receive comments from
users.
• Has comments – This option filters the list of questions to those that received comments from
users.
• User – This option filters the list of questions to those that were asked by a user with a specific
user name that you enter.
709
Amazon QuickSight User Guide
Reviewing topic performance and feedback
710
Amazon QuickSight User Guide
Refreshing topic indexes
When you create a topic, Amazon QuickSight Q creates, stores, and maintains an index with definitions
for data in that topic. This index isn't exposed to QuickSight authors. It's not a copy of the datasets
included in a topic either. Q doesn't index metrics. For example, measures stored as integers are not
indexed by Q.
The topic index is an index of unique string values for fields included in a topic. Q uses this index to
generate correct answers, provide autocomplete suggestions when someone asks a question, and
suggest mappings of terms to columns or data values.
To refresh a topic index, refresh the datasets in the topic. You can manually refresh all datasets in a topic
or refresh an individual dataset. You can also view dataset refresh history to monitor past refreshes,
and set a recurring refresh schedule for every dataset in the topic. For SPICE datasets, you can sync the
topic index refresh schedule with the SPICE refresh schedule. For more information about setting SPICE
refresh schedules, see Refreshing a dataset on a schedule (p. 135).
Note
Currently, hourly refresh schedules aren't supported in Q. You can set a refresh schedule to
refresh datasets in a topic up to once a day.
We recommend that you update topic indexes regularly to ensure that the latest definitions and values
are recorded. Updating a topic index takes approximately 15 to 30 minutes, depending on the number
and size of datasets included in the topic.
711
Amazon QuickSight User Guide
Refreshing topic indexes
2. On the Topics page that opens, open the topic that you want to refresh.
The topic opens to the Summary tab, which shows the datasets that are included in the topic at
page bottom. It also shows when the last time the topic was refreshed at upper right.
712
Amazon QuickSight User Guide
Asking questions
3. Choose Refreshed at upper right to refresh the topic index, and then choose Refresh data. Doing
this manually refreshes all datasets in the topic.
For more information about refreshing individual datasets in a topic, see Refreshing datasets in a
topic (p. 684).
713
Amazon QuickSight User Guide
Asking questions
1. In the Q bar at the top of any QuickSight page, choose the topic list at left, and then choose the
topic that you want to ask questions about.
If you're not sure what a topic is about, hover your cursor over the topic name to read a description
about it.
2. Enter a question in the Q bar and then press enter on your keyboard.
714
Amazon QuickSight User Guide
Asking questions
You can see how Q interpreted your question in the description at the visual's upper left. Here you
can see the fields, aggregations, and datasets used to answer the question.
3. (Optional) Change the visual type by choosing the visual types icon at right, and then choosing a
visual type.
4. (Optional) See key data insights and callouts by choosing the lightbulb icon at right. Insights appear
in the pane that opens at right.
715
Amazon QuickSight User Guide
Asking questions
5. (Optional) Add a forecast by choosing the lightbulb icon at right, and then turning on Forecast.
Choose the settings gear icon that appears at right and use the slider to adjust the forecast timeline.
Note
Forecasting is only available for answers that contain line charts with a single time series.
6. (Optional) Undo or redo any changes you make to the answer by choosing the undo or redo arrows
in the Q search bar.
7. (Optional) Use the About topic menu to see the topic's name, description, key details, commonly
asked questions, and attributes. Choose the info icon that appears at right to access the About topic
menu.
716
Amazon QuickSight User Guide
Types of questions supported by Q
Sometimes Q might not interpret your question the way you wanted. When this happens, you can
provide feedback on the answer or make suggestions for corrections to the answer. For more information
about providing answer feedback, see Providing feedback about Amazon QuickSight Q topics (p. 718).
For more information about correcting answers, see Correcting wrong answers provided by Amazon
QuickSight Q (p. 720).
KPI-Based Period over Periods (PoPs) What is the revenue difference WoW?
Relative Date Filters Show me revenue trend for the last 12 weeks
Time Range Filters How many new users do we have since Jan 2020?
Period to Date (PtD) and Period over Period (PoP) Growth % in revenue YTD vs last year in California
Aggregate Metrics Filter Customers who spent more than $1M last month
717
Amazon QuickSight User Guide
Providing feedback
When Questions When did we have more than 50,000 in sales per
week?
When you ask a question in the Amazon QuickSight Q bar, you can provide feedback on the answer
Q provides. Providing feedback helps topic owners review how the topic is performing and make
improvements where possible.
Use the following procedure to provide feedback on a Q answer when you receive it.
718
Amazon QuickSight User Guide
Providing feedback
For negative feedback, you can leave a comment describing what's wrong with the answer. Your
comment is sent to the topic owner, along with your question and the visual you received in response.
Leaving a comment helps improve Q, even if you don't receive a response from the topic owner.
2. On the Provide additional feedback page that opens, for What didn't look right?, choose one of
the following reasons from the list:
719
Amazon QuickSight User Guide
Correcting answers
You can also make suggestions to improve answers. For more information, see Correcting wrong answers
provided by Amazon QuickSight Q (p. 720).
When you ask a question in the Q bar, Q identifies terms in your question and links them to the
appropriate data fields to give you an answer. Sometimes, Q doesn't understand your question, or
misinterprets your question and answers it with the wrong data. When this happens, you can make the
following corrections to teach Q how to answer your question correctly:
1. In the Q bar, highlight the term that you want to define, and then choose Define this term.
2. In the What did you mean? menu that appears, choose a field from the list.
720
Amazon QuickSight User Guide
Correcting wrong answers
• In the Q bar, choose the term that Q got wrong, and then choose a field from the list.
721
Amazon QuickSight User Guide
Correcting wrong answers
• In the Q bar, choose the term that Q got wrong, and then choose Skip this term.
722
Amazon QuickSight User Guide
Correcting wrong answers
To add a filter to the dataset and link it to a term (QuickSight authors only)
1. In the Q bar, choose the term that you want, and then choose Add a filter.
This opens the filter configuration page in the Data tab in a separate window.
2. On the Filter configuration page that opens, do the following, and then choose Save.
You can choose to always apply the filter any time the dataset is used. Or you can choose to
always apply the filter any time the dataset is used unless a question results in an explicit filter
from the dataset.
After you save the filter, it appears in your list of fields in the Data tab. You can then assign the filter
to the term in the Q bar. For more information about adding filters to datasets in a topic, see Adding
filters to a topic dataset (p. 687).
To add a calculated field to a topic and link it to a term (QuickSight authors only)
1. In the Q bar, choose the term, and then choose Add a calculated field.
723
Amazon QuickSight User Guide
Correcting wrong answers
The term that you highlighted is used as the name of the calculated field by default, but you can
change it.
3. Enter a calculation in the editor.
For more information about the functions and operations that you can use to create calculations, see
Calculated field function and operator reference for Amazon QuickSight (p. 172).
4. When finished, choose Save.
After you save the calculated field, it appears in your list of fields in the Data tab. You can then
assign the calculated field to the term in the Q bar. For more information about adding calculated
fields to topics, see Adding calculated fields to a topic dataset (p. 686).
• In the answer in the Q bar, choose the description of the field, choose Aggregation, and then choose
the aggregation that you want Q to use for your answer.
724
Amazon QuickSight User Guide
Correcting wrong answers
• In the answer in the Q bar, choose the field, and then choose Remove from answer.
725
Amazon QuickSight User Guide
Correcting wrong answers
3. Customize a visual
You can customize the visual used for an answer if the visual that Q uses isn't what you expect.
• In the answer in the Q bar, choose the field that you want to change the sort order for, choose
Sorted by, and then choose a sort order.
726
Amazon QuickSight User Guide
Correcting wrong answers
• In the answer in the Q bar, choose the field to change the number formatting for, choose Format,
and then choose the format and decimal places.
727
Amazon QuickSight User Guide
Correcting wrong answers
• In the answer in the Q bar, choose the chart axis, and then choose a field.
728
Amazon QuickSight User Guide
What to do when Q can't provide an answer
• In the answer in the Q bar, choose the chart type icon at right, and then choose the chart type that
you want.
729
Amazon QuickSight User Guide
Saving corrections to an answer
2. On the page that opens, go to the visual that you want to link the answer to and then choose Link
Visual.
The linked visual appears as the answer to the question. From here, you can edit the link to the
visual or add question variants.
Question variants are questions that return the same reviewed answer. To add a question variant to
a linked visual, choose Edit question variants, choose Add new variant, enter a question, and then
choose Save variant.
730
Amazon QuickSight User Guide
Verifying answers
2. On the Improvement suggestions pane that opens, choose the change that you want to save or
dismiss. Choose Save to save the changes, or choose Dismiss to dismiss the changes.
To improve the accuracy of the answers that Q provides for your readers, you can review your readers'
questions and verify those that were answered correctly. Verifying an answer to a specific question lets
your readers know that the answer to that question is accurate.
To verify a Q answer
731
Amazon QuickSight User Guide
Reviewing verified answers
how many times the question was asked, and see whether your readers found the verified answer to it
helpful. You can see who validated the answer and how long ago they did so. You can also see which
fields and datasets were used to answer the question. You can also remove a question from the verified
answers list.
3. On the Verified Answers tab, choose the down arrow at far right to expand information about the
question that you want to review.
• To view the fields used to answer a question, and possibly change the field metadata, choose the
field at right.
732
Amazon QuickSight User Guide
Unsubscribing from Q
• To remove a question from the verified answers list, choose Remove at lower right.
After you get the Amazon QuickSight Q add-on, you can activate more AWS Regions for your
subscription at any time. You can also deactivate AWS Regions for your subscription. To unsubscribe from
Q, deactivate all AWS Regions.
When you deactivate an AWS Region for Q, the AWS Region remains activated until the end of the billing
cycle for your subscription:
• For reader pricing, the Region is activated until the end of the month, and you are billed until then.
• For monthly pricing, the Region is activated until the end of the month, and you are billed until then.
• For annual pricing, the Region is activated until the end of the annual plan, and you are billed until
then.
733
Amazon QuickSight User Guide
Managing AWS Regions for Q
1. From any page in QuickSight, choose your user name at upper right, and then choose Manage
QuickSight.
2. Choose Your subscriptions at left.
3. On the Manage Subscriptions page, choose Manage regions to the right of QuickSight Q add-on.
4. On the Manage regions for Q page, under Region, toggle the AWS Regions that you want to
activate or deactivate. Toggle an AWS Region off to unsubscribe it from Q. Toggle an AWS Region on
to subscribe it.
For more information about the AWS Regions currently supported for QuickSight Q, see Supported AWS
Regions for Amazon QuickSight Q (p. 916).
Unsubscribing from Q
To unsubscribe from QuickSight Q completely, deactivate all AWS Regions. When you deactivate a
Region, that change remains in effect until the end of the subscription billing cycle. For annual plan
accounts that have multiple AWS Regions, the last Region is deactivated at the end of the annual plan.
You continue to incur Region fee charges for at least one Region until then.
1. From any page in QuickSight, choose your user name at upper right, and then choose Manage
QuickSight.
2. Choose Your subscriptions at left.
3. On the Manage Subscriptions page, choose Manage regions to the right of QuickSight Q add-on.
4. On the Manage regions for Q page, under Region, toggle all active AWS Regions off one at a time.
734
Amazon QuickSight User Guide
Sharing Amazon QuickSight analyses
When you share a dashboard, you specify which users have access to it. Users who are dashboard viewers
can view and filter the dashboard data. Any selections to filters, controls, or sorting that users apply
while viewing the dashboard exist only while the user is viewing the dashboard, and aren't saved after
it's closed. Users who are dashboard owners can edit and share the dashboard, and optionally can edit
and share the analysis. If you want them to also edit and share the data set, you can set that up in the
analysis.
A shared dashboard can also be embedded in a website or app, if you are using Enterprise edition. For
more information about embedded dashboards, see Working with embedded analytics (p. 782).
Use the following sections to learn how to publish and share dashboards, subscribe to threshold alerts,
and send and subscribe to dashboard email reports.
Topics
• Sharing Amazon QuickSight analyses (p. 735)
• Publishing dashboards (p. 738)
• Sharing Amazon QuickSight dashboards (p. 740)
• Sharing your view of a Amazon QuickSight dashboard (p. 754)
• Sending reports by email (p. 754)
• Subscribing to email reports in Amazon QuickSight (p. 757)
• Working with threshold alerts in Amazon QuickSight (p. 758)
• Printing a dashboard or analysis (p. 762)
• Exporting Amazon QuickSight analyses or dashboards as PDFs (p. 763)
• Organizing assets into folders for Amazon QuickSight (p. 763)
After you share an analysis, you can review the other users who have access to it, and also revoke access
from any user.
Topics
• Sharing an analysis (p. 736)
• Viewing the users that an analysis is shared with (p. 737)
• Revoking access to an analysis (p. 737)
735
Amazon QuickSight User Guide
Sharing an analysis
Sharing an analysis
Use the following procedure to share an analysis.
To share an analysis
1. On the analysis page, choose Share on the application bar, and then choose Share analysis.
You can only share analyses with users or groups who are in your Amazon QuickSight account.
2. Add a user or group to share with. To do this, for Type a user name or email, enter the first user or
group that you want to share this analysis with. Then choose Share. Repeat this step until you have
entered information for everyone you want to share the analysis with.
The Share with users and groups in your account screen appears, as shown following. On this
screen, you can edit permissions and add more users or groups.
3. For Permission, choose the role to assign to each user or group. The role determines the permission
level to grant to that user or group.
736
Amazon QuickSight User Guide
Viewing the users that an analysis is shared with
4. Choose Share.
The users that you have shared the analysis with get emails with a link to the analysis. Groups don't
receive invitation emails.
1. On the analysis page, choose Share on the application bar, and then choose Share analysis.
2. Choose Manage analysis access.
3. Review who this analysis has been shared with. You can search to locate a specific user account by
typing a search term. The search returns any user, group, or email address that contains the search
term. Searching is case-sensitive, and wildcards are not supported. Delete the search term to view all
users and groups.
1. On the analysis page, choose Share on the application bar, and then choose Share analysis.
2. Choose Manage analysis access.
3. Locate the user or group whose access you want to revoke, and then choose the trash-can icon next
to the user or group.
737
Amazon QuickSight User Guide
Publishing dashboards
4. Choose Confirm.
Publishing dashboards
Use the following procedure to publish and optionally share a dashboard. You can also use this
procedure to rename a published dashboard. A renamed dashboard retains its security and emailed
report settings.
1. Open the analysis that you want to use. Choose Share on the application bar, and then choose
Publish dashboard.
2. Do one of the following:
• To create a new dashboard, choose Publish new dashboard as, and then type a dashboard name.
• To replace an existing dashboard, do one of the following. Replacing a dashboard updates it
without altering security or emailed report settings.
• To update it with your changes, choose Replace an existing dashboard and then choose a
dashboard from the list.
• To rename it, choose Replace an existing dashboard, choose a dashboard from the list, and
then choose Rename. Enter a new name to rename the existing dashboard. When you rename a
dashboard, it also saves any changes you made to the analysis.
3. (Optional) Open the Advanced publish options.
Note
This is a scrollable window. Scroll down in the Publish a dashboard window to view all
available options.
There are some options that you can turn off to simplify the experience for this dashboard, as
follows:
If you renamed the existing dashboard, the top of the screen refreshes to show the new name.
5. (Optional) Do one of the following:
738
Amazon QuickSight User Guide
Copying a dashboard
• To publish a dashboard without sharing, choose x at the upper right of the Share dashboard with
users screen when it appears. You can always share the dashboard later by choosing Share from
the application bar.
• To share the dashboard, follow the procedure in Sharing Amazon QuickSight
dashboards (p. 740).
After you complete these steps, you complete creating and sharing the dashboard. Subscribers of
the dashboard receive email that contains a link to the dashboard. Groups don't receive invitation
emails.
After you save the original dashboard as a new analysis, you can collaborate on it by sharing the new
analysis with other users. For example, you can use this workflow to preserve a production version of the
dashboard, while also developing or testing a new version of it.
To copy a dashboard
To share the analysis with other users, choose Share from the top right corner of the page, and then
choose Share analysis.
6. (Optional) Create a new dashboard with your changes to the new analysis by choosing Share, and
then choosing Publish Dashboard.
739
Amazon QuickSight User Guide
Sharing dashboards
To delete a dashboard
1. On the Dashboards tab of the Amazon QuickSight start page, choose the details icon (vertical dots
⋮) on the dashboard that you want to delete.
2. Choose Delete. Then choose Delete again to confirm that you want to delete the dashboard.
Deleting a dashboard permanently deletes the dashboard from your account, and the dashboard will
disappear from all folders that it belonged to. You can still access and create other dashboards from
the analysis that the deleted dashboard was published from.
After you share a dashboard, you can review the other users or groups that have access to it and control
the type of access they have. You can revoke access to the dashboard for any user. You can also remove
yourself from it.
You can also embed interactive dashboards and visuals in websites and apps by copying the dashboard
or visual embed code and pasting it in your application. For more information, see Embedding visuals
and dashboards for registered users with a 1-click embed code (p. 784).
740
Amazon QuickSight User Guide
Sharing a link to the dashboard
share and embed visuals to your website or application, adjust the sharing settings of the dashboard that
it belongs to. For more informaton, see the following:
• Granting individual Amazon QuickSight users and groups access to a dashboard in Amazon
QuickSight (p. 742)
• Granting everyone in your Amazon QuickSight account access to a dashboard (p. 745)
• Granting anyone on the internet access to an Amazon QuickSight dashboard (p. 746)
• Granting everyone in your Amazon QuickSight account access to a dashboard with the QuickSight
API (p. 751)
• .Granting anyone on the internet access to an Amazon QuickSight dashboard using the QuickSight
API (p. 752)
1. Open the published dashboard and choose Share at upper right. Then choose Share dashboard.
2. In the Share dashboard page that opens, choose Copy link at upper left.
The link to the dashboard is copied to your clipboard. It's similar to the following,
https://quicksight.aws.amazon.com/sn/accounts/accountid/
dashboards/dashboardid?directory_alias=account_directory_alias
Users and groups (or all users on your QuickSight account) who have access to this dashboard can
access it by using the link. If they are accessing QuickSight for the first time, they will be asked to
sign in with their email address or user name and password for the account. After they sign in, they
will have access to the dashboard.
1. Open the published dashboard and choose Share at upper right. Then choose Share dashboard.
2. In the Share dashboard page that opens, under Manage permissions, review the users and groups,
and their roles and settings.
You can search to locate a specific user or group by entering their name or any part of their name in
the search box at upper right. Searching is case-sensitive, and wildcards aren't supported. Delete the
search term to return the view to all users.
741
Amazon QuickSight User Guide
Revoking access
1. Open the dashboard and choose Share at top right. Then choose Share dashboard.
2. In the Share dashboard page that opens, under Manage permissions, locate the user that you want
to remove and choose the delete icon at far right.
1. Open the published dashboard and choose Share at upper right. Then choose Share dashboard.
a. For Invite users and groups to dashboard at left, enter a user email or group name in the
search box.
Any users or groups that match your query appear in a list below the search box. Only active
users and groups appear in the list.
b. For the user or group that you want to grant access to the dashboard, choose Add. Then choose
the level of permissions that you want them to have.
742
Amazon QuickSight User Guide
With individual users and groups
You can select Viewer or Co-owner, depending on the user's QuickSight role. The available
permissions for each role are as follows:
• Readers – QuickSight readers can only be granted Viewer access to dashboards. They can
view, export, and print the dashboard, but they can't save the dashboard as an analysis. They
can view, filter, and sort the dashboard data. They can also use any controls or custom actions
that are on the dashboard. Any changes that they make to the dashboard exist only while
they are viewing it, and aren't saved after they close the dashboard.
• Authors – QuickSight authors can be granted Viewer or Co-owner access to dashboards.
• Authors with Viewer access can view, export, and print the dashboard. They can view, filter,
and sort the dashboard data. They can also use any controls or custom actions that are
on the dashboard. Any changes that they make to the dashboard exist only while they are
viewing it, and aren't saved after they close the dashboard.
However, they can save the dashboard as an analysis, unless the dashboard owner specifies
otherwise. This privilege grants them read-only access to the datasets so that they can
create new analyses from them. The owner has the option to provide them with the same
permissions to the analysis. If the owner wants them also to edit and share the datasets,
the owner can set that up inside the analysis.
• Authors with Co-owner access can view, export, and print the dashboard. They can also edit,
share, and delete it. They can also save the dashboard as an analysis, unless the dashboard
owner specifies otherwise. This privilege grants them read-only access to the datasets so
that they can create new analyses from them. The owner has the option to provide them
with the same permissions to the analysis. If the owner wants them to also edit and share
the datasets, the owner can set that up inside the analysis.
• Groups – QuickSight groups can only be granted Viewer access to dashboards. They can view,
export, and print the dashboard, but they can't save the dashboard as an analysis.
743
Amazon QuickSight User Guide
With individual users and groups
After you add a user or group to the dashboard, you can see information about them in the
Manage permissions section, under Users & Groups. You can see their user name, email,
permission level, and "save as" privileges.
To allow a user or group to save the dashboard as an analysis, turn on Allow "save as" in the
Save as Analysis column.
To change the permission level for a user, choose the permission level menu in the Permissions
column and select a permission.
c. To add more users to the dashboard, enter another user email or group name in the search box
and repeat steps A and B.
744
Amazon QuickSight User Guide
With everyone in your account
Sharing the dashboard with everyone in your account doesn't affect email reports. For example, suppose
that you choose to share the dashboard with everyone in your account. Suppose also that you choose
Send email report to all users with access to dashboard when setting up an email report for the same
dashboard. In this case, the email report is sent only to people who have access to the dashboard. They
receive access either through someone explicitly sharing it with them, through groups, or through shared
folders.
1. Open the published dashboard and choose Share at upper right. Then choose Share dashboard.
2. In the Share dashboard page that opens, for Enable access for at bottom left, toggle
on Everyone in this account. Accounts that sign in with an Active Directory can't access
the Everyone in this account switch. Accounts that use Active Directory can enable this
setting with an UpdateDashboardPermissions API call. For more information on
UpdateDashboardPermissions, see UpdateDashboardPermissions in the Amazon QuickSight API
Reference.
745
Amazon QuickSight User Guide
With anyone on the internet
When you share a dashboard with everyone in the account, owners can also choose to make the
dashboard discoverable in QuickSight. A dashboard that's discoverable appears in everyone's list of
dashboards on the Dashboards page. When this option is turned on, everyone in the account can
see and search for the dashboard. When this option is turned off, they can only access the dashboard
if they have a link or if it's embedded. The dashboard doesn't appear on the Dashboards page, and
users can't search for it.
You can also share your Amazon QuickSight dashboard with anyone on the internet from the Share
menu in the QuickSight console. When you do this, anyone on the internet will be able to access
the dashboard, even if they aren't a registered user on your QuickSight account, when you share the
dashboard link or embed the dashboard.
Use the following procedure to grant anyone on the internet access to dashboard when you share it.
746
Amazon QuickSight User Guide
With anyone on the internet
1. Turn on session capacity pricing on your account. If you have not turned on session capacity pricing
on your account, you won't be able to update your account's public sharing settings. For more
information about session capacity pricing, see http://aws.amazon.com/quicksight/pricing/.
2. Assign public sharing permissions to an administrative user in the IAM console. You can add these
permissions with a new policy or you can add the new permissions to an existing user.
The following sample policy provides permissions for use with UpdatePublicSharingSettings.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "quicksight:UpdatePublicSharingSettings",
"Resource": "*",
"Effect": "Allow"
}
]
}
Accounts that don't want users with administrator access to use this feature can add an IAM policy
that denies public sharing permissions. The following sample policy denies permissions for use with
UpdatePublicSharingSettings.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "quicksight:UpdatePublicSharingSettings",
"Resource": "*",
"Effect": "Deny"
}
]
}
For more information on using IAM with QuickSight, see Using Amazon QuickSight with
IAM (p. 977).
You can also use the "Deny" policy as a Service Control Policy (SCP) if you don't want any of the
accounts in your organization to have the public sharing feature. For more information, see Service
control policies (SCPs) in the AWS Organizations User Guide.
3. Turn on public sharing on your QuickSight account.
1. From the Amazon QuickSight start page, choose your user icon at the upper right of your browser
window, and then choose Manage QuickSight.
2. In the page that opens, choose Security and permissions at left.
3. Scroll down and, in the Public access to dashboards section, choose Manage.
747
Amazon QuickSight User Guide
With anyone on the internet
When you turn on this setting, a pop up will appear asking you to confirm your choice. Once
you've confirmed your choice, you can grant the public access to specific dashboards and share
those dashboards with them with a link or by embedding the dashboard in a public application,
wiki, or portal.
1. In QuickSight, open the published dashboard that you want to share. You must be the owner or a co-
owner of the dashboard.
2. In the published dashboard, choose the Share icon at upper-right, and then choose Share
dashboard.
3. In the Share dashboard page that opens, choose Anyone on the internet (public) in the Enable
access for section at bottom-left.
This setting allows you to share the dashboard with anyone on the internet with the share link or
when embedded. Turning on this switch also automatically turns on the Everyone in this account
option, which means that the dashboard will be shared with anyone in your QuickSight account. If
you do not want this, turn off this option.
4. In the Allow public access pop-up that appears, enter confirm in the box to confirm your choice,
and then choose Confirm.
After you confirm your dashboard's access settings, an orange PUBLIC tag appears at upper right of your
dashboard in the Amazon QuickSight console. Additionally, an eye icon appears on the dashboard on the
QuickSight Dashboards page, both in tile and list view.
Note that when public access is turned on, the dashboard can only be accessed using the link or when
embedded using the embed code. For more information about sharing a link to the dashboard, see
Sharing a link to the dashboard (p. 741). For more information about embedding dashboards for
748
Amazon QuickSight User Guide
With anyone on the internet
anyone on the internet, see Turning on public access to visuals and dashboards with a 1-click embed
code (p. 788).
1. From the Amazon QuickSight start page, choose the analysis that is tied to the dashboard that
you want to update and make your desired changes. You must be the owner or a co-owner of the
analysis.
2. In the analysis, choose the Share icon at upper-right, and then choose Publish dashboard.
3. In the pop-up that appears, choose Replace an existing dashboard and select the public dashboard
that you want to update.
4. To confirm your choice, enter confirm and then choose Publish dashboard.
Once you choose Publish dashboard, your public dashboard is updated to reflect the new changes.
The following table describes the different scenarios for when a dashboard is publicly available.
Off Off Off None
On Off Off None
749
Amazon QuickSight User Guide
With anyone on the internet
1. In QuickSight, open the published dashboard that you no longer want to share. You must be the
owner or a co-owner of the dashboard.
2. In the published dashboard, choose the Share icon at upper-right, and then choose Share
dashboard.
3. In the Share dashboard page that opens, toggle off the Anyone on the internet (public) switch in
the Enable access for section at bottom-left.
This action will remove public access to the dashboard. It will now only be accessible to users that it
has been shared with.
1. From the Amazon QuickSight start page, choose your user icon at upper right of your browser
window, and then choose Manage QuickSight.
2. In the page that opens, choose Security and permissions at left.
3. Scroll down and, in the Public access to dashboards section, choose Manage.
4. On the page that opens, toggle off the Anyone on the internet switch.
When you disable public sharing settings from the Public sharing menu, a pop-up will appear asking
you to confirm your choice. Select I have read and acknowledge this change and then choose
Confirm to confirm your choice.
This action will remove public access to every dashboard on your account. Dashboards that were
visible to anyone on the internet will now only be accessible to users that each dashboard has been
shared with. Individual dashboards that have their public settings turned on will have a gray badge
750
Amazon QuickSight User Guide
With everyone in your account with the API
and the eye icon that appears on the Dashboards page will have a strike through it to indicate that
the account level public settings are disabled and that the dashboard can't be viewed. It can take up
to two minutes for a dashboard's public access to be revoked.
If your session capacity pricing subscription has expired, public sharing settings will be automatically
removed across your account. Renew your subscription to restore access to public sharing settings.
Alternatively, you can grant everyone in your account access to the dashboard with the QuickSight API
using the UpdateDashboardPermissions operation.
The following example API request illustrates how to do so using an AWS CLI command. It
grants link permissions on the dashboard in your account, and allows the following operations:
DescribeDashboard, QueryDashboard and ListDashboard.
The response for the preceding request looks similar to the following.
{
"Status": 200,
"DashboardArn": "arn:aws:quicksight:AWSDIRECTORYREGION:ACCOUNTID:dashboard/
DASHBOARDID",
"DashboardId": "DASHBOARDID",
"LinkSharingConfiguration": {
"Permissions": [
{
"Actions": [
"quicksight:DescribeDashboard",
"quicksight:ListDashboardVersions",
"quicksight:QueryDashboard"
],
"Principal": "arn:aws:quicksight:AWSDIRECTORYREGION:ACCOUNTID:namespace/default"
}
]
},
"Permissions": [
// other dashboard permissions here
],
"RequestId": "REQUESTID"
}
You can also prevent all users in your account from accessing the dashboard using the same API
operation. The following example request illustrates how by using a CLI command.
751
Amazon QuickSight User Guide
With anyone on the internet using the API
For more information, see UpdateDashboardPermissions in the Amazon QuickSight API Reference.
When all users in an account are granted access to the dashboard, the following snippet is added to
AWS CloudTrail log as part of the eventName UpdateDashboardAccess, and the eventCategory
Management.
"linkPermissionPolicies":
[
{
"principal": "arn:aws:quicksight:AWSDIRECTORYREGION:ACCOUNTID:
namespace/default",
"actions":
[
"quicksight:DescribeDashboard",
"quicksight:ListDashboardVersions",
"quicksight:QueryDashboard"
]
}
]
Before you begin, make sure to grant everyone in your account access to the dashboard. For more
information, see Granting everyone in your Amazon QuickSight account access to a dashboard with the
QuickSight API (p. 751).
The following example API request illustrates how to grant anyone on the internet access to a dashboard
using an AWS CLI command. It grants link permissions on the dashboard in your account, and allows the
following operations: DescribeDashboard, QueryDashboard and ListDashboardVersions.
The response for the preceding request looks similar to the following.
{
"Status": 200,
752
Amazon QuickSight User Guide
With anyone on the internet using the API
"DashboardArn": "arn:aws:quicksight:AWSDIRECTORYREGION:ACCOUNTID:dashboard/
DASHBOARDID",
"DashboardId": "DASHBOARDID",
"LinkSharingConfiguration": {
"Permissions": [
{
"Actions": [
"quicksight:DescribeDashboard",
"quicksight:ListDashboardVersions",
"quicksight:QueryDashboard"
],
"Principal": "arn:aws:quicksight:AWSDIRECTORYREGION:ACCOUNTID:namespace/
default"
},
"Principal": "arn:aws:quicksight:::publicAnonymousUser/*",
"Actions": [
"quicksight:DescribeDashboard",
"quicksight:ListDashboardVersions",
"quicksight:QueryDashboard"
]
}
]
},
"Permissions": [
// other dashboard permissions here
],
"RequestId": "REQUESTID"
}
You can also prevent anyone on the internet from accessing the dashboard using the same API operation.
The following example request illustrates how by using a CLI command.
For more information, see UpdateDashboardPermissions in the Amazon QuickSight API Reference.
When anyone on the internet is granted access to the dashboard, the following snippet is added to
AWS CloudTrail log as part of the eventName UpdateDashboardAccess, and the eventCategory
Management.
"linkPermissionPolicies":
[
{
"principal": "arn:aws:quicksight:::publicAnonymousUser/*",
"actions":
[
"quicksight:DescribeDashboard",
"quicksight:ListDashboardVersions",
"quicksight:QueryDashboard"
]
}
]
753
Amazon QuickSight User Guide
Share your view of a dashboard
When others access your view of the dashboard by using the link that you sent them, they see the
dashboard exactly as it was when the link was created. They see any parameters, filters, or controls that
you changed.
The link to your view of the dashboard is available to anyone who you send it to for up to three months.
1. Open the published dashboard, and make any changes that you want.
2. Choose Share at upper right, and then choose Share this view.
3. On the Share using a link page that opens, choose Copy link.
4. Paste the link in an email or IM message to share it with others.
Only people with permissions to see the dashboard in QuickSight can access the link.
Amazon QuickSight generates a custom email snapshot for each user or group based on their data
permissions, which are defined in the dashboard. RLS for email reports works for both scheduled and ad
hoc (one-time) emails.
Subscribers who are readers see an option for Reports on the dashboard when an email report is
available for that dashboard. They can use the Reports option to subscribe to or unsubscribe from the
emails. They can also change their preferred report layout. For more information, see Subscribing to
email reports in Amazon QuickSight (p. 757).
For readers (users in the reader role), it costs one session per report, up to the monthly maximum. After
receiving an email report, the reader gets a session credit to access the interactive dashboard at no
additional cost during the same month. Reader session credits don't carry over to the next billing month.
754
Amazon QuickSight User Guide
Configuring email reports
For a reader, charges for email reports and interactive sessions both accrue up to the monthly maximum
charge. For readers who hit the monthly max charge, there are no further charges, and they can receive
as many additional email reports as they need.
In Amazon QuickSight Enterprise edition, you can email a report from each dashboard. Reports include
settings for when to send them, the contents to include, and who receives the email. You can view a
sample report and a list of the datasets used in the report. To set up or change the report sent from a
dashboard, make sure that you're an owner or co-owner of the dashboard.
If you have access to the dashboard, you can change your subscription options by opening your view of
the dashboard. For more information on how this works, see Subscribing to email reports in Amazon
QuickSight (p. 757).
Scheduling options that are available for an email report include the following:
• Send once (Does not repeat) – Sends the report only once at the date and time that you choose.
• Repeat once a day – Reports daily at the same time.
• Repeat once a week – Reports each week on the same day at the same time.
• Repeat once a month – Repeats each month on the same day of the month at the same time.
If you choose to repeat the report, the schedule recurs at the same time and day based on the interval
that you choose. For example, suppose that you choose to send your first report August 1 at 9 AM, and
you choose that the report repeat once a month. In this case, the second report is sent September 1 at 9
AM. If you choose once a week, the day of the week August 1 falls on is the day that the report repeats,
at the same time the first one sends.
You can customize the title of the report, the optional email subject, and the body text. You can also
optimize the report layout, so you can set the initial display width to one of the following:
• Viewing on a desktop – (Default wide layout) One or more columns, as originally designed.
• Viewing on a mobile device – (Narrow layout) One column only, with visuals aligned at left.
Although it's easy to configure the report so that everyone who has access receives a copy, this is not
usually the best plan. We recommend to limit automated emails, especially those sent to groups. You can
do this by starting with a small number of subscribers by choosing specific people from the access list.
Verify your company's policy before subscribing anyone to a subscription.
• Choose recipients from the provided access list to specify and maintain a list of people who you
want to email reports to. You can use the search box to find people by email or group name.
(Recommended)
• To send reports to all of this dashboard's subscribers, choose Send email report to all users with
access to dashboard when prompted.
Anyone else who wants to get the emails can open the dashboard and set their own subscription options
to either opt in or opt out.
755
Amazon QuickSight User Guide
Configuring email reports
Important
When you share the dashboard with new QuickSight user names or groups, they automatically
start receiving the email reports. If you don't want this to happen, you need to edit the report
settings each time you add people to the dashboard.
For existing email reports, you can pause your schedule in Amazon QuickSight while you make changes.
If you edit an existing report, the Pause this report button appears. Using this option, you can pause
the current schedule without deleting it. If the report has already been paused, the Resume this report
button appears instead, so you can continue with the existing schedule. The schedule is paused or
resumed after you save your changes by choosing to update the report (at the bottom of the email
report configuration screen).
If you include images, be aware that you can't view images from a private network in an email report,
even if you can access the images. If you want to include an image in an insight, use a publicly available
one.
Before you begin, make sure that you are using Amazon QuickSight Enterprise edition and that you have
shared the dashboard with intended recipients.
1. Open Amazon QuickSight and choose Dashboard on the navigation pane at left.
2. Open a dashboard to configure its email report.
3. At top right, choose Share, Email report.
4. For Schedule, choose the frequency for the report. If you're not sure, choose Send once (Does not
repeat).
5. For Send first report on, choose a date and time.
6. For Time zone, choose the time zone.
7. For Report title, enter a custom title for the report.
8. (Optional) For (Optional) E-mail subject line, leave it blank to use the report title or enter a custom
subject.
9. (Optional) For (Optional) E-mail body text, leave it blank or enter a custom message to display at
the beginning of the email.
10. (Optional) For Select sheet for report, choose the sheet that you want to include in the report.
11. (Optional) For Include PDF attachment, choose this option to attach a PDF snapshot of the items
visible on the selected sheet of the dashboard.
12. (Optional) For Hide report from email body, turn on this option to remove the report from the
email body.
13. (Optional) For Optimize report for, choose a default layout option for new users.
14. Choose specific recipients from the list (recommended). Or choose Send email report to all users
with access to dashboard to send the email to all users with whom the dashboard has been shared
explicitly. If you choose this option, users who have access to the dashboard through a shared folder
don't automatically receive the email.
15. (Optional, recommended) To send a sample of the report before you save changes, choose Send test
report. This option displays beside the user name of the owner of the dashboard.
16. (Optional) To view a list of the data sets used by this report, choose View dataset list at the bottom
of the screen.
17. Do one of the following:
• (Recommended) Choose Save report or Update report. A "Report scheduled" message briefly
appears at upper right to confirm your entries.
• To immediately send a report, choose Update & send a report now. The report is sent
immediately, even if your schedule's start date is in the future.
• To delete the settings, choose Delete.
756
Amazon QuickSight User Guide
Subscribing to reports
Use the following procedure to change your subscription and report settings for a specific dashboard.
1. First, open a dashboard that is shared with you, or a dashboard that you own or co-own.
2. Choose the Reports icon at top right.
3. The Change report preferences screen appears. This screen shows the current report schedule, in
addition to the subscription and optimization options.
For Subscription, choose Subscribe to start receiving reports, or Unsubscribe to stop receiving
reports.
Under Optimize, choose the device you prefer to view the report on.
• If you usually use a mobile device or you prefer to view reports in a portrait format, choose
Viewing on a mobile device. When you receive the report, the visuals display in a single vertical
column.
• If you usually use a desktop or you prefer to view reports in a landscape format, choose Viewing
on a desktop. When you receive the report, the visuals display in the same layout shown in your
dashboard on your desktop.
4. Choose Update to confirm your choices, or choose Cancel to discard your changes.
757
Amazon QuickSight User Guide
Threshold alerts
To stay informed about important changes in your data, you can create threshold alerts using KPI and
Gauge visuals in an Amazon QuickSight dashboard. With these alerts, you can set thresholds for your
data and be notified by email when your data crosses them. You can also view and manage your alerts at
anytime in a QuickSight supported web browser.
For example, let's say that you're a customer success manager for a large organization and you want to
know when the number of tickets in a support queue exceeds a certain number. Let's say too that you
have a dashboard with a KPI or Gauge visual that tracks the number of tickets in this queue. In this case,
you can create an alert and be notified by email when the number exceeds the threshold you specified.
That way, you can take action as soon as you're notified.
You can create multiple alerts for a single visual. If the visual is updated or deleted by the author after
you create an alert, your alert settings don't change. When you create an alert, the alert takes on any
filters applied to the visual at that time. If you or the author changes the filter, your existing alert doesn't
change. However, if you create a new alert, your new alert takes on the new filter settings.
For example, let's say you have a dashboard with a filter control that you can use to switch the data for
each visual in the dashboard from one US city to another. You have a KPI visual on the dashboard that
shows average flight delays, and you're interested in delays for flights leaving from Seattle, Washington,
in the US. You change the filter control to Seattle and set an alert on the visual. This alert tracks flight
delays from Seattle. Tomorrow, let's say that you want to also track flight delays from Portland, Oregon,
so you change the filter control to Portland and create another alert. This new alert tracks flight delays
from Portland. You now have two alerts, one on Seattle and one on Portland, working independently.
Note
You can’t create alerts for visuals in an embedded dashboard or from the QuickSight mobile
app. Also, KPI visuals that don’t use a date-time field as a trend don't support alerts. An example
is a KPI that shows the difference in flights between carriers X and Y instead of a KPI that shows
the difference in flights between dates A and B.
Creating Alerts
Use the following procedure to create threshold alerts for KPI or Gauge visuals in a dashboard.
To create an alert
For more information about viewing dashboards as a dashboard subscriber in QuickSight, see
Interacting with Amazon QuickSight dashboards (p. 5).
2. In the dashboard, select the KPI or Gauge visual that you want to create an alert for.
3. On the menu at upper-right on the visual, choose the Create alert icon.
758
Amazon QuickSight User Guide
Creating Alerts
Alternatively, you can choose the alert icon in the blue toolbar at upper right. Then, in the Create
alert page that opens, select the KPI or Gauge visual that you want to create an alert for, and then
choose Next.
By default, the visual name is used for the alert name. You can change it if you want.
b. For Value to track, choose a value that you want to set the threshold for.
The values that are available for this option are based on the values the dashboard author
sets in the visual. For example, let's say you have a KPI visual that shows a percent difference
between two dates. Given that, you see two alert value options: percent difference and actual.
If there is only one value in the visual, you can't change this option. It is the current value
and it is displayed here so that you can use it as a reference while you choose a threshold. For
example, if you're setting an alert on average cost, this value will show you what the current
average cost is (say, $5). With this reference value you can make more informed decisions while
setting your threshold.
c. For Condition, choose a condition for the threshold.
• Is above – Sets a rule that the alert triggers if the alert value goes above the threshold you
set.
• Is below – Sets a rule that the alert triggers if the alert value goes below the threshold that
you set.
• Is equal to – Sets a rule that the alert triggers if the alert value is equal to the threshold you
set.
759
Amazon QuickSight User Guide
Managing Threshold Alerts
• As frequently as possible - This option alerts you whenever the threshold is breached. If you
choose this option, you might get alerts multiple times a day.
• Daily at most - This option alerts you once per day when the threshold is breached.
• Weekly at most - This option alerts you once per week when the threshold is breached.
f. (Optional) Choose Email me when there is no data - When you select this option, you're
notified when there's no data to check your alert rule against.
g. Choose Save.
A message at upper-right appears indicating that the alert has been saved. If your data crosses
the threshold you set, you get a notification by email at the address that's associated with your
QuickSight account.
1. Open QuickSight, choose Dashboards, and then navigate to the dashboard that you want to edit an
alert for.
2. On the Dashboards page, choose Alerts at upper-right.
760
Amazon QuickSight User Guide
Managing Threshold Alerts
3. On the Manage alerts page that opens, find the alert that you want to edit, and then choose Edit
beneath the alert name.
1. Open QuickSight, choose Dashboards, and then navigate to the dashboard that you want to view
alert history for.
2. On the Dashboards page, choose Alerts at upper-right.
3. On the Manage alerts page that opens, find the alert that you want to view the history for, and then
choose History beneath the alert name.
1. Open QuickSight, choose Dashboards, and navigate to the dashboard that you want to turn on or
turn off an alert for.
2. On the Dashboards page, choose Alerts at upper-right.
3. On the Manage alerts page that opens, find the alert that you want to turn on or off, and then
select or clear the toggle by the alert name.
The alert is turned on when the toggle is blue, and turned off when the toggle is gray.
761
Amazon QuickSight User Guide
Investigating Alert Failures
When a failure occurs, QuickSight sends you a notification and disables the alert if the reason for the
failure isn't likely to be fixed. For example, if the alert fails due to the loss of access to a dashboard, or if
the dashboard was deleted. Otherwise, QuickSight attempts to check your data for threshold breaches
again. After four failures, QuickSight turns off the alert and notifies you that the alert is turned off. If the
alert can be checked again, QuickSight sends you a notification.
To investigate why an alert failed, check that you still have access to the dashboard. Also check that
you have permissions to the correct dataset and to the correct rows and columns in the dataset. If you
have lost access or permissions, contact the dashboard owner. If you have the necessary access and
permissions, you might need to edit your alert to avoid future alert failures.
Alert Scheduling
When you create an alert, QuickSight checks your data for any breaches against the thresholds you set
based on when your dataset is scheduled to refresh. For SPICE datasets, alert rules are checked after a
successful refresh of your SPICE dataset. For direct query datasets, alert rules are checked at a random
time between 6:00 PM and 8:00 AM in the AWS Region that holds the dataset by default.
If you're a dataset owner, you can set an alert evaluation schedule in the dataset settings. See the
following procedure to learn how.
Alert Permissions
If you're an administrator, you can control who in your organization can set threshold alerts in
QuickSight by creating a custom permissions policy. To set custom permissions in QuickSight, choose
your user name at the upper-right corner of any QuickSight page, choose Manage QuickSight, and then
choose Manage permissions.
762
Amazon QuickSight User Guide
Exporting as PDFs
• To proceed to printing, choose Print to open your operating system's print dialog.
• To make changes to the paper size or orientation, choose Configure.
6. To exit the preview screen, choose Exit preview.
1. Open Amazon QuickSight and choose Dashboards on the navigation pane at left.
2. Open the dashboard that you want to export.
3. At upper right, choose Export, Download as PDF. The download is prepared in the background.
When the file is ready to download, a message appears saying Your PDF is ready..
4. Choose Download now to download the file. Choose Close to close without downloading.
If you close this dialog box without downloading the file and want to recreate the file, repeat the
previous step. Also, the downloadable file is available only temporarily for five minutes. If you
wait too long to download it, the file expires. If this happens, QuickSight instead displays an error
message saying that the request has expired.
5. Repeat the previous steps for each sheet that you want to export.
You can also attach PDFs to dashboard email reports. For more information, see Sending reports by
email (p. 754).
In Amazon QuickSight Enterprise edition, your team members can create personal and shared folders
to add hierarchical structure to QuickSight asset management. Using folders, people can more easily
organize, navigate through, and discover dashboards, analyses, and datasets. Within a folder, you can still
use your usual tools to search for assets or to add assets to your favorites list.
763
Amazon QuickSight User Guide
Overview of QuickSight folders
Personal folders are visible only to the person who owns them. You can't transfer ownership of
personal folders to anyone else.
• Shared folders to organize work and simplify sharing among multiple people.
Shared folders are visible to people who have access to them. To manage shared folders, you need
to be a QuickSight administrator. You can transfer ownership of shared folders if you are already an
owner.
Topics
• Overview of QuickSight folders (p. 764)
• Security for shared folders (p. 764)
• Limitations (p. 765)
shared folders for easy access by selecting the favorite ( ) icon next to it.
• Create subfolders.
• Add assets to your folder, including datasets, analyses, and dashboards. To add assets to a personal
folder, you need to already have access to the assets. Multiple assets can have the same name.
• Share these folders with other users in the same AWS account.
• People who have QuickSight admin privileges can do the following:
• Create or delete a shared folder and subfolders inside of it. You can move either of these around
within the top-level folder.
• Add or remove owners and viewers. When you make a person an owner of the folder, you give them
ownership of every asset in the folder.
• To create a shared folder and to share the folder with one or more groups, you must be an Amazon
QuickSight administrator.
• Shared folders have two access levels, owners and viewers:
• The folder owner owns everything (folders, analyses, dashboards, datasets) inside of the folder.
• The folder viewer can only use the assets (folders, dashboards, datasets) in the folder. A viewer can't
edit or share those assets.
• QuickSight readers' sharing status for a folder gets shared with the folder. However, a reader gets only
read access to folders, and only dashboard access to visuals.
764
Amazon QuickSight User Guide
Limitations
• AWS security is enforced on every object within a folder. The folder applies the same type of security
to the assets of whoever the folder is shared with according to their access level (admin, author, or
reader).
• The top-level folder is the root folder of any subfolders. When a subfolder is shared at any level, the
person whom the folder was shared with sees the root folder in the top-level folders view.
• The folder permission is the permission on the current folder, combined with permissions of all the
folders leading to the root folder.
• Items in the shared folder can be shared or private:
• A shared asset inherits its permission from the folder. A shared asset is created when an asset that
belongs to the folder owner is added to a shared folder.
• A private asset opts out of the permission inheritance. A private asset is created when an asset is
added to a shared folder, and this asset can be viewed by but doesn't belong to the folder owner.
Limitations
The following limitations apply to folders:
• The name of a shared folder (at the top level of the tree) must be unique in your AWS account.
• In a single folder, multiple assets can't have the same name. For example, in your top-level folder, you
can't create two subfolders with the same name. In the same folder, you can't add two assets with the
same name, even if they have different asset IDs. The path to each asset behaves like an Amazon S3
key name. It must be unique in your AWS account.
For Amazon QuickSight quotas, the Service Quotas console provides the most accurate and up-to-date
information.
• View the default Amazon QuickSight quotas for each AWS Region
• Request quota increases for adjustable quotas
765
Amazon QuickSight User Guide
Accessing metrics in CloudWatch
For more information about using Amazon CloudWatch, see the Amazon CloudWatch User Guide.
Following, you can find information on how to access CloudWatch and a list of all current supported
metrics.
1. Sign in to the AWS account that's associated with your QuickSight account.
2. In the upper-left corner of the AWS Management Console home page, choose Services, and then
choose CloudWatch.
3. In the navigation pane, choose Metrics, All metrics, QuickSight.
Metrics
The AWS/QuickSight namespace includes the following metrics for monitoring traffic and latency of
your Amazon QuickSight dashboards and ingestions.
Per-dashboard metrics
The following metrics track dashboard view counts and load times. You can find these metrics under the
AWS/QuickSight/Dashboard Metrics group for CloudWatch.
766
Amazon QuickSight User Guide
Per-dataset ingestion metrics
767
Amazon QuickSight User Guide
Per-visual metrics
Per-visual metrics
The following metrics track the load times and error counts of individual visuals on a QuickSight
dashboard. You can find these metrics under the AWS/QuickSight/Visual Metrics group for
CloudWatch.
768
Amazon QuickSight User Guide
Aggregate metrics
Aggregate metrics
The AWS/QuickSight namespace includes the following aggregate metrics for monitoring traffic and
latency of your Amazon QuickSight dashboards and ingestions.
769
Amazon QuickSight User Guide
Aggregate ingestion metrics
770
Amazon QuickSight User Guide
Aggregate visual metrics
Dimensions
Following is a list of Amazon QuickSight metric dimensions that appear in Amazon CloudWatch.
Dimension Description
771
Amazon QuickSight User Guide
Graphing metrics by using the CloudWatch console
Dimension Description
You can use the ListDataSets
API operation to see a list of
every dataset in your Amazon
QuickSight account. For more
information, see ListDataSets
in the Amazon QuickSight API
Reference.
772
Amazon QuickSight User Guide
Required knowledge
To monitor the calls made to the Amazon QuickSight API for your account, including calls made by
the AWS Management Console, command line tools, and other services, use AWS CloudTrail. For more
information, see the AWS CloudTrail User Guide.
Required knowledge
If you plan to access Amazon QuickSight through an API, you should be familiar with the following:
• JSON
• Web services
• HTTP requests
• One or more programming languages, such as JavaScript, Java, Python, or C#.
We recommend visiting the AWS Getting Started Resource Center for a tour of what AWS SDKs and
toolkits have to offer.
Although you can use a terminal and your favorite text editor, you might benefit from the more visual UI
experience you get in an integrated development environment (IDE). We provide a list of IDEs in the AWS
Getting Started Resource Center in the IDE and IDE Toolkits section. This site provides AWS toolkits that
you can download for your preferred IDE. Some IDEs also offer tutorials to help you learn more about
programming languages.
For more information about downloading the AWS SDKs, see AWS SDKs and Tools. The following links
are a sample of the language-specific API documentation available.
• Amazon.Quicksight
773
Amazon QuickSight User Guide
Terminology and concepts
• Amazon.Quicksight.Model
• quicksight
• com.amazonaws.services.quicksight
• com.amazonaws.services.quicksight.model
• AWS.QuickSight
• QuickSightClient
• QuickSight
• Aws::QuickSight
Anonymous QuickSight User: – A temporary Amazon QuickSight user identity that virtually belongs to
a namespace, and is usable only with embedding. You can use tag-based rules to implement row-level
security for such users.
Caller identity: – The identity of the AWS Identity and Access Management (IAM) user making an API
request. The identity of the caller is determined by Amazon QuickSight using the signature attached to
the request. Through the use of our provided SDK clients, no manual steps are necessary to generate the
signature or attach it to the requests. However, you can do it manually if you want to.
Invoker identity: – In addition to the caller identity, but not as a replacement for it, you can assume
a caller’s identity through the IAM AssumeRole API when making calls to Amazon QuickSight. AWS
approves callers through their invoker’s identity. This is done to avoid having to explicitly add multiple
accounts belonging to the same Amazon QuickSight subscription.
Namespace: – a logical container that allows you to isolate user pools so that you can organize clients,
subsidiaries, teams, and so on. For more information, see Supporting multitenancy with isolated
namespaces (p. 928)
774
Amazon QuickSight User Guide
QuickSight dev portal
QuickSight ARN: – Amazon Resource Name (ARN). Amazon QuickSight resources are identified using
their name or ARN. For example, these are the ARNs for a group named MyGroup1, a user named User1,
and a dashboard with the ID 1a1ac2b2-3fc3-4b44-5e5d-c6db6778df89:
arn:aws:quicksight:us-east-1:111122223333:group/default/MyGroup1
arn:aws:quicksight:us-east-1:111122223333:user/default/User1
arn:aws:quicksight:us-west-2:111122223333:dashboard/1a1ac2b2-3fc3-4b44-5e5d-c6db6778df89
The following examples show ARNs for a template named MyTemplate and a dashboard named
MyDashboard.
arn:aws:quicksight:us-east-1:111122223333:template/MyTemplate
arn:aws:quicksight:us-east-1:111122223333:template/MyTemplate/version/10
arn:aws:quicksight:us-east-1:111122223333:template/MyTemplate/alias/STAGING
arn:aws:quicksight:us-east-1:111122223333:dashboard/MyDashboard
arn:aws:quicksight:us-east-1:111122223333:dashboard/MyDashboard/version/10
Depending on the scenario, you might need to provide an entity’s name, ID, or ARN. You can retrieve the
ARN if you have the name, using some of the QuickSight API operations.
QuickSight dashboard: – An entity which identifies QuickSight reports, created from analyses or
templates. QuickSight dashboards are sharable. With the right permissions, scheduled email reports can
be created from them. The CreateDashboard and DescribeDashboard API Operations act on the
dashboard entity.
QuickSight template: – An entity which encapsulates the metadata required to create an analysis or
a dashboard. It abstracts the dataset associated with the analysis by replacing it with placeholders.
Templates can be used to create dashboards by replacing dataset placeholders with datasets that follow
the same schema that was used to create the source analysis and template.
QuickSight user: – This is an Amazon QuickSight user identity acted upon by your API call. This user isn't
identical to the caller identity but might be the one that maps to the user within Amazon QuickSight.
775
Amazon QuickSight User Guide
QuickSight dev portal
The dev portal provides easy-to-use code samples to get you started. You can choose from the following
three different use cases:
1. Open QuickSight dev portal and choose Try it on the use case you want to view.
2. To view code examples, choose How to embed it in the menu bar. Then choose each of the
folloinwing from the navigation pane at left:
• Configure permissions
• Get embedding URL (code samples in Java, JavaScript, and Python)
• Embed URL in your application
3. To download all of the code in a zip file, choose Download all code.
4. To customize the dashboard, choose How to customize it. This screen is interactive, so you can
choose any item in the navigation pane to view the changes live.
5. You can also view and download the html code at bottom left.
6. To return to the start page, click on the QuickSight icon, top left.
776
Amazon QuickSight User Guide
Coding with the QuickSight API
For more information on the API operations, see Amazon QuickSight API Reference.
Before you can call the Amazon QuickSight API operations, you need the quicksight:operation-
name permission in a policy attached to your IAM identity. For example, to call list-users, you need
the permission quicksight:ListUsers. The same pattern applies to all operations.
If you're not sure what the necessary permission is, you can attempt to make a call. The client then tells
you what the missing permission is. You can use asterisk (*) in the Resource field of your permission
policy instead of specifying explicit resources. However, we recommended that you restrict each
permission as much as possible. You can restrict user access by specifying or excluding resources in the
policy, using their Amazon QuickSight Amazon Resource Name (ARN) identifier.
To retrieve the ARN of a user or a group, use the Describe operation on the relevant resource. You
can also add conditions in IAM to further restrict access to an API in some scenarios. For instance,
when adding User1 to Group1, the main resource is Group1, so you can allow or deny access
to certain groups, but you can also add a condition by using the IAM Amazon QuickSight key
quicksight:UserName to allow or prevent certain users from being added to that group.
Following is an example policy. It means that the caller with this policy attached, is able to invoke the
CreateGroupMembership operation on any group, provided that the user name they are adding to the
group is not user1.
{
"Effect": "Allow",
"Action": "quicksight:CreateGroupMembership",
"Resource": "arn:aws:quicksight:us-east-1:aws-account-id:group/default/*",
"Condition": {
"StringNotEquals": {
"quicksight:UserName": "user1"
}
}
}
AWS CLI
The following procedure explains how to interact with Amazon QuickSight API operations through
the AWS CLI. The following instructions have been tested in Bash but should be identical or similar in
other command-line environments.
1. Install AWS SDK in your environment. Instructions on how to do that are located here: AWS
Command line Interface.
2. Set up your AWS CLI identity and region using the following command and follow-up
instructions. Use the credentials for an IAM identity or role that has the proper permissions.
777
Amazon QuickSight User Guide
Coding with the QuickSight API
aws configure
3. Look at the Amazon QuickSight SDK help by issuing the following command:
4. To get detailed instructions on how to use an API, enter its name followed by help, like so:
5. Now you can call an Amazon QuickSight API operation. This example returns a list of Amazon
QuickSight users in your account.
Java SDK
Use the following procedure to set up a Java app that interacts with Amazon QuickSight.
import com.amazonaws.services.quicksight.AmazonQuickSight;
If you IDE doesn't recognize this as valid, verify that you imported the SDK.
4. Like other AWS SDKs, Amazon QuickSight SDK requires external dependencies to perform many
of its functions. You need to download and import those into the same project. The following
dependencies are required:
• aws-java-sdk-1.11.402.jar (AWS Java SDK and credentials setup) — See Set up the
AWS SDK for Java
• commons-logging-1.2.jar — See https://commons.apache.org/proper/commons-
logging/download_logging.cgi
• jackson-annotations-2.9.6.jar, jackson-core-2.9.6.jar, and jackson-
databind-2.9.6.jar — See http://repo1.maven.org/maven2/com/fasterxml/jackson/
core/
• httpclient-4.5.6.jar, httpcore-4.4.10.jar — See https://hc.apache.org/
downloads.cgi
• joda-time-2.1.jar — See https://mvnrepository.com/artifact/joda-time/joda-time/2.1
5. Now, you are ready to create an Amazon QuickSight client. You can use a default public
endpoint that the client can communicate with or you can reference the endpoint explicitly.
There are multiple ways to provide your AWS credentials. In the following example, we provide
a direct, simple approach. The following client method is used to make all the API calls that
follow:
778
Amazon QuickSight User Guide
Coding with the QuickSight API
@Override
public void refresh() {}
};
return AmazonQuickSightClientBuilder
.standard()
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(credsProvider)
.build();
}
6. Now, we can use the above client to list all the users in our Amazon QuickSight account.
Note
You have to provide the AWS account ID that you used to subscribe to Amazon
QuickSight. This must match the AWS account ID of the caller’s identity. Cross-account
calls aren't supported at this time. Furthermore, the required parameter namespace
should always be set to default.
getClient().listUsers(new ListUsersRequest()
.withAwsAccountId("relevant_AWS_account_ID")
.withNamespace("default"))
.getUserList().forEach(user -> {
System.out.println(user.getArn());
});
7. To see a list of all possible API operations and the request objects they use, you can CTRL-click
on the client object in your IDE in order to view the Amazon QuickSight interface. Alternatively,
find it within the com.amazonaws.services.quicksight package in the Amazon QuickSight
JavaClient JAR file.
Use the following procedure to interact with Amazon QuickSight using Node.js.
779
Amazon QuickSight User Guide
Coding with the QuickSight API
console.log(quicksight.config.apiConfig.operations);
quicksight.listUsers({
// Enter your actual AWS account ID
'AwsAccountId': 'relevant_AWS_account_ID',
'Namespace': 'default',
}, function(err, data) {
console.log('---');
console.log('Errors: ');
console.log(err);
console.log('---');
console.log('Response: ');
console.log(data);
});
Python3 SDK
Use the following procedure to create a custom built botocore package to interact with Amazon
QuickSight.
1. Create a credentials file in the AWS directory for your environment. In a Linux/Mac-based
environment, that file is called ~/.aws/credentials and looks like this:
[default]
aws_access_key_id = Your_IAM_access_key
aws_secret_access_key = Your_IAM_secret_key
2. Unzip the folder botocore-1.12.10. Change directory into botocore-1.12.10 and enter
the Python3 interpreter environment.
3. Responses come back as a dictionary object. They each have a ResponseMetadata entry that
contains request IDs and response status. Other entries are based on what type of operation you
run.
4. The following example is a sample app that first creates, deletes, and lists groups. Then, it lists
users in a Quicksight account:
import botocore.session
default_namespace = 'default'
account_id = 'relevant_AWS_Account'
session = botocore.session.get_session()
client = session.create_client("quicksight", region_name='us-east-1')
780
Amazon QuickSight User Guide
Coding with the QuickSight API
.NET/C# SDK
Use the following procedure to interact with Amazon QuickSight using C#.NET. This example is
constructed on Microsoft Visual for Mac; the instructions can vary slightly based on your IDE and
platform. However, they should be similar.
• AWSSDK.QuickSight
• AWSSDK.Extensions.NETCore.Setup
• AWSSDK.Extensions.CognitoAuthentication
7. Click Add Package.
8. Copy and paste the following sample app into your console app editor.
using System;
using Amazon.QuickSight.Model;
using Amazon.QuickSight;
namespace DotNetQuickSightSDKTest
{
class Program
{
private static readonly string AccessKey = "insert_your_access_key";
private static readonly string SecretAccessKey = "insert_your_secret_key";
private static readonly string AccountID = "AWS_account_ID";
private static readonly string Namespace = "default"; // leave this as
default
client.ListUsersAsync(listUsersRequest).Result.UserList.ForEach(
781
Amazon QuickSight User Guide
Embedded analytics
client.ListGroupsAsync(listGroupsRequest).Result.GroupList.ForEach(
group => Console.WriteLine(group.Arn)
);
}
}
}
With embedded analytics from Amazon QuickSight, your users can perform advanced analytics on
demand. By incorporating branded analytics directly into your web portals or applications, you provide
interactive analytical tools without changing the user's current context. Improving the user experience
by reducing cognitive complexity gives users a better opportunity for deeper understanding and
effectiveness.
You can embed the full QuickSight experience to make it possible to use QuickSight authoring tools as
part of your application,f rather than in the context of the AWS Management Console or a standalone
website. People who are using the QuickSight console or Q search bar through an embedded portal need
to be registered as QuickSight authors or admins in your AWS account. They need to be authenticated
into the same AWS account by any QuickSight-supported authentication methods. You can also embed
interactive dashboards or individual visuals, which provide the same functionality as published visuals or
dashboards. Viewers of embedded visuals and dashboards can include any of the following:
782
Amazon QuickSight User Guide
Embedding overview
• Unauthenticated visitors to a website or application – This option requires session packs with capacity
pricing. For more information, see Pricing on the Amazon QuickSight website.
• Programmatic access for display on large screens or monitors for consumption by multiple end users.
• Any type of QuickSight users who are authenticated in your AWS account by any method supported by
QuickSight.
Before you can embed content, make sure that you're using QuickSight Enterprise edition in the AWS
account where you plan to use embedding. If your app also resides in AWS, the app doesn't need to
reside on the same AWS account as the QuickSight subscription. However, the app needs to be able to
assume the AWS Identity and Access Management (IAM) role that you use for the API calls.
Topics
• Embedding overview (p. 783)
• Customizing embedded analytics (p. 784)
• 1-click embedding (p. 784)
• Embedding with the QuickSight APIs (p. 793)
Embedding overview
Applies to: Enterprise Edition
To embed analytics, you can run the Amazon QuickSight embedding API to generate the embed code.
Alternatively for dashboards, you can copy an embed code when you share the dashboard in QuickSight.
Each option is described below.
Using 1-click enterprise embedding is best for when you want to embed a QuickSight dashboard in an
internal application that users need to authenticate in to. When you copy the embed code, you get a
static embed code that doesn't change.
For more information, see Embedding visuals and dashboards for registered users with a 1-click embed
code (p. 784).
Embedding with the QuickSight API is best for when you want to embed the QuickSight experience in an
internal application that users must authenticate in to, or an external application that anyone can access.
When you use the embedding API operations to generate an embed code, you get a one-time code.
783
Amazon QuickSight User Guide
Customizing
viewers can see in the dashboard depending on who they are. For more information, see Using row-
level security (RLS) with tag-based rules to restrict access to a dataset when embedding dashboards
for anonymous users (p. 114).
• GenerateEmbedUrlForRegisteredUser – This API operation embeds interactive dashboards, the
QuickSight console, or the Q search bar for registered Amazon QuickSight users.
For more information, see Embedding with the QuickSight APIs (p. 793).
When you embed the full QuickSight experience, you're embedding the full functionality of QuickSight.
The only difference is that users see QuickSight as part of your application.
To complete the effect that the embedded analytics are just another part of the service that you provide,
you can design and use a custom theme with your own branding. You can hide QuickSight elements and
replace them with your own. For example, you can hide and replace the top navigation bar, the filters,
the controls, and the logo. If your subscription to QuickSight includes an annual session pack, you can
also hide the Powered by QuickSight label. To further customize the view of the data, you can pass in
fragments by using the dashboard URL.
With QuickSight, you can provide a personalized user experience by using, for example, dynamic defaults
with filters and controls. You can add personalization by using standard customization options. Or
you can create your own customization by using the SDKs (available only when embedding with the
QuickSight API).
1-click embedding
You can embed a visual or dashboard in your application using an embed code. You get this code when
you share the dashboard or from the Embed visual menu in Amazon QuickSight.
You can embed a visual or dashboard in your internal application for your registered users. Or you can
turn on public sharing in the QuickSight console. Doing this grants anyone on the internet access to a
shared visual or dashboard that is embedded in a public application, wiki, or portal.
Following, you can find descriptions about how to embed visuals and dashboards using the 1-click visual
or dashboard embed code.
Topics
• Embedding visuals and dashboards for registered users with a 1-click embed code (p. 784)
• Turning on public access to visuals and dashboards with a 1-click embed code (p. 788)
784
Amazon QuickSight User Guide
1-click embedding
You can embed a visual or dashboard in your internal application for registered users of your Amazon
QuickSight account. You do so using the embed code that you get when you share the dashboard or
from the Embed visual menu in QuickSight. You don't have to run the QuickSight embedding API to
generate the embed code. You can copy the embed code from QuickSight and paste it in your internal
application's HTML code.
When users and groups (or all users on your QuickSight account) who have access to the dashboard
that you want to embed or that holds the visual that you want to embed access your internal
application, they're prompted to sign in to the QuickSight account with their credentials. After they are
authenticated, they can access the visual or dashboard on their internal page. If you have single sign-on
enabled, users aren't prompted to sign in again.
Following, you can find descriptions about how to embed a visual or dashboard for registered users using
the visual or dashboard embed code.
• Your internet browser settings contain one of the following to allow communication between the
popup and the iframe:
• Native support for the Mozilla Broadcast Channel API. For more information, see Broadcast Channel
API in the Mozilla documentation.
• IndexedDB support.
• LocalStorage support.
• Your internet browser's "block all cookies" settings is turned off.
Step 2: Put the domain where you want to embed the visual or dashboard on
your allow list
To embed visuals and dashboards in your internal application, make sure that the domain where you're
embedding is allow-listed in your QuickSight account. For more information, see Allow listing static
domains (p. 927).
1. Open the published dashboard in QuickSight and choose Share at upper right. Then choose Share
dashboard.
785
Amazon QuickSight User Guide
1-click embedding
2. In the Share dashboard page that opens, choose Copy embed code at upper left.
The embed code is copied to your clipboard and is similar to the following. The quicksightdomain
in this example is the URL that you use to access your QuickSight account.
<iframe
width="960"
height="720"
src="https://quicksightdomain/sn/embed/share/accounts/accountid/
dashboards/dashboardid?directory_alias=account_directory_alias">
</iframe>
1. Open the published dashboard in QuickSight and choose the visual that you want to embed. Then
open the on-visual menu at the upper right of the visual and choose Embed visual.
786
Amazon QuickSight User Guide
1-click embedding
The embed code is copied to your clipboard and is similar to the following. The quicksightdomain
in this example is the URL that you use to access your QuickSight account.
<iframe
width="600"
height="400"
src="https://quicksightdomain/sn/embed/share/accounts/111122223333/
dashboards/DASHBOARDID/sheets/SHEETID>/visuals/VISUALID">
</iframe>
Step 4: Paste the code into your internal application's HTML page
Use the following procedure to paste the embed code into your internal application's HTML page
787
Amazon QuickSight User Guide
1-click embedding
• Open the HTML code for any page where you want to embed the dashboard and paste the embed
code in.
The following example shows what this might look like for an embedded dashboard. The
quicksightdomain in this example is the URL that you use to access your QuickSight account.
<!DOCTYPE html>
<html>
<body>
</body>
</html>
The following example shows what this might look like for an embedded visual. The
quicksightdomain in this example is the URL that you use to access your QuickSight account.
<!DOCTYPE html>
<html>
<body>
</body>
</html>
For example, let's say that you want to embed your visual or dashboard in an internal Google Sites page.
You can open the page on Google Sites and paste the embed code in an embed widget.
If you want to embed your visual or dashboard in an internal Microsoft SharePoint site, you can create a
new page and then paste the embed code in an Embed web part.
You can embed a visual or dashboard in public sites using the embed code that you get when you
share the visual or dashboard in Amazon QuickSight. You can also turn on public sharing by using the
788
Amazon QuickSight User Guide
1-click embedding
QuickSight console and automatically grant access to a shared visual or dashboard to anyone on the
internet.
Following, you can find how to turn on public sharing for a visual or dashboard and embed the visual or
dashboard for anyone on the internet to see. In both cases, you do this by using the 1-click embed code.
• Your internet browser settings contain one of the following to allow communication between the
popup and the iframe that sharing uses:
• Native support for the Mozilla Broadcast Channel API. For more information, see Broadcast Channel
API in the Mozilla documentation.
• IndexedDB support.
• LocalStorage support.
• Your internet browser's "block all cookies" settings is turned off.
Step 2: Put the domain where you want to embed the visual or dashboard on
your allow list
To embed visuals and dashboards in a public application, wiki, or portal, make sure that the domain
where you're embedding it is on the allow list for your QuickSight account.
1. Open the published dashboard in QuickSight and choose Share at upper right. Then choose Share
dashboard.
789
Amazon QuickSight User Guide
1-click embedding
2. In the Share dashboard page that opens, choose Copy embed code at upper left.
The embed code is copied to your clipboard and is similar to the following. The quicksightdomain
in this example is the URL that you use to access your QuickSight account.
<iframe
width="960"
height="720"
src="https://quicksightdomain/sn/
embed/share/accounts/accountid/dashboards/dashboardid">
</iframe>
1. Open the published dashboard in QuickSight and choose the visual that you want to embed. Then
open the on-visual menu in the top right corner of the visual and choose Embed visual.
790
Amazon QuickSight User Guide
1-click embedding
The embed code is copied to your clipboard and is similar to the following. The quicksightdomain
in this example is the URL that you use to access your QuickSight account.
<iframe
width="600"
height="400"
src="https://quicksightdomain/sn/embed/share/accounts/111122223333/
dashboards/DASHBOARDID/sheets/SHEETID>/visuals/VISUALID">
</iframe>
Step 4: Paste the embed code into an HTML page, wiki page, or portal
Use the following procedure to paste the embed code into an HTML page, wiki page, or portal.
791
Amazon QuickSight User Guide
1-click embedding
• Open the HTML code for the location where you want to embed the visual or dashboard, and paste
the embed code in.
The following example shows what this might look like for an embedded dashboard. The
quicksightdomain in this example is the URL that you use to access your QuickSight account.
<!DOCTYPE html>
<html>
<body>
</body>
</html>
The following example shows what this might look like for an embedded visual. The
quicksightdomain in this example is the URL that you use to access your QuickSight account.
<!DOCTYPE html>
<html>
<body>
</body>
</html>
If your public-facing applications are built on Google Sites, open the page on Google Sites and then
paste the embed code using the embed widget.
Make sure that the following domains in QuickSight are on your allow list when you embed in Google
Sites:
After you embed the visual or dashboard in your application, anyone who can access your application
can access the embedded visual or dashboard. To update a dashboard that's shared with the public, see
Updating a publicly shared dashboard (p. 749). To turn off public sharing, see Turning off public sharing
settings (p. 749).
792
Amazon QuickSight User Guide
Embedding with the APIs
When you turn off public sharing, no one from the internet can access a dashboard or dashboards that
you have embedded on a public application or shared with a link. The next time anyone tries to view such
a dashboard from the internet, they receive a message that they don't have access to view it.
There are only a few steps involved in the actual process of embedding analytics using the QuickSight
API.
Before you begin, make sure to have the following items in place:
• Set up the required IAM permissions for the caller identity used by your application
that will use the AWS SDK to make API calls. For example, grant permission
to allow the quicksight:GenerateEmbedUrlForAnonymousUser or
quicksight:GenerateEmbedUrlForRegisteredUser action.
• To embed for registered users, share QuickSight assets with them beforehand. For new
authenticating users, know how to grant access to the assets. One way to do this is by
adding all the assets to a QuickSight folder. If you prefer to use the QuickSight API, use the
DescribeDashboardPermissions and UpdateDashboardPermissions API operations. For more
information, see DescribeDashboardPermissions or UpdateDashboardPermissions in the Amazon
QuickSight API Reference. If you want to share the dashboard with all users in a namespace or group,
you can share the dashboard with namespace or group.
• If you're embedding dashboards, make sure to have the ID of the dashboards you want to embed. The
dashboard ID is the code in the URL of the dashboard. You can also get it from the dashboard URL.
• A QuickSight administrator must explicitly enable domains where you plan to embed your QuickSight
analytics. You can do this by using the Manage QuickSight, Domains and Embedding from the profile
menu, or you can use the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser
or GenerateEmbedUrlForRegisteredUser API call.
This option is only visible to QuickSight administrators. You can also add subdomains as part of a
domain. For more information, see Allow listing domains at runtime with the QuickSight API (p. 927).
All domains in your static allow list (such as development, staging, and production) must be explicitly
allowed, and they must use HTTPS. You can add up to 100 domains to the allow list. You can add
domains at runtime with QuickSight API operations.
After all the prerequisites are complete, embedding QuickSight involves the following steps, which are
explained in greater detail later:
1. For authentication, use your application server to authenticate the user. After authentication in your
server, generate the embedded dashboard URL using the AWS SDK that you need.
2. In your web portal or application, embed QuickSight using the generated URL. To simplify this
process, you can use the Amazon QuickSight Embedding SDK, available on NPMJS and GitHub.
This customized JavaScript SDK is designed to help you efficiently integrate QuickSight into your
application pages, set defaults, connect controls, get callbacks, and handle errors.
You can use AWS CloudTrail auditing logs to get information about the number of embedded
dashboards, users of an embedded experience, and access rates.
793
Amazon QuickSight User Guide
Embedding with the APIs
Topics
• Embedding dashboards with the QuickSight API (p. 794)
• Embedding visuals with the QuickSight API (p. 814)
• Embedding the full functionality of the Amazon QuickSight console for registered users (p. 837)
• Embedding the Amazon QuickSight Q search bar for registered users (p. 848)
• Embedding analytics using the GetDashboardEmbedURL and GetSessionEmbedURL API
operations (p. 859)
Topics
• Embedding QuickSight data dashboards for everyone (p. 794)
• Embedding QuickSight data dashboards for registered users (p. 803)
In the following sections, you can find detailed information about how to set up embedded Amazon
QuickSight dashboards for everyone (unregistered users).
Topics
• Step 1: Set up permissions (p. 794)
• Step 2: Generate the URL with the authentication code attached (p. 796)
• Step 3: Embed the dashboard URL (p. 801)
794
Amazon QuickSight User Guide
Embedding with the APIs
In the following section, you can find out how to set up permissions for the backend application or web
server. This task requires administrative access to IAM.
Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access and
permissions to the dashboard. To make this possible, create an IAM role in your AWS account. Associate
an IAM policy with the role to provide permissions to any user who assumes it.
You can create a condition in your IAM policy that limits the domains that developers can list in the
AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The
AllowedDomains parameter is an optional parameter. It grants you as a developer the option to
override the static domains that are configured in the Manage QuickSight menu. Instead, you can list
up to three domains or subdomains that can access a generated URL. This URL is then embedded in the
website that you create. Only the domains that are listed in the parameter can access the embedded
dashboard. Without this condition, you can list any domain on the internet in the AllowedDomains
parameter.
To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains
condition to your IAM policy. For more information about the AllowedDomains parameter, see
GenerateEmbedUrlForAnonymousUser in the Amazon QuickSight API Reference.
The following sample policy provides these permissions for use with
GenerateEmbedUrlForAnonymousUser. For this approach to work, you also need a session pack, or
session capacity pricing, for your AWS account. Otherwise, when a user tries to access the dashboard, the
error UnsupportedPricingPlanException is returned.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForAnonymousUser"
],
"Resource": [
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/
{{namespace}}",
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/
{{dashboardId-1}}",
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/
{{dashboardId-2}}"
],
"Condition": {
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
Your application's IAM identity must have a trust policy associated with it to allow access to the role
that you just created. This means that when a user accesses your application, your application can
assume the role on the user's behalf to open the dashboard. The following example shows a role called
QuickSightEmbeddingAnonymousPolicy, which has the sample policy preceding as its resource.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
795
Amazon QuickSight User Guide
Embedding with the APIs
"Action": "sts:AssumeRole",
"Resource":
"arn:aws:iam::11112222333:role/QuickSightEmbeddingAnonymousPolicy"
}
}
For more information regarding trust policies, see Temporary security credentials in IAM in the IAM User
Guide.
In the following section, you can find how to authenticate on behalf of the anonymous visitor and get
the embeddable dashboard URL on your application server.
When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user
to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID.
The following examples perform the IAM authentication on the user's behalf. It passes an identifier as
the unique role session ID. This code runs on your app server.
Java
import java.util.List;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.quicksight.AmazonQuickSight;
import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;
import
com.amazonaws.services.quicksight.model.RegisteredUserDashboardEmbeddingConfiguration;
import
com.amazonaws.services.quicksight.model.AnonymousUserEmbeddingExperienceConfiguration;
import
com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserRequest;
import
com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserResult;
import com.amazonaws.services.quicksight.model.SessionTag;
/**
* Class to call QuickSight AWS SDK to generate embed url for anonymous user.
*/
public class GenerateEmbedUrlForAnonymousUserExample {
public GenerateEmbedUrlForAnonymousUserExample() {
quickSightClient = AmazonQuickSightClientBuilder
.standard()
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(new AWSCredentialsProvider() {
@Override
public AWSCredentials getCredentials() {
796
Amazon QuickSight User Guide
Embedding with the APIs
@Override
public void refresh() {
}
}
)
.build();
}
GenerateEmbedUrlForAnonymousUserRequest
generateEmbedUrlForAnonymousUserRequest = new
GenerateEmbedUrlForAnonymousUserRequest()
.withAwsAccountId(accountId)
.withNamespace(namespace)
.withAuthorizedResourceArns(authorizedResourceArns)
.withExperienceConfiguration(experienceConfiguration)
.withSessionTags(sessionTags)
.withSessionLifetimeInMinutes(600L); // OPTIONAL: VALUE CAN BE
[15-600]. DEFAULT: 600
.withAllowedDomains(allowedDomains);
GenerateEmbedUrlForAnonymousUserResult dashboardEmbedUrl =
quickSightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserRequest);
return dashboardEmbedUrl.getEmbedUrl();
}
JavaScript
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
function generateEmbedUrlForAnonymousUser(
accountId, // YOUR AWS ACCOUNT ID
initialDashboardId, // DASHBOARD ID TO WHICH THE CONSTRUCTED URL POINTS
quicksightNamespace, // VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING
authorizedResourceArns, // DASHBOARD ARN LIST TO EMBED
allowedDomains, // RUNTIME ALLOWED DOMAINS FOR EMBEDDING
sessionTags, // SESSION TAGS USED FOR ROW-LEVEL SECURITY
797
Amazon QuickSight User Guide
Embedding with the APIs
generateEmbedUrlForAnonymousUserCallback, // GENERATEEMBEDURLFORANONYMOUSUSER
SUCCESS CALLBACK METHOD
errorCallback // GENERATEEMBEDURLFORANONYMOUSUSER ERROR CALLBACK METHOD
) {
const experienceConfiguration = {
"DashboardVisual": {
"InitialDashboardVisualId": {
"DashboardId": "dashboard_id",
"SheetId": "sheet_id",
"VisualId": "visual_id"
}
}
};
const generateEmbedUrlForAnonymousUserParams = {
"AwsAccountId": accountId,
"Namespace": quicksightNamespace,
"AuthorizedResourceArns": authorizedResourceArns,
"AllowedDomains": allowedDomains,
"ExperienceConfiguration": experienceConfiguration,
"SessionTags": sessionTags,
"SessionLifetimeInMinutes": 600
};
quicksightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserParams,
function(err, data) {
if (err) {
console.log(err, err.stack);
errorCallback(err);
} else {
const result = {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE DOMAIN TO
SECURE ACCESS TO THIS API
"Access-Control-Allow-Headers": "Content-Type"
},
"body": JSON.stringify(data),
"isBase64Encoded": false
}
generateEmbedUrlForAnonymousUserCallback(result);
}
});
}
Python3
import json
import boto3
from botocore.exceptions import ClientError
import time
798
Amazon QuickSight User Guide
Embedding with the APIs
return {
'statusCode': 200,
'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-
Allow-Headers": "Content-Type"},
'body': json.dumps(response),
'isBase64Encoded': bool('false')
}
except ClientError as e:
print(e)
return "Error generating embeddedURL: " + str(e)
Node.js
The following example shows the JavaScript (Node.js) that you can use on the app server to
generate the URL for the embedded dashboard. You can use this URL in your website or app to
display the dashboard.
Example
quicksightClient.generateEmbedUrlForAnonymousUser({
'AwsAccountId': '111122223333',
'Namespace' : 'default',
'AuthorizedResourceArns': authorizedResourceArns,
'AllowedDomains': allowedDomains,
'ExperienceConfiguration': experienceConfiguration,
'SessionTags': sessionTags,
'SessionLifetimeInMinutes': 600
}, function(err, data) {
console.log('Errors: ');
console.log(err);
console.log('Response: ');
console.log(data);
});
Example
//The URL returned is over 900 characters. For this example, we've shortened the string
for
799
Amazon QuickSight User Guide
Embedding with the APIs
.NET/C#
The following example shows the .NET/C# code that you can use on the app server to generate
the URL for the embedded dashboard. You can use this URL in your website or app to display the
dashboard.
Example
using System;
using Amazon.QuickSight;
using Amazon.QuickSight.Model;
try
{
Console.WriteLine(
quicksightClient.GenerateEmbedUrlForAnonymousUserAsync(new
GenerateEmbedUrlForAnonymousUserRequest
{
AwsAccountId = "111122223333",
Namespace = default,
AuthorizedResourceArns = authorizedResourceArns,
AllowedDomains = allowedDomains,
ExperienceConfiguration = experienceConfiguration,
SessionTags = sessionTags,
SessionLifetimeInMinutes = 600,
}).Result.EmbedUrl
);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
AWS CLI
To assume the role, choose one of the following AWS Security Token Service (AWS STS) API
operations:
• AssumeRole – Use this operation when you're using an IAM identity to assume the role.
• AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to
authenticate your user.
• AssumeRoleWithSaml – Use this operation when you're using Security Assertion Markup Language
(SAML) to authenticate your users.
The following example shows the CLI command to set the IAM role. The role needs to have
permissions enabled for quicksight:GenerateEmbedUrlForAnonymousUser.
800
Amazon QuickSight User Guide
Embedding with the APIs
--role-arn "arn:aws:iam::11112222333:role/
QuickSightEmbeddingAnonymousPolicy" \
--role-session-name anonymous caller
The assume-role operation returns three output parameters: the access key, the secret key, and
the session token.
Note
If you get an ExpiredToken error when calling the AssumeRole operation, this is probably
because the previous SESSION TOKEN is still in the environment variables. Clear this by
setting the following variables:
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN
The following example shows how to set these three parameters in the CLI. If you're using a
Microsoft Windows machine, use set instead of export.
Running these commands sets the role session ID of the user visiting your website to
embedding_quicksight_dashboard_role/QuickSightEmbeddingAnonymousPolicy. The
role session ID is made up of the role name from role-arn and the role-session-name value.
Using the unique role session ID for each user ensures that appropriate permissions are set for each
visiting user. It also keeps each session separate and distinct. If you're using an array of web servers,
for example for load balancing, and a session is reconnected to a different server, a new session
begins.
For more information about using this operation, see GenerateEmbedUrlForAnonymousUser. You
can use this and other API operations in your own code.
801
Amazon QuickSight User Guide
Embedding with the APIs
In the following section, you can find out how you can use the QuickSight Embedding SDK (JavaScript) to
embed the dashboard URL from step 2 in your website or application page. With the SDK, you can do the
following:
Call the GenerateEmbedUrlForAnynymousUser API operation to generate the URL that you can
embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The
API operation provides the URL with an auth_code that enables a single-sign on session.
//The URL returned is over 900 characters. For this example, we've shortened the string for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https://dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
Embed this dashboard in your web page by using the QuickSight Embedding SDK or by adding this URL
into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't
change your visual as your window resizes. If you set a relative percent height and width, QuickSight
provides a responsive layout that is modified as your window size changes. By using the QuickSight
Embedding SDK, you can also control parameters within the dashboard and receive callbacks in terms of
page load completion and errors.
The domain that is going to host embedded dashboards must be on the allow list, the list of approved
domains for your Amazon QuickSight subscription. This requirement protects your data by keeping
unapproved domains from hosting embedded dashboards. For more information about adding domains
for embedded dashboards, see Allow listing domains at runtime with the QuickSight API (p. 927).
The following example shows how to use the generated URL. This code resides on your app server.
<!DOCTYPE html>
<html>
<head>
<title>Basic Embed</title>
<!-- You can download the latest QuickSight embedding SDK version from
https://www.npmjs.com/package/amazon-quicksight-embedding-sdk -->
<!-- Or you can do "npm install amazon-quicksight-embedding-sdk", if you
use npm for javascript dependencies -->
<script src="./quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">
var dashboard;
function embedDashboard() {
var containerDiv = document.getElementById("embeddingContainer");
var options = {
// replace this dummy url with the one generated via embedding
API
802
Amazon QuickSight User Guide
Embedding with the APIs
url: "https://us-east-1.quicksight.aws.amazon.com/sn/
dashboards/dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode",
container: containerDiv,
scrolling: "no",
height: "700px",
width: "1000px",
footerPaddingEnabled: true
};
dashboard = QuickSightEmbedding.embedDashboard(options);
}
</script>
</head>
<body onload="embedDashboard()">
<div id="embeddingContainer"></div>
</body>
</html>
For this example to work, make sure to use the QuickSight Embedding SDK to load the embedded
dashboard on your website using JavaScript. To get your copy, do one of the following:
• Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a
group of QuickSight developers.
• Download the latest QuickSight Embedding SDK version from https://www.npmjs.com/package/
amazon-quicksight-embedding-sdk.
• If you use npm for JavaScript dependencies, download and install it by running the following
command.
In the following sections, you can find detailed information about how to set up embedded Amazon
QuickSight dashboards for registered users of Amazon QuickSight.
Topics
• Step 1: Set up permissions (p. 804)
• Step 2: Generate the URL with the authentication code attached (p. 805)
803
Amazon QuickSight User Guide
Embedding with the APIs
In the following section, you can find out how to set up permissions for the backend application or web
server. This task requires administrative access to IAM.
Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access
and permissions to the dashboard. To make this possible, create an IAM role in your AWS account.
Associate an IAM policy with the role to provide permissions to any user who assumes it. The
IAM role needs to provide permissions to retrieve embedding URLs for a specific user pool. With
the help of the wildcard character *, you can grant the permissions to generate a URL for all
users in a specific namespace, or for a subset of users in specific namespaces. For this, you add
quicksight:GenerateEmbedUrlForRegisteredUser.
You can create a condition in your IAM policy that limits the domains that developers can list in the
AllowedDomains parameter of a GenerateEmbedUrlForRegisteredUser API operation. The
AllowedDomains parameter is an optional parameter. It grants you as a developer the option to
override the static domains that are configured in the Manage QuickSight menu. Instead, you can list
up to three domains or subdomains that can access the generated URL. This URL is then embedded in
the website that you create. Only the domains that are listed in the parameter can access the embedded
visual. Without this condition, you can list any domain on the internet in the AllowedDomains
parameter.
To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains
condition to your IAM policy. For more information about the AllowedDomains parameter, see
GenerateEmbedUrlForRegisteredUser in the Amazon QuickSight API Reference.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForRegisteredUser"
],
"Resource":
"arn:partition:quicksight:region:accountId:user/namespace/userName",
"Condition": {
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
]
}
Additionally, if you are creating first-time users who will be Amazon QuickSight readers, make sure to
add the quicksight:RegisterUser permission in the policy.
The following sample policy provides permission to retrieve an embedding URL for first-time users who
are to be QuickSight readers.
804
Amazon QuickSight User Guide
Embedding with the APIs
"Version": "2012-10-17",
"Statement": [
{
"Action": "quicksight:RegisterUser",
"Resource": "*",
"Effect": "Allow"
},
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForRegisteredUser"
],
"Resource": [
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/
{{namespace}}",
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/
{{dashboardId-1}}",
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/
{{dashboardId-2}}"
],
"Condition": {
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
]
}
Finally, your application's IAM identity must have a trust policy associated with it to allow access to the
role that you just created. This means that when a user accesses your application, your application can
assume the role on the user's behalf and provision the user in QuickSight. The following example shows
a role called embedding_quicksight_dashboard_role, which has the sample policy preceding as its
resource.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::11112222333:role/embedding_quicksight_dashboard_role"
}
}
For more information regarding trust policies for OpenID Connect or SAML authentication, see the
following sections of the IAM User Guide:
In the following section, you can find out how to authenticate your user and get the embeddable
dashboard URL on your application server. If you plan to embed dashboards for IAM or QuickSight
identity types, share the dashboard with the users.
When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user
to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID.
805
Amazon QuickSight User Guide
Embedding with the APIs
Performing these steps ensures that each viewer of the dashboard is uniquely provisioned in QuickSight.
It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters.
The following examples perform the IAM authentication on the user's behalf. This code runs on your app
server.
Java
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.quicksight.AmazonQuickSight;
import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;
import
com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserRequest;
import
com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserResult;
import
com.amazonaws.services.quicksight.model.RegisteredUserEmbeddingExperienceConfiguration;
import
com.amazonaws.services.quicksight.model.RegisteredUserDashboardEmbeddingConfiguration;
/**
* Class to call QuickSight AWS SDK to get url for dashboard embedding.
*/
public class GetQuicksightEmbedUrlRegisteredUserDashboardEmbedding {
public GetQuicksightEmbedUrlRegisteredUserDashboardEmbedding() {
this.quickSightClient = AmazonQuickSightClientBuilder
.standard()
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(new AWSCredentialsProvider() {
@Override
public AWSCredentials getCredentials() {
// provide actual IAM access key and secret key here
return new BasicAWSCredentials("access-key", "secret-key");
}
@Override
public void refresh() {}
}
)
.build();
}
806
Amazon QuickSight User Guide
Embedding with the APIs
generateEmbedUrlForRegisteredUserRequest.setUserArn(userArn);
generateEmbedUrlForRegisteredUserRequest.setAllowedDomains(allowedDomains);
generateEmbedUrlForRegisteredUserRequest.setExperienceConfiguration(experienceConfiguration);
final GenerateEmbedUrlForRegisteredUserResult
generateEmbedUrlForRegisteredUserResult =
quickSightClient.generateEmbedUrlForRegisteredUser(generateEmbedUrlForRegisteredUserRequest);
return generateEmbedUrlForRegisteredUserResult.getEmbedUrl();
}
}
JavaScript
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
function generateEmbedUrlForRegisteredUser(
accountId,
dashboardId,
openIdToken, // Cognito-based token
userArn, // registered user arn
roleArn, // IAM user role to use for embedding
sessionName, // Session name for the roleArn assume role
allowedDomains, // Runtime allowed domain for embedding
getEmbedUrlCallback, // GetEmbedUrl success callback method
errorCallback // GetEmbedUrl error callback method
) {
const stsClient = new AWS.STS();
let stsParams = {
RoleSessionName: sessionName,
WebIdentityToken: openIdToken,
RoleArn: roleArn
}
807
Amazon QuickSight User Guide
Embedding with the APIs
quicksightClient.generateEmbedUrlForRegisteredUser(getDashboardParams,
function(err, data) {
if (err) {
console.log(err, err.stack);
errorCallback(err);
} else {
const result = {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*", // Use your website
domain to secure access to GetEmbedUrl API
"Access-Control-Allow-Headers": "Content-Type"
},
"body": JSON.stringify(data),
"isBase64Encoded": false
}
getEmbedUrlCallback(result);
}
});
}
});
}
Python3
import json
import boto3
from botocore.exceptions import ClientError
sts = boto3.client('sts')
response = quickSightClient.generate_embed_url_for_registered_user(
"AwsAccountId" = accountId,
"ExperienceConfiguration" = {
"Dashboard" = {
"InitialDashboardId" = dashboardId
}
808
Amazon QuickSight User Guide
Embedding with the APIs
},
"UserArn" = userArn,
"AllowedDomains" = allowedDomains,
"SessionLifetimeInMinutes" = 600
)
return {
'statusCode': 200,
'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-
Allow-Headers": "Content-Type"},
'body': json.dumps(response),
'isBase64Encoded': bool('false')
}
except ClientError as e:
return "Error generating embedding url: " + str(e)
Node.js
The following example shows the JavaScript (Node.js) that you can use on the app server to
generate the URL for the embedded dashboard. You can use this URL in your website or app to
display the dashboard.
Example
quicksightClient.generateEmbedUrlForRegisteredUser({
'AwsAccountId': '111122223333',
'ExperienceConfiguration': {
'Dashboard': {
'InitialDashboardId': '1c1fe111-e2d2-3b30-44ef-a0e111111cde'
}
},
'UserArn': 'REGISTERED_USER_ARN',
'AllowedDomains': allowedDomains,
'SessionLifetimeInMinutes': 100
}, function(err, data) {
console.log('Errors: ');
console.log(err);
console.log('Response: ');
console.log(data);
});
Example
//The URL returned is over 900 characters. For this example, we've shortened the string
for
//readability and added ellipsis to indicate that it's incomplete.
{
Status: 200,
EmbedUrl: 'https://dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d…
RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713'
}
809
Amazon QuickSight User Guide
Embedding with the APIs
.NET/C#
The following example shows the .NET/C# code that you can use on the app server to generate
the URL for the embedded dashboard. You can use this URL in your website or app to display the
dashboard.
Example
using System;
using Amazon.QuickSight;
using Amazon.QuickSight.Model;
namespace GenerateDashboardEmbedUrlForRegisteredUser
{
class Program
{
static void Main(string[] args)
{
var quicksightClient = new AmazonQuickSightClient(
AccessKey,
SecretAccessKey,
SessionToken,
Amazon.RegionEndpoint.USEast1);
try
{
RegisteredUserDashboardEmbeddingConfiguration
registeredUserDashboardEmbeddingConfiguration
= new RegisteredUserDashboardEmbeddingConfiguration
{
InitialDashboardId = "dashboardId"
};
RegisteredUserEmbeddingExperienceConfiguration
registeredUserEmbeddingExperienceConfiguration
= new RegisteredUserEmbeddingExperienceConfiguration
{
Dashboard = registeredUserDashboardEmbeddingConfiguration
};
Console.WriteLine(
quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new
GenerateEmbedUrlForRegisteredUserRequest
{
AwsAccountId = "111122223333",
ExperienceConfiguration =
registeredUserEmbeddingExperienceConfiguration,
UserArn = "REGISTERED_USER_ARN",
AllowedDomains = allowedDomains,
SessionLifetimeInMinutes = 100
}).Result.EmbedUrl
);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
}
}
AWS CLI
To assume the role, choose one of the following AWS Security Token Service (AWS STS) API
operations:
• AssumeRole – Use this operation when you're using an IAM identity to assume the role.
810
Amazon QuickSight User Guide
Embedding with the APIs
• AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to
authenticate your user.
• AssumeRoleWithSaml – Use this operation when you're using SAML to authenticate your users.
The following example shows the CLI command to set the IAM role. The role needs to have
permissions enabled for quicksight:GenerateEmbedUrlForRegisteredUser. If you are
taking a just-in-time approach to add users when they first open a dashboard, the role also needs
permissions enabled for quicksight:RegisterUser.
The assume-role operation returns three output parameters: the access key, the secret key, and
the session token.
Note
If you get an ExpiredToken error when calling the AssumeRole operation, this is probably
because the previous SESSION TOKEN is still in the environment variables. Clear this by
setting the following variables:
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN
The following example shows how to set these three parameters in the CLI. If you're using a
Microsoft Windows machine, use set instead of export.
Running these commands sets the role session ID of the user visiting your website to
embedding_quicksight_dashboard_role/[email protected]. The role session ID is
made up of the role name from role-arn and the role-session-name value. Using the unique
role session ID for each user ensures that appropriate permissions are set for each user. It also
prevents any throttling of user access. Throttling is a security feature that prevents the same user
from accessing QuickSight from multiple locations.
The role session ID also becomes the user name in QuickSight. You can use this pattern to provision
your users in QuickSight ahead of time, or to provision them the first time they access the
dashboard.
The following example shows the CLI command that you can use to provision a user. For more
information about RegisterUser, DescribeUser, and other QuickSight API operations, see the
QuickSight API Reference.
811
Amazon QuickSight User Guide
Embedding with the APIs
--session-name "[email protected]" \
--email [email protected] \
--region us-east-1 \
--custom-permissions-name TeamA1
If your user is authenticated through Microsoft AD, you don't need to use RegisterUser to set
them up. Instead, they should be automatically subscribed the first time they access QuickSight. For
Microsoft AD users, you can use DescribeUser to get the user ARN.
The first time a user accesses QuickSight, you can also add this user to the group that the dashboard
is shared with. The following example shows the CLI command to add a user to a group.
You now have a user of your app who is also a user of QuickSight, and who has access to the
dashboard.
For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can
use this and other API operations in your own code.
In the following section, you can find out how you can use the Amazon QuickSight Embedding SDK
(JavaScript) to embed the dashboard URL from step 3 in your website or application page. With the SDK,
you can do the following:
Call the GenerateEmbedUrlForRegisteredUser API operation to generate the URL that you can
embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours.
The API operation provides the URL with an auth_code that enables a single-sign on session.
//The URL returned is over 900 characters. For this example, we've shortened the string for
812
Amazon QuickSight User Guide
Embedding with the APIs
Embed this dashboard in your webpage by using the QuickSight Embedding SDK or by adding this URL
into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't
change your visual as your window resizes. If you set a relative percent height and width, QuickSight
provides a responsive layout that is modified as your window size changes. By using the Amazon
QuickSight Embedding SDK, you can also control parameters within the dashboard and receive callbacks
in terms of page load completion and errors.
The domain that is going to host embedded dashboards must be on the allow list, the list of approved
domains for your Amazon QuickSight subscription. This requirement protects your data by keeping
unapproved domains from hosting embedded dashboards. For more information about adding domains
for embedded dashboards, see Allow listing domains at runtime with the QuickSight API (p. 927).
The following example shows how to use the generated URL. This code is generated on your app server.
<!DOCTYPE html>
<html>
<head>
<title>Basic Embed</title>
<script src="https://unpkg.com/[email protected]/dist/
quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">
var dashboard
function onDashboardLoad(payload) {
console.log("Do something when the dashboard is fully loaded.");
}
function onError(payload) {
console.log("Do something when the dashboard fails loading");
}
function embedDashboard() {
var containerDiv = document.getElementById("embeddingContainer");
var options = {
// replace this dummy url with the one generated via embedding API
url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/
dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode",
container: containerDiv,
parameters: {
country: "United States"
},
scrolling: "no",
height: "700px",
width: "1000px",
locale: "en-US",
footerPaddingEnabled: true
};
dashboard = QuickSightEmbedding.embedDashboard(options);
dashboard.on("error", onError);
dashboard.on("load", onDashboardLoad);
}
function onCountryChange(obj) {
dashboard.setParameters({country: obj.value});
}
813
Amazon QuickSight User Guide
Embedding with the APIs
</script>
</head>
<body onload="embedDashboard()">
<span>
<label for="country">Country</label>
<select id="country" name="country" onchange="onCountryChange(this)">
<option value="United States">United States</option>
<option value="Mexico">Mexico</option>
<option value="Canada">Canada</option>
</select>
</span>
<div id="embeddingContainer"></div>
</body>
</html>
For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the
embedded dashboard on your website using JavaScript. To get your copy, do one of the following:
• Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a
group of QuickSight developers.
• Download the latest embedding SDK version from https://www.npmjs.com/package/amazon-
quicksight-embedding-sdk.
• If you use npm for JavaScript dependencies, download and install it by running the following
command.
Topics
• Embedding QuickSight visuals for everyone (p. 814)
• Embedding QuickSight visuals for registered users (p. 825)
In the following sections, you can find detailed information about how to set up embedded Amazon
QuickSight visuals for everyone (unregistered users).
Topics
• Step 1: Set up permissions (p. 815)
• Step 2: Generate the URL with the authentication code attached (p. 816)
• Step 3: Embed the visual URL (p. 823)
814
Amazon QuickSight User Guide
Embedding with the APIs
In the following section, you can find out how to set up permissions for the backend application or web
server. This task requires administrative access to IAM.
Each user who accesses a visual assumes a role that gives them Amazon QuickSight access and
permissions to the visual. To make this possible, create an IAM role in your AWS account. Associate an
IAM policy with the role to provide permissions to any user who assumes it.
You can create a condition in your IAM policy that limits the domains that developers can list in the
AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The
AllowedDomains parameter is an optional parameter. It grants you as a developer the option to
override the static domains that are configured in the Manage QuickSight menu. Instead, you can list
up to three domains or subdomains that can access a generated URL. This URL is then embedded in the
website that you create. Only the domains that are listed in the parameter can access the embedded
dashboard. Without this condition, you can list any domain on the internet in the AllowedDomains
parameter.
To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains
condition to your IAM policy. For more information about the AllowedDomains parameter, see
GenerateEmbedUrlForAnonymousUser in the Amazon QuickSight API Reference.
The following sample policy provides these permissions for use with
GenerateEmbedUrlForAnonymousUser. For this approach to work, you also need a session pack, or
session capacity pricing, for your AWS account. Otherwise, when a user tries to access the visual, the
error UnsupportedPricingPlanException is returned.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForAnonymousUser"
],
"Resource": [
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/
{{namespace}}",
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/
{{dashboardId-1}}",
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/
{{dashboardId-2}}"
],
"Condition": {
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
}
815
Amazon QuickSight User Guide
Embedding with the APIs
Your application's IAM identity must have a trust policy associated with it to allow access to the role
that you just created. This means that when a user accesses your application, your application can
assume the role on the user's behalf to open the visual. The following example shows a role called
QuickSightEmbeddingAnonymousPolicy, which has the sample policy preceding as its resource.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::11112222333:role/QuickSightEmbeddingAnonymousPolicy"
}
}
For more information regarding trust policies, see Temporary security credentials in IAM in the IAM User
Guide.
In the following section, you can find how to authenticate on behalf of the anonymous visitor and get
the embeddable visual URL on your application server.
When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user
to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID.
The following examples perform the IAM authentication on the user's behalf. It passes an identifier as
the unique role session ID. This code runs on your app server.
Java
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.quicksight.AmazonQuickSight;
import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;
import
com.amazonaws.services.quicksight.model.AnonymousUserDashboardVisualEmbeddingConfiguration;
import
com.amazonaws.services.quicksight.model.AnonymousUserEmbeddingExperienceConfiguration;
import com.amazonaws.services.quicksight.model.DashboardVisualId;
import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserRequest;
import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserResult;
import com.amazonaws.services.quicksight.model.SessionTag;
import java.util.List;
/**
* Class to call QuickSight AWS SDK to get url for Visual embedding.
*/
public class GenerateEmbedUrlForAnonymousUserTest {
private final AmazonQuickSight quickSightClient;
816
Amazon QuickSight User Guide
Embedding with the APIs
public GenerateEmbedUrlForAnonymousUserTest() {
this.quickSightClient = AmazonQuickSightClientBuilder
.standard()
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(new AWSCredentialsProvider() {
@Override
public AWSCredentials getCredentials() {
// provide actual IAM access key and secret key here
return new BasicAWSCredentials("access-key", "secret-key");
}
@Override
public void refresh() {
}
}
)
.build();
}
.withDashboardVisual(anonymousUserDashboardVisualEmbeddingConfiguration);
final GenerateEmbedUrlForAnonymousUserRequest
generateEmbedUrlForAnonymousUserRequest
= new GenerateEmbedUrlForAnonymousUserRequest()
.withAwsAccountId(accountId)
.withNamespace(namespace)
// authorizedResourceArns should contain ARN of dashboard used below in
ExperienceConfiguration
.withAuthorizedResourceArns(authorizedResourceArns)
.withExperienceConfiguration(anonymousUserEmbeddingExperienceConfiguration)
.withAllowedDomains(allowedDomains)
.withSessionTags(sessionTags)
.withSessionLifetimeInMinutes(600L);
final GenerateEmbedUrlForAnonymousUserResult
generateEmbedUrlForAnonymousUserResult
=
quickSightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserRequest);
return generateEmbedUrlForAnonymousUserResult.getEmbedUrl();
}
817
Amazon QuickSight User Guide
Embedding with the APIs
JavaScript
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
function generateEmbedUrlForAnonymousUser(
accountId, // Your AWS account ID
dashboardId, // Dashboard ID to which the constructed url points
sheetId, // Sheet ID to which the constructed url points
visualId, // Visual ID to which the constructed url points
quicksightNamespace, // valid namespace where you want to do embedding
authorizedResourceArns, // dashboard arn list of dashboard visuals to embed
allowedDomains, // runtime allowed domains for embedding
sessionTags, // session tags used for row-level security
generateEmbedUrlForAnonymousUserCallback, // success callback method
errorCallback // error callback method
) {
const experienceConfiguration = {
"DashboardVisual": {
"InitialDashboardVisualId": {
"DashboardId": dashboardId,
"SheetId": sheetId,
"VisualId": visualId
}
}
};
const generateEmbedUrlForAnonymousUserParams = {
"AwsAccountId": accountId,
"Namespace": quicksightNamespace,
// authorizedResourceArns should contain ARN of dashboard used below in
ExperienceConfiguration
"AuthorizedResourceArns": authorizedResourceArns,
"AllowedDomains": allowedDomains,
"ExperienceConfiguration": experienceConfiguration,
"SessionTags": sessionTags,
"SessionLifetimeInMinutes": 600
};
quicksightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserParams,
function(err, data) {
if (err) {
console.log(err, err.stack);
errorCallback(err);
} else {
const result = {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE DOMAIN TO
SECURE ACCESS TO THIS API
"Access-Control-Allow-Headers": "Content-Type"
},
"body": JSON.stringify(data),
"isBase64Encoded": false
}
generateEmbedUrlForAnonymousUserCallback(result);
}
});
818
Amazon QuickSight User Guide
Embedding with the APIs
Python3
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
function generateEmbedUrlForAnonymousUser(
accountId, // Your AWS account ID
quicksightNamespace, // valid namespace where you want to do embedding
authorizedResourceArns, // dashboard arn list of dashboard visuals to embed
dashboardId, // Dashboard ID to which the constructed url points
sheetId, // Sheet ID to which the constructed url points
visualId, // Visual ID to which the constructed url points
openIdToken, // Cognito-based token
roleArn, // IAM user role to use for embedding
sessionName, // Session name for the roleArn assume role
allowedDomains, // Runtime allowed domains for embedding
sessionTags, // session tags used for row-level security
getEmbedUrlCallback, // GetEmbedUrl success callback method
errorCallback // GetEmbedUrl error callback method
) {
const stsClient = new AWS.STS();
let stsParams = {
RoleSessionName: sessionName,
WebIdentityToken: openIdToken,
RoleArn: roleArn
}
819
Amazon QuickSight User Guide
Embedding with the APIs
quicksightClient.generate_embed_url_for_anonymous_user(getDashboardParams,
function(err, data) {
if (err) {
console.log(err, err.stack);
errorCallback(err);
} else {
const result = {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*", // Use your website
domain to secure access to GetEmbedUrl API
"Access-Control-Allow-Headers": "Content-Type"
},
"body": JSON.stringify(data),
"isBase64Encoded": false
}
getEmbedUrlCallback(result);
}
});
}
});
}
Node.js
The following example shows the JavaScript (Node.js) that you can use on the app server to
generate the URL for the embedded dashboard. You can use this URL in your website or app to
display the dashboard.
Example
quicksightClient.generateEmbedUrlForAnonymousUser({
'AwsAccountId': '111122223333',
'Namespace' : 'default',
// authorizedResourceArns should contain ARN of dashboard used below in
ExperienceConfiguration
'AuthorizedResourceArns': authorizedResourceArns,
'ExperienceConfiguration': {
'DashboardVisual': {
'InitialDashboardVisualId': {
'DashboardId': 'dashboard_id',
'SheetId': 'sheet_id',
'VisualId': 'visual_id'
}
}
},
'AllowedDomains': allowedDomains,
'SessionTags': sessionTags,
'SessionLifetimeInMinutes': 600
}, function(err, data) {
console.log('Errors: ');
console.log(err);
console.log('Response: ');
console.log(data);
});
820
Amazon QuickSight User Guide
Embedding with the APIs
Example
//The URL returned is over 900 characters. For this example, we've shortened the string
for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890/
sheets/12345/visuals/67890...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
.NET/C#
The following example shows the .NET/C# code that you can use on the app server to generate
the URL for the embedded dashboard. You can use this URL in your website or app to display the
dashboard.
Example
using System;
using Amazon.QuickSight;
using Amazon.QuickSight.Model;
namespace GenerateDashboardEmbedUrlForAnonymousUser
{
class Program
{
static void Main(string[] args)
{
var quicksightClient = new AmazonQuickSightClient(
AccessKey,
SecretAccessKey,
SessionToken,
Amazon.RegionEndpoint.USEast1);
try
{
DashboardVisualId dashboardVisual = new DashboardVisualId
{
DashboardId = "dashboard_id",
SheetId = "sheet_id",
VisualId = "visual_id"
};
AnonymousUserDashboardVisualEmbeddingConfiguration
anonymousUserDashboardVisualEmbeddingConfiguration
= new AnonymousUserDashboardVisualEmbeddingConfiguration
{
InitialDashboardVisualId = dashboardVisual
};
AnonymousUserEmbeddingExperienceConfiguration
anonymousUserEmbeddingExperienceConfiguration
= new AnonymousUserEmbeddingExperienceConfiguration
{
DashboardVisual =
anonymousUserDashboardVisualEmbeddingConfiguration
};
Console.WriteLine(
quicksightClient.GenerateEmbedUrlForAnonymousUserAsync(new
GenerateEmbedUrlForAnonymousUserRequest
821
Amazon QuickSight User Guide
Embedding with the APIs
{
AwsAccountId = "111222333444",
Namespace = default,
// authorizedResourceArns should contain ARN of dashboard used
below in ExperienceConfiguration
AuthorizedResourceArns = { "dashboard_id" },
ExperienceConfiguration =
anonymousUserEmbeddingExperienceConfiguration,
SessionTags = sessionTags,
SessionLifetimeInMinutes = 600,
}).Result.EmbedUrl
);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
}
}
AWS CLI
To assume the role, choose one of the following AWS Security Token Service (AWS STS) API
operations:
• AssumeRole – Use this operation when you're using an IAM identity to assume the role.
• AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to
authenticate your user.
• AssumeRoleWithSaml – Use this operation when you're using Security Assertion Markup Language
(SAML) to authenticate your users.
The following example shows the CLI command to set the IAM role. The role needs to have
permissions enabled for quicksight:GenerateEmbedUrlForAnonymousUser.
The assume-role operation returns three output parameters: the access key, the secret key, and
the session token.
Note
If you get an ExpiredToken error when calling the AssumeRole operation, this is probably
because the previous SESSION TOKEN is still in the environment variables. Clear this by
setting the following variables:
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN
The following example shows how to set these three parameters in the CLI. If you're using a
Microsoft Windows machine, use set instead of export.
Running these commands sets the role session ID of the user visiting your website to
embedding_quicksight_visual_role/QuickSightEmbeddingAnonymousPolicy. The role
822
Amazon QuickSight User Guide
Embedding with the APIs
session ID is made up of the role name from role-arn and the role-session-name value. Using
the unique role session ID for each user ensures that appropriate permissions are set for each visiting
user. It also keeps each session separate and distinct. If you're using an array of web servers, for
example for load balancing, and a session is reconnected to a different server, a new session begins.
To get a signed URL for the visual, call generate-embed-url-for-anynymous-user from the
app server. This returns the embeddable visual URL. The following example shows how to generate
the URL for an embedded visual using a server-side call for users who are making anonymous visits
to your web portal or app.
For more information about using this operation, see GenerateEmbedUrlForAnonymousUser. You
can use this and other API operations in your own code.
In the following section, you can find out how you can use the QuickSight Embedding SDK (JavaScript)
to embed the visual URL from step 2 in your website or application page. With the SDK, you can do the
following:
Call the GenerateEmbedUrlForAnonymousUser API operation to generate the URL that you can
embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The
API operation provides the URL with an authorization (auth) code that enables a single-sign on session.
//The URL returned is over 900 characters. For this example, we've shortened the string for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890/sheets/12345/
visuals/67890...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
823
Amazon QuickSight User Guide
Embedding with the APIs
Embed this visual in your web page by using the QuickSight Embedding SDK or by adding this URL into
an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't
change your visual as your window resizes. If you set a relative percent height and width, QuickSight
provides a responsive layout that is modified as your window size changes. By using the QuickSight
Embedding SDK, you can also control parameters within the visual and receive callbacks in terms of
visual load completion and errors.
The domain that is going to host embedded visual must be on the allow list, the list of approved
domains for your Amazon QuickSight subscription. This requirement protects your data by keeping
unapproved domains from hosting embedded visuals and dashboards. For more information about
adding domains for embedded visuals and dashboards, see Allow listing domains at runtime with the
QuickSight API (p. 927).
The following example shows how to use the generated URL. This code resides on your app server.
<!DOCTYPE html>
<html>
<head>
<title>Visual Embedding Example</title>
<!-- You can download the latest QuickSight embedding SDK version from https://
www.npmjs.com/package/amazon-quicksight-embedding-sdk -->
<!-- Or you can do "npm install amazon-quicksight-embedding-sdk", if you use npm
for javascript dependencies -->
<script src="./quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">
let embeddedVisualExperience;
function onVisualLoad(payload) {
console.log("Do something when the visual is fully loaded.");
}
function onError(payload) {
console.log("Do something when the visual fails loading");
}
function embedVisual() {
const containerDiv = document.getElementById("embeddingContainer");
const options = {
url: "<YOUR_EMBED_URL>", // replace this value with the url generated
via embedding API
container: containerDiv,
parameters: {
country: "United States"
},
height: "700px",
width: "1000px",
locale: "en-US"
};
embeddedVisualExperience = QuickSightEmbedding.embedVisual(options);
embeddedVisualExperience.on("error", onError);
embeddedVisualExperience.on("load", onVisualLoad);
}
function onCountryChange(obj) {
embeddedVisualExperience.setParameters({country: obj.value});
}
</script>
</head>
<body onload="embedVisual()">
<span>
<label for="country">Country</label>
<select id="country" name="country" onchange="onCountryChange(this)">
<option value="United States">United States</option>
824
Amazon QuickSight User Guide
Embedding with the APIs
<option value="Mexico">Mexico</option>
<option value="Canada">Canada</option>
</select>
</span>
<div id="embeddingContainer"></div>
</body>
</html>
For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the
embedded visual on your website using JavaScript. To get your copy, do one of the following:
• Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a
group of QuickSight developers.
• Download the latest QuickSight embedding SDK version from https://www.npmjs.com/package/
amazon-quicksight-embedding-sdk.
• If you use npm for JavaScript dependencies, download and install it by running the following
command.
In the following sections, you can find detailed information about how to set up embedded Amazon
QuickSight visuals for registered users of Amazon QuickSight.
Topics
• Step 1: Set up permissions (p. 825)
• Step 2: Generate the URL with the authentication code attached (p. 827)
• Step 3: Embed the visual URL (p. 835)
In the following section, you can find out how to set up permissions for the backend application or web
server. This task requires administrative access to IAM.
Each user who accesses a visual assumes a role that gives them Amazon QuickSight access
and permissions to the visual. To make this possible, create an IAM role in your AWS account.
Associate an IAM policy with the role to provide permissions to any user who assumes it. The
IAM role needs to provide permissions to retrieve embedding URLs for a specific user pool. With
the help of the wildcard character *, you can grant the permissions to generate a URL for all
users in a specific namespace, or for a subset of users in specific namespaces. For this, you add
quicksight:GenerateEmbedUrlForRegisteredUser.
You can create a condition in your IAM policy that limits the domains that developers can list in the
AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The
AllowedDomains parameter is an optional parameter. It grants you as a developer the option to
825
Amazon QuickSight User Guide
Embedding with the APIs
override the static domains that are configured in the Manage QuickSight menu. Instead, you can list
up to three domains or subdomains that can access a generated URL. This URL is then embedded in the
website that you create. Only the domains that are listed in the parameter can access the embedded
dashboard. Without this condition, you can list any domain on the internet in the AllowedDomains
parameter.
To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains
condition to your IAM policy. For more information about the AllowedDomains parameter, see
GenerateEmbedUrlForRegisteredUser in the Amazon QuickSight API Reference.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForRegisteredUser"
],
"Resource":
"arn:partition:quicksight:region:accountId:user/namespace/userName",
"Condition": {
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
]
}
Additionally, if you are creating first-time users who will be Amazon QuickSight readers, make sure to
add the quicksight:RegisterUser permission in the policy.
The following sample policy provides permission to retrieve an embedding URL for first-time users who
are to be QuickSight readers.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "quicksight:RegisterUser",
"Resource": "*",
"Effect": "Allow"
},
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForRegisteredUser"
],
"Resource": [
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/
{{namespace}}",
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/
{{dashboardId-1}}",
"arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/
{{dashboardId-2}}"
],
"Condition": {
826
Amazon QuickSight User Guide
Embedding with the APIs
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
]
}
Finally, your application's IAM identity must have a trust policy associated with it to allow access to the
role that you just created. This means that when a user accesses your application, your application can
assume the role on the user's behalf and provision the user in QuickSight. The following example shows
a role called embedding_quicksight_visual_role, which has the sample policy preceding as its
resource.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::11112222333:role/embedding_quicksight_visual_role"
}
}
For more information regarding trust policies for OpenID Connect or SAML authentication, see the
following sections of the IAM User Guide:
In the following section, you can find out how to authenticate your user and get the embeddable visual
URL on your application server. If you plan to embed visuals for IAM or QuickSight identity types, share
the visual with the users.
When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user
to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID.
Performing the described steps ensures that each viewer of the visual is uniquely provisioned in
QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for
parameters.
The following examples perform the IAM authentication on the user's behalf. This code runs on your app
server.
Java
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.quicksight.AmazonQuickSight;
import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;
import com.amazonaws.services.quicksight.model.DashboardVisualId;
import
com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserRequest;
827
Amazon QuickSight User Guide
Embedding with the APIs
import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserResult;
import
com.amazonaws.services.quicksight.model.RegisteredUserDashboardVisualEmbeddingConfiguration;
import
com.amazonaws.services.quicksight.model.RegisteredUserEmbeddingExperienceConfiguration;
import java.util.List;
/**
* Class to call QuickSight AWS SDK to get url for Visual embedding.
*/
public class GenerateEmbedUrlForRegisteredUserTest {
public GenerateEmbedUrlForRegisteredUserTest() {
this.quickSightClient = AmazonQuickSightClientBuilder
.standard()
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(new AWSCredentialsProvider() {
@Override
public AWSCredentials getCredentials() {
// provide actual IAM access key and secret key here
return new BasicAWSCredentials("access-key", "secret-key");
}
@Override
public void refresh() {
}
}
)
.build();
}
.withDashboardVisual(registeredUserDashboardVisualEmbeddingConfiguration);
final GenerateEmbedUrlForRegisteredUserRequest
generateEmbedUrlForRegisteredUserRequest
= new GenerateEmbedUrlForRegisteredUserRequest()
.withAwsAccountId(accountId)
.withUserArn(userArn)
.withExperienceConfiguration(registeredUserEmbeddingExperienceConfiguration)
.withAllowedDomains(allowedDomains);
828
Amazon QuickSight User Guide
Embedding with the APIs
final GenerateEmbedUrlForRegisteredUserResult
generateEmbedUrlForRegisteredUserResult =
quickSightClient.generateEmbedUrlForRegisteredUser(generateEmbedUrlForRegisteredUserRequest);
return generateEmbedUrlForRegisteredUserResult.getEmbedUrl();
}
}
JavaScript
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
function generateEmbedUrlForRegisteredUser(
accountId, // Your AWS account ID
dashboardId, // Dashboard ID to which the constructed URL points
sheetId, // Sheet ID to which the constructed URL points
visualId, // Visual ID to which the constructed URL points
openIdToken, // Cognito-based token
userArn, // registered user arn
roleArn, // IAM user role to use for embedding
sessionName, // Session name for the roleArn assume role
allowedDomains, // Runtime allowed domain for embedding
getEmbedUrlCallback, // GetEmbedUrl success callback method
errorCallback // GetEmbedUrl error callback method
) {
const stsClient = new AWS.STS();
let stsParams = {
RoleSessionName: sessionName,
WebIdentityToken: openIdToken,
RoleArn: roleArn
}
829
Amazon QuickSight User Guide
Embedding with the APIs
quicksightGetDashboard.generateEmbedUrlForRegisteredUser(getDashboardParams,
function(err, data) {
if (err) {
console.log(err, err.stack);
errorCallback(err);
} else {
const result = {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*", // Use your website
domain to secure access to GetEmbedUrl API
"Access-Control-Allow-Headers": "Content-Type"
},
"body": JSON.stringify(data),
"isBase64Encoded": false
}
getEmbedUrlCallback(result);
}
});
}
});
}
Python3
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
function generateEmbedUrlForRegisteredUser(
accountId, // Your AWS account ID
dashboardId, // Dashboard ID to which the constructed URL points
sheetId, // Sheet ID to which the constructed URL points
visualId, // Visual ID to which the constructed URL points
openIdToken, // Cognito-based token
userArn, // registered user arn
roleArn, // IAM user role to use for embedding
sessionName, // Session name for the roleArn assume role
allowedDomains, // Runtime allowed domain for embedding
getEmbedUrlCallback, // GetEmbedUrl success callback method
errorCallback // GetEmbedUrl error callback method
) {
const stsClient = new AWS.STS();
let stsParams = {
RoleSessionName: sessionName,
WebIdentityToken: openIdToken,
RoleArn: roleArn
}
830
Amazon QuickSight User Guide
Embedding with the APIs
},
"UserArn": userArn,
"AllowedDomains": allowedDomains,
"SessionLifetimeInMinutes": 600 // Optional: Value can be [15-600].
Default: 600
};
quicksightClient.generate_embed_url_for_registered_user(getDashboardParams,
function(err, data) {
if (err) {
console.log(err, err.stack);
errorCallback(err);
} else {
const result = {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*", // Use your website
domain to secure access to GetEmbedUrl API
"Access-Control-Allow-Headers": "Content-Type"
},
"body": JSON.stringify(data),
"isBase64Encoded": false
}
getEmbedUrlCallback(result);
}
});
}
});
}
Node.js
The following example shows the JavaScript (Node.js) that you can use on the app server to
generate the URL for the embedded dashboard. You can use this URL in your website or app to
display the dashboard.
Example
quicksightClient.generateEmbedUrlForRegisteredUser({
'AwsAccountId': '111122223333',
'ExperienceConfiguration': {
'DashboardVisual': {
'InitialDashboardVisualId': {
'DashboardId': 'dashboard_id',
'SheetId': 'sheet_id',
'VisualId': 'visual_id'
831
Amazon QuickSight User Guide
Embedding with the APIs
}
}
},
'UserArn': 'REGISTERED_USER_ARN',
'AllowedDomains': allowedDomains,
'SessionLifetimeInMinutes': 100
}, function(err, data) {
console.log('Errors: ');
console.log(err);
console.log('Response: ');
console.log(data);
});
Example
//The URL returned is over 900 characters. For this example, we've shortened the string
for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890/
sheets/12345/visuals/67890...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
.NET/C#
The following example shows the .NET/C# code that you can use on the app server to generate
the URL for the embedded dashboard. You can use this URL in your website or app to display the
dashboard.
Example
using System;
using Amazon.QuickSight;
using Amazon.QuickSight.Model;
namespace GenerateDashboardEmbedUrlForRegisteredUser
{
class Program
{
static void Main(string[] args)
{
var quicksightClient = new AmazonQuickSightClient(
AccessKey,
SecretAccessKey,
SessionToken,
Amazon.RegionEndpoint.USEast1);
try
{
DashboardVisualId dashboardVisual = new DashboardVisualId
{
DashboardId = "dashboard_id",
SheetId = "sheet_id",
VisualId = "visual_id"
};
RegisteredUserDashboardVisualEmbeddingConfiguration
registeredUserDashboardVisualEmbeddingConfiguration
= new RegisteredUserDashboardVisualEmbeddingConfiguration
{
InitialDashboardVisualId = dashboardVisual
832
Amazon QuickSight User Guide
Embedding with the APIs
};
RegisteredUserEmbeddingExperienceConfiguration
registeredUserEmbeddingExperienceConfiguration
= new RegisteredUserEmbeddingExperienceConfiguration
{
DashboardVisual =
registeredUserDashboardVisualEmbeddingConfiguration
};
Console.WriteLine(
quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new
GenerateEmbedUrlForRegisteredUserRequest
{
AwsAccountId = "111122223333",
ExperienceConfiguration =
registeredUserEmbeddingExperienceConfiguration,
UserArn = "REGISTERED_USER_ARN",
AllowedDomains = allowedDomains,
SessionLifetimeInMinutes = 100
}).Result.EmbedUrl
);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
}
}
AWS CLI
To assume the role, choose one of the following AWS Security Token Service (AWS STS) API
operations:
• AssumeRole – Use this operation when you're using an IAM identity to assume the role.
• AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to
authenticate your user.
• AssumeRoleWithSaml – Use this operation when you're using SAML to authenticate your users.
The following example shows the CLI command to set the IAM role. The role needs to have
permissions enabled for quicksight:GenerateEmbedUrlForRegisteredUser. If you are
taking a just-in-time approach to add users when they first open a dashboard, the role also needs
permissions enabled for quicksight:RegisterUser.
The assume-role operation returns three output parameters: the access key, the secret key, and
the session token.
Note
If you get an ExpiredToken error when calling the AssumeRole operation, this is probably
because the previous SESSION TOKEN is still in the environment variables. Clear this by
setting the following variables:
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN
833
Amazon QuickSight User Guide
Embedding with the APIs
The following example shows how to set these three parameters in the CLI. If you're using a
Microsoft Windows machine, use set instead of export.
Running these commands sets the role session ID of the user visiting your website to
embedding_quicksight_visual_role/[email protected]. The role session ID is made
up of the role name from role-arn and the role-session-name value. Using the unique role
session ID for each user ensures that appropriate permissions are set for each user. It also prevents
any throttling of user access. Throttling is a security feature that prevents the same user from
accessing QuickSight from multiple locations.
The role session ID also becomes the user name in QuickSight. You can use this pattern to provision
your users in QuickSight ahead of time, or to provision them the first time they access the
dashboard.
The following example shows the CLI command that you can use to provision a user. For more
information about RegisterUser, DescribeUser, and other QuickSight API operations, see the
QuickSight API Reference.
If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set
them up. Instead, they should be automatically subscribed the first time they access QuickSight. For
Microsoft AD users, you can use DescribeUser to get the user ARN.
The first time a user accesses QuickSight, you can also add this user to the group that the visual is
shared with. The following example shows the CLI command to add a user to a group.
You now have a user of your app who is also a user of QuickSight, and who has access to the visual.
834
Amazon QuickSight User Guide
Embedding with the APIs
--allowed-domains '["domain1","domain2"]' \
--experience-configuration
'DashboardVisual={InitialDashboardVisualId={DashboardId=dashboard_id,SheetId=sheet_id,VisualId=vis
For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can
use this and other API operations in your own code.
In the following section, you can find out how you can use the Amazon QuickSight Embedding SDK
(JavaScript) to embed the visual URL from step 3 in your website or application page. With the SDK, you
can do the following:
Call the GenerateEmbedUrlForRegisteredUser API operation to generate the URL that you can
embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours.
The API operation provides the URL with an auth_code that enables a single-sign on session.
//The URL returned is over 900 characters. For this example, we've shortened the string for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890/sheets/12345/
visuals/67890...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
Embed this visual in your webpage by using the QuickSight Embedding SDK or by adding this URL into
an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't
change your visual as your window resizes. If you set a relative percent height and width, QuickSight
provides a responsive layout that is modified as your window size changes. By using the Amazon
QuickSight Embedding SDK, you can also control parameters within the visual and receive callbacks in
terms of page load completion and errors.
The domain that is going to host embedded visuals and dashboards must be on the allow list, the list
of approved domains for your Amazon QuickSight subscription. This requirement protects your data by
keeping unapproved domains from hosting embedded visuals and dashboards. For more information
about adding domains for embedded visuals and dashboards, see Allow listing domains at runtime with
the QuickSight API (p. 927).
The following example shows how to use the generated URL. This code is generated on your app server.
<!DOCTYPE html>
<html>
<head>
<title>Visual Embedding Example</title>
<!-- You can download the latest QuickSight embedding SDK version from https://
www.npmjs.com/package/amazon-quicksight-embedding-sdk -->
835
Amazon QuickSight User Guide
Embedding with the APIs
function onError(payload) {
console.log("Do something when the visual fails loading");
}
function embedVisual() {
const containerDiv = document.getElementById("embeddingContainer");
const options = {
url: "<YOUR_EMBED_URL>", // replace this value with the url generated
via embedding API
container: containerDiv,
parameters: {
country: "United States"
},
height: "700px",
width: "1000px",
locale: "en-US"
};
embeddedVisualExperience = QuickSightEmbedding.embedVisual(options);
embeddedVisualExperience.on("error", onError);
embeddedVisualExperience.on("load", onVisualLoad);
}
function onCountryChange(obj) {
embeddedVisualExperience.setParameters({country: obj.value});
}
</script>
</head>
<body onload="embedVisual()">
<span>
<label for="country">Country</label>
<select id="country" name="country" onchange="onCountryChange(this)">
<option value="United States">United States</option>
<option value="Mexico">Mexico</option>
<option value="Canada">Canada</option>
</select>
</span>
<div id="embeddingContainer"></div>
</body>
</html>
For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the
embedded visual on your website using JavaScript. To get your copy, do one of the following:
• Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a
group of QuickSight developers.
• Download the latest embedding SDK version from https://www.npmjs.com/package/amazon-
quicksight-embedding-sdk.
• If you use npm for JavaScript dependencies, download and install it by running the following
command.
836
Amazon QuickSight User Guide
Embedding with the APIs
With Enterprise edition, in addition to providing read-only dashboards you can also provide the Amazon
QuickSight console experience in a custom-branded authoring portal. Using this approach, you allow
your users to create data sources, datasets, and analyses. In the same interface, they can create, publish,
and view dashboards. If you want to restrict some of those permissions, you can also do that.
Users who access QuickSight through an embedded console need to belong to the author or admin
security cohort. Readers don't have enough access to use the QuickSight console for authoring,
regardless of whether it's embedded or part of the AWS Management Console. However, authors
and admins can still access embedded dashboards. If you want to restrict permissions to some of the
authoring features, you can add a custom permissions profile to the user with the UpdateUser API
operation. Use the RegisterUser API operation to add a new user with a custom permission profile
attached. For more information, see the following sections:
• For information about creating custom roles by defining custom console permissions, see Customizing
Access to the QuickSight Console.
• For information about using namespaces to isolate multitenancy users, groups, and QuickSight assets,
see QuickSight Namespaces.
• For information about adding your own branding to an embedded QuickSight console, see Using
Themes in QuickSight and the QuickSight Theme API Operations.
In the following sections, you can find detailed information about how to set up embedded Amazon
QuickSight dashboards for registered users.
Topics
• Step 1: Set up permissions (p. 837)
• Step 2: Generate the URL with the authentication code attached (p. 839)
• Step 3: Embed the console session URL (p. 846)
Each user who accesses a QuickSight assumes a role that gives them Amazon QuickSight access
and permissions to the console session. To make this possible, create an IAM role in your AWS
837
Amazon QuickSight User Guide
Embedding with the APIs
account. Associate an IAM policy with the role to provide permissions to any user who assumes it.
Add quicksight:RegisterUser permissions to ensure that the reader can access QuickSight
in a read-only fashion, and not have access to any other data or creation capability. The IAM
role also needs to provide permissions to retrieve console session URLs. For this, you add
quicksight:GenerateEmbedUrlForRegisteredUser.
You can create a condition in your IAM policy that limits the domains that developers can list in the
AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The
AllowedDomains parameter is an optional parameter. It grants you as a developer the option to
override the static domains that are configured in the Manage QuickSight menu. Instead, you can list
up to three domains or subdomains that can access a generated URL. This URL is then embedded in the
website that you create. Only the domains that are listed in the parameter can access the embedded
dashboard. Without this condition, you can list any domain on the internet in the AllowedDomains
parameter.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "quicksight:RegisterUser",
"Resource": "*",
"Effect": "Allow"
},
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForRegisteredUser"
],
"Resource": [
"arn:partition:quicksight:region:accountId:user/namespace/userName"
],
"Condition": {
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
]
}
The following sample policy provides permission to retrieve a console session URL. You can use the
policy without quicksight:RegisterUser if you are creating users before they access an embedded
session.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForRegisteredUser"
],
"Resource": [
"arn:partition:quicksight:region:accountId:user/namespace/userName"
],
"Condition": {
838
Amazon QuickSight User Guide
Embedding with the APIs
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
]
}
Finally, your application's IAM identity must have a trust policy associated with it to allow access to the
role that you just created. This means that when a user accesses your application, your application can
assume the role on the user's behalf and provision the user in QuickSight. The following example shows
a role called embedding_quicksight_dashboard_role, which has the sample policy preceding as its
resource.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::11112222333:role/embedding_quicksight_dashboard_role"
}
}
For more information regarding trust policies for OpenID Connect or SAML authentication, see the
following sections of the IAM User Guide:
When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user
to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID.
Performing the described steps ensures that each viewer of the console session is uniquely provisioned
in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for
parameters.
The following examples perform the IAM authentication on the user's behalf. This code runs on your app
server.
Java
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.quicksight.AmazonQuickSight;
import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;
import
com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserRequest;
import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserResult;
839
Amazon QuickSight User Guide
Embedding with the APIs
import
com.amazonaws.services.quicksight.model.RegisteredUserEmbeddingExperienceConfiguration;
import
com.amazonaws.services.quicksight.model.RegisteredUserQuickSightConsoleEmbeddingConfiguration;
/**
* Class to call QuickSight AWS SDK to get url for QuickSight console embedding.
*/
public class GetQuicksightEmbedUrlRegisteredUserQSConsoleEmbedding {
public GetQuicksightEmbedUrlRegisteredUserQSConsoleEmbedding() {
this.quickSightClient = AmazonQuickSightClientBuilder
.standard()
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(new AWSCredentialsProvider() {
@Override
public AWSCredentials getCredentials() {
// provide actual IAM access key and secret key here
return new BasicAWSCredentials("access-key", "secret-key");
}
@Override
public void refresh() {
}
}
)
.build();
}
generateEmbedUrlForRegisteredUserRequest.setExperienceConfiguration(experienceConfiguration);
final GenerateEmbedUrlForRegisteredUserResult
generateEmbedUrlForRegisteredUserResult =
quickSightClient.generateEmbedUrlForRegisteredUser(generateEmbedUrlForRegisteredUserRequest);
return generateEmbedUrlForRegisteredUserResult.getEmbedUrl();
}
}
JavaScript
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
840
Amazon QuickSight User Guide
Embedding with the APIs
function generateEmbedUrlForRegisteredUser(
accountId,
dashboardId,
openIdToken, // Cognito-based token
userArn, // registered user arn
roleArn, // IAM user role to use for embedding
sessionName, // Session name for the roleArn assume role
allowedDomains, // Runtime allowed domain for embedding
getEmbedUrlCallback, // GetEmbedUrl success callback method
errorCallback // GetEmbedUrl error callback method
) {
const stsClient = new AWS.STS();
let stsParams = {
RoleSessionName: sessionName,
WebIdentityToken: openIdToken,
RoleArn: roleArn
}
quicksightGetDashboard.generateEmbedUrlForRegisteredUser(getDashboardParams,
function(err, data) {
if (err) {
console.log(err, err.stack);
errorCallback(err);
} else {
const result = {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*", // Use your website
domain to secure access to GetEmbedUrl API
"Access-Control-Allow-Headers": "Content-Type"
},
"body": JSON.stringify(data),
"isBase64Encoded": false
}
getEmbedUrlCallback(result);
}
});
841
Amazon QuickSight User Guide
Embedding with the APIs
}
});
}
Python3
import json
import boto3
from botocore.exceptions import ClientError
response = quickSightClient.generate_embed_url_for_registered_user(
"AwsAccountId" = accountId,
"ExperienceConfiguration" = {
"QuickSightConsole" = {
"InitialPath" = "/start"
}
},
"UserArn" = userArn,
"AllowedDomains" = allowedDomains,
"SessionLifetimeInMinutes" = 600
)
return {
'statusCode': 200,
'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow-
Headers": "Content-Type"},
'body': json.dumps(response),
'isBase64Encoded': bool('false')
}
except ClientError as e:
return "Error generating embedding url: " + str(e)
842
Amazon QuickSight User Guide
Embedding with the APIs
Node.js
The following example shows the JavaScript (Node.js) that you can use on the app server to
generate the URL for the embedded console session. You can use this URL in your website or app to
display the console session.
Example
quicksightClient.generateEmbedUrlForRegisteredUser({
'AwsAccountId': '111122223333',
'ExperienceConfiguration': {
'QuickSightConsole': {
'InitialPath': '/start'
}
},
'UserArn': 'REGISTERED_USER_ARN',
'AllowedDomains': allowedDomains,
'SessionLifetimeInMinutes': 100
}, function(err, data) {
console.log('Errors: ');
console.log(err);
console.log('Response: ');
console.log(data);
});
Example
// The URL returned is over 900 characters. For this example, we've shortened the
string for
// readability and added ellipsis to indicate that it's incomplete.
{
Status: 200,
EmbedUrl: 'https://dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d…',
RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713'
}
.NET/C#
The following example shows the .NET/C# code that you can use on the app server to generate the
URL for the embedded console session. You can use this URL in your website or app to display the
console.
Example
using System;
using Amazon.QuickSight;
using Amazon.QuickSight.Model;
namespace GenerateDashboardEmbedUrlForRegisteredUser
{
class Program
843
Amazon QuickSight User Guide
Embedding with the APIs
{
static void Main(string[] args)
{
var quicksightClient = new AmazonQuickSightClient(
AccessKey,
SecretAccessKey,
SessionToken,
Amazon.RegionEndpoint.USEast1);
try
{
RegisteredUserQuickSightConsoleEmbeddingConfiguration
registeredUserQuickSightConsoleEmbeddingConfiguration
= new RegisteredUserQuickSightConsoleEmbeddingConfiguration
{
InitialPath = "/start"
};
RegisteredUserEmbeddingExperienceConfiguration
registeredUserEmbeddingExperienceConfiguration
= new RegisteredUserEmbeddingExperienceConfiguration
{
QuickSightConsole =
registeredUserQuickSightConsoleEmbeddingConfiguration
};
Console.WriteLine(
quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new
GenerateEmbedUrlForRegisteredUserRequest
{
AwsAccountId = "111122223333",
ExperienceConfiguration =
registeredUserEmbeddingExperienceConfiguration,
UserArn = "REGISTERED_USER_ARN",
AllowedDomains = allowedDomains,
SessionLifetimeInMinutes = 100
}).Result.EmbedUrl
);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
}
}
AWS CLI
To assume the role, choose one of the following AWS Security Token Service (AWS STS) API
operations:
• AssumeRole – Use this operation when you're using an IAM identity to assume the role.
• AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to
authenticate your user.
• AssumeRoleWithSaml – Use this operation when you're using SAML to authenticate your users.
The following example shows the CLI command to set the IAM role. The role needs to have
permissions enabled for quicksight:GenerateEmbedUrlForRegisteredUser. If you are
taking a just-in-time approach to add users when they first open QuickSight, the role also needs
permissions enabled for quicksight:RegisterUser.
844
Amazon QuickSight User Guide
Embedding with the APIs
The assume-role operation returns three output parameters: the access key, the secret key, and
the session token.
Note
If you get an ExpiredToken error when calling the AssumeRole operation, this is probably
because the previous SESSION TOKEN is still in the environment variables. Clear this by
setting the following variables:
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN
The following example shows how to set these three parameters in the CLI. If you're using a
Microsoft Windows machine, use set instead of export.
Running these commands sets the role session ID of the user visiting your website to
embedding_quicksight_console_session_role/[email protected]. The role session
ID is made up of the role name from role-arn and the role-session-name value. Using the
unique role session ID for each user ensures that appropriate permissions are set for each user. It
also prevents any throttling of user access. Throttling is a security feature that prevents the same
user from accessing QuickSight from multiple locations.
The role session ID also becomes the user name in QuickSight. You can use this pattern to provision
your users in QuickSight ahead of time, or to provision them the first time they access a console
session.
The following example shows the CLI command that you can use to provision a user. For more
information about RegisterUser, DescribeUser, and other QuickSight API operations, see the
QuickSight API Reference.
If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set
them up. Instead, they should be automatically subscribed the first time they access QuickSight. For
Microsoft AD users, you can use DescribeUser to get the user ARN.
The first time a user accesses QuickSight, you can also add this user to the appropriate group. The
following example shows the CLI command to add a user to a group.
845
Amazon QuickSight User Guide
Embedding with the APIs
You now have a user of your app who is also a user of QuickSight, and who has access to the
QuickSight console session.
Finally, to get a signed URL for the console session, call generate-embed-url-for-registered-
user from the app server. This returns the embeddable console session URL. The following example
shows how to generate the URL for an embedded console session using a server-side call for users
authenticated through AWS Managed Microsoft AD or single sign-on (SSO).
For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can
use this and other API operations in your own code.
Call the GenerateEmbedUrlForRegisteredUser API operation to generate the URL that you can
embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours.
The API operation provides the URL with an auth_code that enables a single-sign on session.
//The URL returned is over 900 characters. For this example, we've shortened the string for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https://dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
Embed this console session in your webpage by using the QuickSight Embedding SDK or by adding
this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those
and doesn't change your visual as your window resizes. If you set a relative percent height and width,
QuickSight provides a responsive layout that is modified as your window size changes. By using the
Amazon QuickSight Embedding SDK, you can also control parameters within the console session and
receive callbacks in terms of page load completion and errors.
The domain that is going to host embedded dashboards must be on the allow list, the list of approved
domains for your Amazon QuickSight subscription. This requirement protects your data by keeping
unapproved domains from hosting embedded dashboards. For more information about adding domains
for an embedded console, see Allow listing domains at runtime with the QuickSight API (p. 927).
846
Amazon QuickSight User Guide
Embedding with the APIs
The following example shows how to use the generated URL. This code is generated on your app server.
<!DOCTYPE html>
<html>
<head>
<title>QuickSight Console Embedding</title>
<script src="https://unpkg.com/[email protected]/dist/
quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">
var session
function onError(payload) {
console.log("Do something when the session fails loading");
}
function embedSession() {
var containerDiv = document.getElementById("embeddingContainer");
var options = {
// replace this dummy url with the one generated via embedding API
url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/
dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", // replace this
dummy url with the one generated via embedding API
container: containerDiv,
parameters: {
country: "United States"
},
scrolling: "no",
height: "700px",
width: "1000px",
locale: "en-US",
footerPaddingEnabled: true,
defaultEmbeddingVisualType: "TABLE", // this option only applies to
QuickSight console embedding and is not used for dashboard embedding
};
session = QuickSightEmbedding.embedSession(options);
session.on("error", onError);
}
function onCountryChange(obj) {
session.setParameters({country: obj.value});
}
</script>
</head>
<body onload="embedSession()">
<span>
<label for="country">Country</label>
<select id="country" name="country" onchange="onCountryChange(this)">
<option value="United States">United States</option>
<option value="Mexico">Mexico</option>
<option value="Canada">Canada</option>
</select>
</span>
<div id="embeddingContainer"></div>
</body>
</html>
For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the
embedded console session on your website using JavaScript. To get your copy, do one of the following:
• Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a
group of QuickSight developers.
847
Amazon QuickSight User Guide
Embedding with the APIs
In the following sections, you can find detailed information about how to set up an embedded Amazon
QuickSight Q search bar for registered users of QuickSight.
Topics
• Step 1: Set up permissions (p. 848)
• Step 2: Generate the URL with the authentication code attached (p. 850)
• Step 3: Embed the Q search bar URL (p. 857)
• Optional Amazon QuickSight Q search bar embedding functionalities (p. 858)
Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access and
permissions to the dashboard. To make this possible, create an IAM role in your AWS account. Associate
an IAM policy with the role to provide permissions to any user who assumes it. The IAM role needs to
provide permissions to retrieve embedding URLs for a specific user pool.
With the help of the wildcard character *, you can grant the permissions to generate a URL for all users
in a specific namespace. Or you can grant permissions to generate a URL for a subset of users in specific
namespaces. For this, you add quicksight:GenerateEmbedUrlForRegisteredUser.
You can create a condition in your IAM policy that limits the domains that developers can list in the
AllowedDomains parameter of a GenerateEmbedUrlForRegisteredUser API operation. The
AllowedDomains parameter is an optional parameter. It grants developers the option to override the
static domains that are configured in the Manage QuickSight menu and instead list up to three domains
or subdomains that can access a generated URL. This URL is then embedded in a developer's website.
Only the domains that are listed in the parameter can access the embedded Q search bar. Without this
condition, developers can list any domain on the internet in the AllowedDomains parameter.
To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains
condition to your IAM policy. For more information about the AllowedDomains parameter, see
GenerateEmbedUrlForRegisteredUser in the Amazon QuickSight API Reference.
848
Amazon QuickSight User Guide
Embedding with the APIs
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForRegisteredUser"
],
"Resource":
"arn:partition:quicksight:region:accountId:user/namespace/userName",
"Condition": {
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
]
}
Also, if you're creating first-time users who will be Amazon QuickSight readers, make sure to add the
quicksight:RegisterUser permission in the policy.
The following sample policy provides permission to retrieve an embedding URL for first-time users who
are to be QuickSight readers.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "quicksight:RegisterUser",
"Resource": "*",
"Effect": "Allow"
},
{
"Effect": "Allow",
"Action": [
"quicksight:GenerateEmbedUrlForRegisteredUser"
],
"Resource": [
"arn:partition:quicksight:region:accountId:user/namespace/userName"
],
"Condition": {
"ForAllValues:StringEquals": {
"quicksight:AllowedEmbeddingDomains": [
"https://my.static.domain1.com",
"https://*.my.static.domain2.com"
]
}
}
}
]
}
Finally, your application's IAM identity must have a trust policy associated with it to allow access to the
role that you just created. This means that when a user accesses your application, your application can
assume the role on the user's behalf and provision the user in QuickSight.
849
Amazon QuickSight User Guide
Embedding with the APIs
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::11112222333:role/embedding_quicksight_q_search_bar_role"
}
}
For more information regarding trust policies for OpenID Connect or Security Assertion Markup
Language (SAML) authentication, see the following sections of the IAM User Guide:
When a user accesses your app, the app assumes the IAM role on the user's behalf. Then the app adds
the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role
session ID.
Performing the described steps ensures that each viewer of the Q topic is uniquely provisioned in
QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for
parameters.
The following examples perform the IAM authentication on the user's behalf. This code runs on your app
server.
Java
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.quicksight.AmazonQuickSight;
import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;
import
com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserRequest;
import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserResult;
import
com.amazonaws.services.quicksight.model.RegisteredUserEmbeddingExperienceConfiguration;
import
com.amazonaws.services.quicksight.model.RegisteredUserQSearchBarEmbeddingConfiguration;
/**
* Class to call QuickSight AWS SDK to get url for embedding the Q search bar.
*/
public class RegisteredUserQSearchBarEmbeddingConfiguration {
public RegisteredUserQSearchBarEmbeddingConfiguration() {
this.quickSightClient = AmazonQuickSightClientBuilder
.standard()
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(new AWSCredentialsProvider() {
@Override
850
Amazon QuickSight User Guide
Embedding with the APIs
@Override
public void refresh() {
}
}
)
.build();
}
generateEmbedUrlForRegisteredUserRequest.setExperienceConfiguration(QSearchBar);
final GenerateEmbedUrlForRegisteredUserResult
generateEmbedUrlForRegisteredUserResult =
quickSightClient.generateEmbedUrlForRegisteredUser(generateEmbedUrlForRegisteredUserRequest);
return generateEmbedUrlForRegisteredUserResult.getEmbedUrl();
}
}
JavaScript
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
function generateEmbedUrlForRegisteredUser(
accountId,
topicId, // Topic ID to embed
openIdToken, // Cognito-based token
userArn, // registered user arn
roleArn, // IAM user role to use for embedding
sessionName, // Session name for the roleArn assume role
allowedDomains, // Runtime allowed domain for embedding
getEmbedUrlCallback, // GetEmbedUrl success callback method
errorCallback // GetEmbedUrl error callback method
) {
const stsClient = new AWS.STS();
let stsParams = {
RoleSessionName: sessionName,
WebIdentityToken: openIdToken,
RoleArn: roleArn
}
851
Amazon QuickSight User Guide
Embedding with the APIs
quicksightGetQSearchBar.generateEmbedUrlForRegisteredUser(getQSearchBarParams,
function(err, data) {
if (err) {
console.log(err, err.stack);
errorCallback(err);
} else {
const result = {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*", // Use your website
domain to secure access to GetEmbedUrl API
"Access-Control-Allow-Headers": "Content-Type"
},
"body": JSON.stringify(data),
"isBase64Encoded": false
}
getEmbedUrlCallback(result);
}
});
}
});
}
Python3
import json
import boto3
from botocore.exceptions import ClientError
852
Amazon QuickSight User Guide
Embedding with the APIs
response = quicksightClient.generate_embed_url_for_registered_user(
"AwsAccountId" = accountId,
"ExperienceConfiguration" = {
"QSearchBar" = {
"InitialTopicId" = topicId
}
},
"UserArn" = userArn,
"AllowedDomains" = allowedDomains,
"SessionLifetimeInMinutes" = 600
)
return {
'statusCode': 200,
'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow-
Headers": "Content-Type"},
'body': json.dumps(response),
'isBase64Encoded': bool('false')
}
except ClientError as e:
return "Error generating embedding url: " + str(e)
Node.js
The following example shows the JavaScript (Node.js) that you can use on the app server to
generate the URL for the embedded dashboard. You can use this URL in your website or app to
display the dashboard.
Example
quicksightClient.generateEmbedUrlForRegisteredUser({
'AwsAccountId': '111122223333',
853
Amazon QuickSight User Guide
Embedding with the APIs
'ExperienceConfiguration': {
'QSearchBar': {
'InitialTopicId': 'U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f'
}
},
'UserArn': 'REGISTERED_USER_ARN',
'AllowedDomains': allowedDomains,
'SessionLifetimeInMinutes': 100
}, function(err, data) {
console.log('Errors: ');
console.log(err);
console.log('Response: ');
console.log(data);
});
Example
//The URL returned is over 900 characters. For this example, we've shortened the string
for
//readability and added ellipsis to indicate that it's incomplete.
{
Status: 200,
EmbedUrl: 'https://dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d…
RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713'
}
.NET/C#
The following example shows the .NET/C# code that you can use on the app server to generate the
URL for the embedded Q search bar. You can use this URL in your website or app to display the Q
search bar.
Example
using System;
using Amazon.QuickSight;
using Amazon.QuickSight.Model;
namespace GenerateDashboardEmbedUrlForRegisteredUser
{
class Program
{
static void Main(string[] args)
{
var quicksightClient = new AmazonQuickSightClient(
AccessKey,
SecretAccessKey,
SessionToken,
Amazon.RegionEndpoint.USEast1);
try
{
RegisteredUserQSearchBarEmbeddingConfiguration
registeredUserQSearchBarEmbeddingConfiguration
= new RegisteredUserQSearchBarEmbeddingConfiguration
{
InitialTopicId = "U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f"
};
RegisteredUserEmbeddingExperienceConfiguration
registeredUserEmbeddingExperienceConfiguration
= new RegisteredUserEmbeddingExperienceConfiguration
{
QSearchBar = registeredUserQSearchBarEmbeddingConfiguration
854
Amazon QuickSight User Guide
Embedding with the APIs
};
Console.WriteLine(
quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new
GenerateEmbedUrlForRegisteredUserRequest
{
AwsAccountId = "111122223333",
ExperienceConfiguration =
registeredUserEmbeddingExperienceConfiguration,
UserArn = "REGISTERED_USER_ARN",
AllowedDomains = allowedDomains,
SessionLifetimeInMinutes = 100
}).Result.EmbedUrl
);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
}
}
AWS CLI
To assume the role, choose one of the following AWS Security Token Service (AWS STS) API
operations:
• AssumeRole – Use this operation when you are using an IAM identity to assume the role.
• AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to
authenticate your user.
• AssumeRoleWithSaml – Use this operation when you are using SAML to authenticate your users.
The following example shows the CLI command to set the IAM role. The role needs to have
permissions enabled for quicksight:GenerateEmbedUrlForRegisteredUser. If you are taking
a just-in-time approach to add users when they use a topic in the Q search bar, the role also needs
permissions enabled for quicksight:RegisterUser.
The assume-role operation returns three output parameters: the access key, the secret key, and
the session token.
Note
If you get an ExpiredToken error when calling the AssumeRole operation, this is probably
because the previous SESSION TOKEN is still in the environment variables. Clear this by
setting the following variables:
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN
The following example shows how to set these three parameters in the CLI. For a Microsoft Windows
machine, use set instead of export.
855
Amazon QuickSight User Guide
Embedding with the APIs
Running these commands sets the role session ID of the user visiting your website to
embedding_quicksight_q_search_bar_role/[email protected]. The role session
ID is made up of the role name from role-arn and the role-session-name value. Using the
unique role session ID for each user ensures that appropriate permissions are set for each user. It
also prevents any throttling of user access. Throttling is a security feature that prevents the same
user from accessing QuickSight from multiple locations.
The role session ID also becomes the user name in QuickSight. You can use this pattern to provision
your users in QuickSight ahead of time, or to provision them the first time that they access the Q
search bar.
The following example shows the CLI command that you can use to provision a user. For more
information about RegisterUser, DescribeUser, and other QuickSight API operations, see the
QuickSight API reference.
If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set them
up. Instead, they should be automatically subscribed the first time that they access QuickSight. For
Microsoft AD users, you can use DescribeUser to get the user Amazon Resource Name (ARN).
The first time a user accesses QuickSight, you can also add this user to the group that the dashboard
is shared with. The following example shows the CLI command to add a user to a group.
You now have a user of your app who is also a user of QuickSight, and who has access to the
dashboard.
856
Amazon QuickSight User Guide
Embedding with the APIs
For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can
use this and other API operations in your own code.
To generate the URL that you can embed in your app, call the
GenerateEmbedUrlForRegisteredUser API operation. This URL is valid for 5 minutes, and the
resulting session is valid for up to 10 hours. The API operation provides the URL with an auth_code
value that enables a single-sign on session.
//The URL returned is over 900 characters. For this example, we've shortened the string for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https: //dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
Embed the Q search bar in your webpage by using the QuickSight embedding SDK or by adding this URL
into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't
change your visual as your window resizes. If you set a relative percent height and width, QuickSight
provides a responsive layout that is modified as your window size changes.
To do this, make sure that the domain to host the embedded Q search bar is on the allow list, the list
of approved domains for your QuickSight subscription. This requirement protects your data by keeping
unapproved domains from hosting embedded dashboards. For more information about adding domains
for an embedded Q search bar, see Adding domains for embedded analytics (p. 926).
When you use the QuickSight Embedding SDK, the Q search bar on your page is dynamically resized
based on the state. By using the QuickSight Embedding SDK, you can also control parameters within the
Q search bar and receive callbacks in terms of page load completion and errors.
The following example shows how to use the generated URL. This code is generated on your app server.
<!DOCTYPE html>
<html>
<head>
<title>QuickSight Q Search Bar Embedding</title>
<script src="https://unpkg.com/[email protected]/dist/
quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">
var session
function onError(payload) {
console.log("Do something when the session fails loading");
857
Amazon QuickSight User Guide
Embedding with the APIs
function onOpen() {
console.log("Do something when the Q search bar opens");
}
function onClose() {
console.log("Do something when the Q search bar closes");
}
function embedQSearchBar() {
var containerDiv = document.getElementById("embeddingContainer");
var options = {
url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/
dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", // replace this
dummy url with the one generated via embedding API
container: containerDiv,
width: "1000px",
locale: "en-US",
qSearchBarOptions: {
expandCallback: onOpen,
collapseCallback: onClose,
iconDisabled: false,
topicNameDisabled: false,
themeId: 'theme12345',
allowTopicSelection: true
}
};
session = QuickSightEmbedding.embedQSearchBar(options);
session.on("error", onError);
}
function onCountryChange(obj) {
session.setParameters({country: obj.value});
}
</script>
</head>
<body onload="embedQSearchBar()">
<div id="embeddingContainer"></div>
</body>
</html>
For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the
embedded dashboard on your website using JavaScript. To get your copy, do one of the following:
• Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a
group of QuickSight developers.
• Download the latest embedding SDK version from https://www.npmjs.com/package/amazon-
quicksight-embedding-sdk.
• If you use npm for JavaScript dependencies, download and install it by running the following
command.
858
Amazon QuickSight User Guide
Embedding with the APIs
The following options are only supported for Q search bar embedding.
• Set a Q search bar question — This feature sends a question to the Q search bar and immediately
queries the question. It also automatically opens the Q popover.
• Close the Q popover — This feature closes the Q popover and returns the iframe to the original Q
search bar size.
qBar.closeQPopover();
The following API operations for embedding Amazon QuickSight dashboards and the
QuickSight console have been replaced by the GenerateEmbedUrlForAnonymousUser and
GenerateEmbedUrlForRegisteredUser API operations. You can still use them to embed analytics in your
application, but they are no longer maintained and do not contain the latest embedding features or
functionality. For the latest up-to-date embedding experience, see Embedding overview (p. 783)
Topics
• Embedding dashboards for everyone using GetDashboardEmbedURL (old API) (p. 859)
• Embedding dashboards for registered users using GetDashboardEmbedUrl (old API) (p. 868)
• Embedding the QuickSight console using GetSessionEmbedUrl (old API) (p. 878)
859
Amazon QuickSight User Guide
Embedding with the APIs
In the following sections, you can find detailed information on how to set up embedded Amazon
QuickSight dashboards for everyone (nonauthenticated users) using GetDashboardEmbedURL.
Topics
• Step 1: Set up permissions (p. 860)
• Step 2: Get the URL with the authentication code attached (p. 861)
• Step 3: Embed the dashboard URL (p. 866)
In the following section, you can find out how to set up permissions for the backend application or web
server. This task requires administrative access to IAM.
Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access and
permissions to the dashboard. To make this possible, create an IAM role in your AWS account. Associate
an IAM policy with the role to provide permissions to any user who assumes it.
The following sample policy provides these permissions for use with IdentityType=ANONYMOUS. For
this approach to work, you also need a session pack, or session capacity pricing, on your AWS account.
Otherwise, when a user tries to access the dashboard, the error UnsupportedPricingPlanException
is returned.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GetDashboardEmbedUrl",
"quickSight:GetAnonymousUserEmbedUrl"
],
"Resource": "*"
}
]
}
Your application's IAM identity must have a trust policy associated with it to allow access to the role
that you just created. This means that when a user accesses your application, your application can
860
Amazon QuickSight User Guide
Embedding with the APIs
assume the role on the user's behalf to open the dashboard. The following example shows a role called
QuickSightEmbeddingAnonymousPolicy, which has the sample policy preceding as its resource.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::11112222333:role/QuickSightEmbeddingAnonymousPolicy"
}
}
For more information regarding trust policies, see Temporary security credentials in IAM in the IAM User
Guide.
In the following section, you can find how to authenticate on behalf of the anonymous visitor and get
the embeddable dashboard URL on your application server.
When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user
to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID.
The following examples perform the IAM authentication on the user's behalf. It passes an identifier as
the unique role session ID. This code runs on your app server.
Java
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.quicksight.AmazonQuickSight;
import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;
import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlRequest;
import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlResult;
/**
* Class to call QuickSight AWS SDK to get url for dashboard embedding.
*/
public class GetQuicksightEmbedUrlNoAuth {
861
Amazon QuickSight User Guide
Embedding with the APIs
public GetQuicksightEmbedUrlNoAuth() {
this.quickSightClient = AmazonQuickSightClientBuilder
.standard()
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(new AWSCredentialsProvider() {
@Override
public AWSCredentials getCredentials() {
// provide actual IAM access key and secret
key here
return new BasicAWSCredentials("access-key",
"secret-key");
}
@Override
public void refresh() {}
}
)
.build();
}
GetDashboardEmbedUrlResult dashboardEmbedUrl =
quickSightClient.getDashboardEmbedUrl(getDashboardEmbedUrlRequest);
return dashboardEmbedUrl.getEmbedUrl();
}
}
JavaScript
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
function getDashboardEmbedURL(
accountId, // YOUR AWS ACCOUNT ID
dashboardId, // YOUR DASHBOARD ID TO EMBED
additionalDashboardIds, // ADDITIONAL DASHBOARD-1 ADDITIONAL DASHBOARD-2
quicksightNamespace, // VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING
resetDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE RESET BUTTON IN EMBEDDED
DASHBAORD
undoRedoDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE UNDO REDO BUTTONS IN
EMBEDDED DASHBAORD
getEmbedUrlCallback, // GETEMBEDURL SUCCESS CALLBACK METHOD
errorCallback // GETEMBEDURL ERROR CALLBACK METHOD
) {
862
Amazon QuickSight User Guide
Embedding with the APIs
const getDashboardParams = {
AwsAccountId: accountId,
DashboardId: dashboardId,
AdditionalDashboardIds: additionalDashboardIds,
Namespace: quicksightNamespace,
IdentityType: 'ANONYMOUS',
ResetDisabled: resetDisabled,
SessionLifetimeInMinutes: 600,
UndoRedoDisabled: undoRedoDisabled
};
Python3
import json
import boto3
from botocore.exceptions import ClientError
import time
863
Amazon QuickSight User Guide
Embedding with the APIs
UndoRedoDisabled = undoRedoDisabled,
ResetDisabled = resetDisabled
)
return {
'statusCode': 200,
'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow-
Headers": "Content-Type"},
'body': json.dumps(response),
'isBase64Encoded': bool('false')
}
except ClientError as e:
print(e)
return "Error generating embeddedURL: " + str(e)
Node.js
The following example shows the JavaScript (Node.js) that you can use on the app server to get
the URL for the embedded dashboard. You can use this URL in your website or app to display the
dashboard.
Example
quicksight.getDashboardEmbedUrl({
'AwsAccountId': '111122223333',
'DashboardId': 'dashboard-id',
'AdditionalDashboardIds': 'added-dashboard-id-1 added-dashboard-id-2
added-dashboard-id-3'
'Namespace' : 'default',
'IdentityType': 'ANONYMOUS',
'SessionLifetimeInMinutes': 100,
'UndoRedoDisabled': false,
'ResetDisabled': true
}, function(err, data) {
console.log('Errors: ');
console.log(err);
console.log('Response: ');
console.log(data);
});
Example
//The URL returned is over 900 characters. For this example, we've shortened the string
for
//readability and added ellipsis to indicate that it's incomplete.
{ Status: 200,
EmbedUrl: 'https://dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d…
RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' }
.NET/C#
The following example shows the .NET/C# code that you can use on the app server to get the URL
for the embedded dashboard. You can use this URL in your website or app to display the dashboard.
864
Amazon QuickSight User Guide
Embedding with the APIs
Example
AWS CLI
To assume the role, choose one of the following AWS Security Token Service (AWS STS) API
operations:
• AssumeRole – Use this operation when you are using an IAM identity to assume the role.
• AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to
authenticate your user.
• AssumeRoleWithSaml – Use this operation when you are using Security Assertion Markup
Language (SAML) to authenticate your users.
The following example shows the CLI command to set the IAM role. The role needs to have
permissions enabled for quicksight:GetDashboardEmbedURL.
The assume-role operation returns three output parameters: the access key, the secret key, and
the session token.
Note
If you get an ExpiredToken error when calling the AssumeRole operation, this is probably
because the previous SESSION TOKEN is still in the environment variables. Clear this by
setting the following variables:
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN
865
Amazon QuickSight User Guide
Embedding with the APIs
The following example shows how to set these three parameters in the CLI. If you are using a
Microsoft Windows machine, use set instead of export.
Running these commands sets the role session ID of the user visiting your website to
embedding_quicksight_dashboard_role/QuickSightEmbeddingAnonymousPolicy. The
role session ID is made up of the role name from role-arn and the role-session-name value.
Using the unique role session ID for each user ensures that appropriate permissions are set for each
visiting user. It also keeps each session separate and distinct. If you're using an array of web servers,
for example for load balancing, and a session is reconnected to a different server, a new session
begins.
To get a signed URL for the dashboard, call get-dashboard-embed-url from the app server. This
returns the embeddable dashboard URL. The following example shows how to get the URL for an
embedded dashboard using a server-side call for users who are making anonymous visits to your
web portal or app.
For more information on using this operation, see GetDashboardEmbedUrl. You can use this and
other API operations in your own code.
In the following section, you can find out how you can use the QuickSight embedding SDK (JavaScript) to
embed the dashboard URL from step 2 in your website or application page. With the SDK, you can do the
following:
866
Amazon QuickSight User Guide
Embedding with the APIs
Call the GetDashboardEmbedUrl API operation to get the URL that you can embed in your app. This
URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The API operation provides the
URL with an auth_code that enables a single-sign on session.
//The URL returned is over 900 characters. For this example, we've shortened the string for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https: //dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
Embed this dashboard in your web page by using the QuickSight Embedding SDK or by adding this URL
into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't
change your visual as your window resizes. If you set a relative percent height and width, QuickSight
provides a responsive layout that is modified as your window size changes. By using the QuickSight
Embedding SDK, you can also control parameters within the dashboard and receive callbacks in terms of
page load completion and errors.
The following example shows how to use the generated URL. This code resides on your app server.
<!DOCTYPE html>
<html>
<head>
<title>Basic Embed</title>
<!-- You can download the latest QuickSight embedding SDK version from https://
www.npmjs.com/package/amazon-quicksight-embedding-sdk -->
<!-- Or you can do "npm install amazon-quicksight-embedding-sdk", if you use npm for
javascript dependencies -->
<script src="./quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">
var dashboard;
function embedDashboard() {
var containerDiv = document.getElementById("embeddingContainer");
var options = {
// replace this dummy url with the one generated via embedding API
url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/
dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode",
container: containerDiv,
scrolling: "no",
height: "700px",
width: "1000px",
footerPaddingEnabled: true
};
dashboard = QuickSightEmbedding.embedDashboard(options);
}
</script>
</head>
<body onload="embedDashboard()">
<div id="embeddingContainer"></div>
</body>
867
Amazon QuickSight User Guide
Embedding with the APIs
</html>
For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the
embedded dashboard on your website using JavaScript. To get your copy, do one of the following:
• Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a
group of QuickSight developers.
• Download the latest QuickSight embedding SDK version from https://www.npmjs.com/package/
amazon-quicksight-embedding-sdk.
• If you use npm for JavaScript dependencies, download and install it by running the following
command.
In the following sections, you can find detailed information on how to set up embedded Amazon
QuickSight dashboards for registered users using GetDashboardEmbedUrl.
Topics
• Step 1: Set up permissions (p. 868)
• Step 2: Get the URL with the authentication code attached (p. 870)
• Step 3: Embed the dashboard URL (p. 876)
In the following section, you can find out how to set up permissions for the backend application or web
server. This task requires administrative access to IAM.
Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access
and permissions to the dashboard. To make this possible, create an IAM role in your AWS
account. Associate an IAM policy with the role to provide permissions to any user who assumes
it. The IAM role needs to provide permissions to retrieve dashboard URLs. For this, you add
quicksight:GetDashboardEmbedUrl.
The following sample policy provides these permissions for use with IdentityType=IAM.
868
Amazon QuickSight User Guide
Embedding with the APIs
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GetDashboardEmbedUrl"
],
"Resource": "*"
}
]
}
The following sample policy provides permission to retrieve a dashboard URL. You use the policy with
quicksight:RegisterUser if you are creating first-time users who are to be QuickSight readers.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "quicksight:RegisterUser",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "quicksight:GetDashboardEmbedUrl",
"Resource": "*",
"Effect": "Allow"
}
]
}
If you use QUICKSIGHT as your identityType and provide the user's Amazon Resource Name (ARN),
you also need to allow the quicksight:GetAuthCode action in your policy. The following sample
policy provides this permission.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GetDashboardEmbedUrl",
"quicksight:GetAuthCode"
],
"Resource": "*"
}
]
}
Your application's IAM identity must have a trust policy associated with it to allow access to the role that
you just created. This means that when a user accesses your application, your application can assume the
role on the user's behalf and provision the user in QuickSight. The following example shows a role called
embedding_quicksight_dashboard_role, which has the sample policy preceding as its resource.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::11112222333:role/embedding_quicksight_dashboard_role"
}
869
Amazon QuickSight User Guide
Embedding with the APIs
For more information regarding trust policies for OpenID Connect or SAML authentication, see the
following sections of the IAM User Guide:
In the following section, you can find out how to authenticate your user and get the embeddable
dashboard URL on your application server.
When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user
to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID.
Performing the described steps ensures that each viewer of the dashboard is uniquely provisioned in
QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for
parameters.
The following examples perform the IAM authentication on the user's behalf. This code runs on your app
server.
Java
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicSessionCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.quicksight.AmazonQuickSight;
import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;
import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlRequest;
import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlResult;
import com.amazonaws.services.securitytoken.AWSSecurityTokenService;
import com.amazonaws.services.securitytoken.model.AssumeRoleRequest;
import com.amazonaws.services.securitytoken.model.AssumeRoleResult;
/**
* Class to call QuickSight AWS SDK to get url for dashboard embedding.
*/
public class GetQuicksightEmbedUrlIAMAuth {
870
Amazon QuickSight User Guide
Embedding with the APIs
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(new AWSCredentialsProvider() {
@Override
public AWSCredentials getCredentials() {
// provide actual IAM access key and secret
key here
return new BasicAWSCredentials("access-key",
"secret-key");
}
@Override
public void refresh() {}
}
)
.build();
this.awsSecurityTokenService = awsSecurityTokenService;
}
GetDashboardEmbedUrlResult dashboardEmbedUrl =
quickSightClient.getDashboardEmbedUrl(getDashboardEmbedUrlRequest);
return dashboardEmbedUrl.getEmbedUrl();
}
}
JavaScript
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
871
Amazon QuickSight User Guide
Embedding with the APIs
function getDashboardEmbedURL(
accountId, // YOUR AWS ACCOUNT ID
dashboardId, // YOUR DASHBOARD ID TO EMBED
openIdToken, // TOKEN TO ASSUME ROLE WITH ROLEARN
roleArn, // IAM USER ROLE TO USE FOR EMBEDDING
sessionName, // SESSION NAME FOR THE ROLEARN ASSUME ROLE
resetDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE RESET BUTTON IN EMBEDDED
DASHBAORD
undoRedoDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE UNDO REDO BUTTONS IN
EMBEDDED DASHBAORD
getEmbedUrlCallback, // GETEMBEDURL SUCCESS CALLBACK METHOD
errorCallback // GETEMBEDURL ERROR CALLBACK METHOD
) {
const stsClient = new AWS.STS();
let stsParams = {
RoleSessionName: sessionName,
WebIdentityToken: openIdToken,
RoleArn: roleArn
}
quicksightGetDashboard.getDashboardEmbedUrl(getDashboardParams,
function(err, data) {
if (err) {
console.log(err, err.stack);
errorCallback(err);
} else {
const result = {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE
DOMAIN TO SECURE ACCESS TO GETEMBEDURL API
"Access-Control-Allow-Headers": "Content-Type"
},
"body": JSON.stringify(data),
"isBase64Encoded": false
}
getEmbedUrlCallback(result);
}
});
}
});
872
Amazon QuickSight User Guide
Embedding with the APIs
Python3
import json
import boto3
from botocore.exceptions import ClientError
response = quickSight.get_dashboard_embed_url(
AwsAccountId = accountId,
DashboardId = dashboardId,
IdentityType = 'IAM',
SessionLifetimeInMinutes = 600,
UndoRedoDisabled = undoRedoDisabled,
ResetDisabled = resetDisabled
)
return {
'statusCode': 200,
'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow-
Headers": "Content-Type"},
'body': json.dumps(response),
'isBase64Encoded': bool('false')
}
except ClientError as e:
return "Error generating embeddedURL: " + str(e)
Node.js
The following example shows the JavaScript (Node.js) that you can use on the app server to get
the URL for the embedded dashboard. You can use this URL in your website or app to display the
dashboard.
873
Amazon QuickSight User Guide
Embedding with the APIs
Example
quicksight.getDashboardEmbedUrl({
'AwsAccountId': '111122223333',
'DashboardId': '1c1fe111-e2d2-3b30-44ef-a0e111111cde',
'IdentityType': 'IAM',
'ResetDisabled': true,
'SessionLifetimeInMinutes': 100,
'UndoRedoDisabled': false,
'StatePersistenceEnabled': true
}, function(err, data) {
console.log('Errors: ');
console.log(err);
console.log('Response: ');
console.log(data);
});
Example
//The URL returned is over 900 characters. For this example, we've shortened the string
for
//readability and added ellipsis to indicate that it's incomplete.
{ Status: 200,
EmbedUrl: 'https://dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d…
RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' }
.NET/C#
The following example shows the .NET/C# code that you can use on the app server to get the URL
for the embedded dashboard. You can use this URL in your website or app to display the dashboard.
Example
874
Amazon QuickSight User Guide
Embedding with the APIs
}).Result.EmbedUrl
);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
AWS CLI
To assume the role, choose one of the following AWS Security Token Service (AWS STS) API
operations:
• AssumeRole – Use this operation when you are using an IAM identity to assume the role.
• AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to
authenticate your user.
• AssumeRoleWithSaml – Use this operation when you are using SAML to authenticate your users.
The following example shows the CLI command to set the IAM role. The role needs to have
permissions enabled for quicksight:GetDashboardEmbedURL. If you are taking a just-in-time
approach to add users when they first open a dashboard, the role also needs permissions enabled for
quicksight:RegisterUser.
The assume-role operation returns three output parameters: the access key, the secret key, and
the session token.
Note
If you get an ExpiredToken error when calling the AssumeRole operation, this is probably
because the previous SESSION TOKEN is still in the environment variables. Clear this by
setting the following variables:
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN
The following example shows how to set these three parameters in the CLI. If you are using a
Microsoft Windows machine, use set instead of export.
Running these commands sets the role session ID of the user visiting your website to
embedding_quicksight_dashboard_role/[email protected]. The role session ID is
made up of the role name from role-arn and the role-session-name value. Using the unique
role session ID for each user ensures that appropriate permissions are set for each user. It also
prevents any throttling of user access. Throttling is a security feature that prevents the same user
from accessing QuickSight from multiple locations.
The role session ID also becomes the user name in QuickSight. You can use this pattern to provision
your users in QuickSight ahead of time, or to provision them the first time they access the
dashboard.
875
Amazon QuickSight User Guide
Embedding with the APIs
The following example shows the CLI command that you can use to provision a user. For more
information about RegisterUser, DescribeUser, and other QuickSight API operations, see the
QuickSight API reference.
If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set
them up. Instead, they should be automatically subscribed the first time they access QuickSight. For
Microsoft AD users, you can use DescribeUser to get the user ARN.
The first time a user accesses QuickSight, you can also add this user to the group that the dashboard
is shared with. The following example shows the CLI command to add a user to a group.
You now have a user of your app who is also a user of QuickSight, and who has access to the
dashboard.
Finally, to get a signed URL for the dashboard, call get-dashboard-embed-url from the app
server. This returns the embeddable dashboard URL. The following example shows how to get the
URL for an embedded dashboard using a server-side call for users authenticated through AWS
Managed Microsoft AD or SSO.
For more information on using this operation, see GetDashboardEmbedUrl. You can use this and
other API operations in your own code.
876
Amazon QuickSight User Guide
Embedding with the APIs
embedding capabilities. For the latest up-to-date embedding experience, see Embedding
overview (p. 783).
In the following section, you can find out how you can use the Amazon QuickSight embedding SDK
(JavaScript) to embed the dashboard URL from step 3 in your website or application page. With the SDK,
you can do the following:
Call the GetDashboardEmbedUrl API operation to get the URL that you can embed in your app. This
URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The API operation provides the
URL with an auth_code that enables a single-sign on session.
//The URL returned is over 900 characters. For this example, we've shortened the string for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https: //dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
Embed this dashboard in your webpage by using the QuickSight embedding SDK or by adding this URL
into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't
change your visual as your window resizes. If you set a relative percent height and width, QuickSight
provides a responsive layout that is modified as your window size changes. By using the Amazon
QuickSight Embedding SDK, you can also control parameters within the dashboard and receive callbacks
in terms of page load completion and errors.
The following example shows how to use the generated URL. This code is generated on your app server.
<!DOCTYPE html>
<html>
<head>
<title>Basic Embed</title>
<script src="./quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">
var dashboard;
function embedDashboard() {
var containerDiv = document.getElementById("embeddingContainer");
var options = {
// replace this dummy url with the one generated via embedding API
url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/
dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode",
container: containerDiv,
scrolling: "no",
height: "700px",
width: "1000px",
footerPaddingEnabled: true
};
dashboard = QuickSightEmbedding.embedDashboard(options);
}
</script>
877
Amazon QuickSight User Guide
Embedding with the APIs
</head>
<body onload="embedDashboard()">
<div id="embeddingContainer"></div>
</body>
</html>
For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the
embedded dashboard on your website using JavaScript. To get your copy, do one of the following:
• Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a
group of QuickSight developers.
• Download the latest embedding SDK version from https://www.npmjs.com/package/amazon-
quicksight-embedding-sdk.
• If you use npm for JavaScript dependencies, download and install it by running the following
command.
In the following sections, you can find detailed information on how to provide the Amazon
QuickSight console experience in a custom-branded authoring portal for registered users using the
GetSessionEmbedUrl API.
Topics
• Step 1: Set up permissions (p. 878)
• Step 2: Get the URL with the authentication code attached (p. 880)
• Step 3: Embed the console session URL (p. 885)
878
Amazon QuickSight User Guide
Embedding with the APIs
In the following section, you can find out how to set up permissions for the backend application or web
server. This task requires administrative access to IAM.
Each user who accesses a QuickSight assumes a role that gives them Amazon QuickSight access
and permissions to the console session. To make this possible, create an IAM role in your AWS
account. Associate an IAM policy with the role to provide permissions to any user who assumes it.
Add quicksight:RegisterUser permissions to ensure that the reader can access QuickSight
in a read-only fashion, and not have access to any other data or creation capability. The IAM
role also needs to provide permissions to retrieve console session URLs. For this, you add
quicksight:GetSessionEmbedUrl.
The following sample policy provides these permissions for use with IdentityType=IAM.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "quicksight:RegisterUser",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "quicksight:GetSessionEmbedUrl",
"Resource": "*",
"Effect": "Allow"
}
]
}
The following sample policy provides permission to retrieve a console session URL. You use the policy
without quicksight:RegisterUser if you are creating users before they access an embedded session.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GetSessionEmbedUrl"
],
"Resource": "*"
}
]
}
If you use QUICKSIGHT as your identityType and provide the user's Amazon Resource Name (ARN),
you also need to allow the quicksight:GetAuthCode action in your policy. The following sample
policy provides this permission.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:GetSessionEmbedUrl",
"quicksight:GetAuthCode"
],
"Resource": "*"
}
]
879
Amazon QuickSight User Guide
Embedding with the APIs
Your application's IAM identity must have a trust policy associated with it to allow access to the role that
you just created. This means that when a user accesses your application, your application can assume
the role on the user's behalf and provision the user in QuickSight. The following example shows a role
called embedding_quicksight_console_session_role, which has the sample policy preceding as
its resource.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource":
"arn:aws:iam::11112222333:role/embedding_quicksight_console_session_role"
}
}
For more information regarding trust policies for OpenID Connect or SAML authentication, see the
following sections of the IAM User Guide:
In the following section, you can find out how to authenticate your user and get the embeddable console
session URL on your application server.
When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user
to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID.
Performing the described steps ensures that each viewer of the console session is uniquely provisioned
in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for
parameters.
The following examples perform the IAM authentication on the user's behalf. This code runs on your app
server.
Java
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.quicksight.AmazonQuickSight;
import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;
import com.amazonaws.services.quicksight.model.GetSessionEmbedUrlRequest;
import com.amazonaws.services.quicksight.model.GetSessionEmbedUrlResult;
880
Amazon QuickSight User Guide
Embedding with the APIs
/**
* Class to call QuickSight AWS SDK to get url for session embedding.
*/
public class GetSessionEmbedUrlQSAuth {
public GetSessionEmbedUrlQSAuth() {
this.quickSightClient = AmazonQuickSightClientBuilder
.standard()
.withRegion(Regions.US_EAST_1.getName())
.withCredentials(new AWSCredentialsProvider() {
@Override
public AWSCredentials getCredentials() {
// provide actual IAM access key and secret
key here
return new BasicAWSCredentials("access-key",
"secret-key");
}
@Override
public void refresh() {}
}
)
.build();
}
GetSessionEmbedUrlResult sessionEmbedUrl =
quickSightClient.getSessionEmbedUrl(getSessionEmbedUrlRequest);
return sessionEmbedUrl.getEmbedUrl();
}
}
JavaScript
global.fetch = require('node-fetch');
const AWS = require('aws-sdk');
function getSessionEmbedURL(
accountId, // YOUR AWS ACCOUNT ID
userArn, // REGISTERED USER ARN TO USE FOR EMBEDDING. REFER TO GETEMBEDURL SECTION
IN DEV PORTAL TO FIND OUT HOW TO GET USER ARN FOR A QUICKSIGHT USER
getEmbedUrlCallback, // GETEMBEDURL SUCCESS CALLBACK METHOD
errorCallback // GETEMBEDURL ERROR CALLBACK METHOD
) {
const getSessionParams = {
AwsAccountId: accountId,
EntryPoint: "/start",
UserArn: userArn,
SessionLifetimeInMinutes: 600,
};
881
Amazon QuickSight User Guide
Embedding with the APIs
Python3
import json
import boto3
from botocore.exceptions import ClientError
import time
return {
'statusCode': 200,
'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow-
Headers": "Content-Type"},
'body': json.dumps(response),
'isBase64Encoded': bool('false')
}
except ClientError as e:
print(e)
return "Error generating embeddedURL: " + str(e)
Node.js
The following example shows the JavaScript (Node.js) that you can use on the app server to get the
URL for the embedded console session. You can use this URL in your website or app to display the
console session.
882
Amazon QuickSight User Guide
Embedding with the APIs
Example
quicksight.GetSessionEmbedUrl({
'AwsAccountId': '111122223333',
'EntryPoint': 'https://url-for-console-page-to-open',
'SessionLifetimeInMinutes': 600,
'UserArn': 'USER_ARN'
}, function(err, data) {
console.log('Errors: ');
console.log(err);
console.log('Response: ');
console.log(data);
});
Example
//The URL returned is over 900 characters. For this example, we've shortened the string
for
//readability and added ellipsis to indicate that it's incomplete.
{ Status: 200,
EmbedUrl: 'https://dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d…
RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' }
.NET/C#
The following example shows the .NET/C# code that you can use on the app server to get the
URL for the embedded console session. You can use this URL in your website or app to display the
console.
Example
883
Amazon QuickSight User Guide
Embedding with the APIs
AWS CLI
To assume the role, choose one of the following AWS Security Token Service (AWS STS) API
operations:
• AssumeRole – Use this operation when you are using an IAM identity to assume the role.
• AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to
authenticate your user.
• AssumeRoleWithSaml – Use this operation when you are using SAML to authenticate your users.
The following example shows the CLI command to set the IAM role. The role needs to have
permissions enabled for quicksight:GetSessionEmbedUrl. If you are taking a just-in-time
approach to add users when they first open QuickSight, the role also needs permissions enabled for
quicksight:RegisterUser.
The assume-role operation returns three output parameters: the access key, the secret key, and
the session token.
Note
If you get an ExpiredToken error when calling the AssumeRole operation, this is probably
because the previous SESSION TOKEN is still in the environment variables. Clear this by
setting the following variables:
• AWS_ACCESS_KEY_ID
• AWS_SECRET_ACCESS_KEY
• AWS_SESSION_TOKEN
The following example shows how to set these three parameters in the CLI. If you are using a
Microsoft Windows machine, use set instead of export.
Running these commands sets the role session ID of the user visiting your website to
embedding_quicksight_console_session_role/[email protected]. The role session
ID is made up of the role name from role-arn and the role-session-name value. Using the
unique role session ID for each user ensures that appropriate permissions are set for each user. It
also prevents any throttling of user access. Throttling is a security feature that prevents the same
user from accessing QuickSight from multiple locations.
The role session ID also becomes the user name in QuickSight. You can use this pattern to provision
your users in QuickSight ahead of time, or to provision them the first time they access a console
session.
The following example shows the CLI command that you can use to provision a user. For more
information about RegisterUser, DescribeUser, and other QuickSight API operations, see the
QuickSight API reference.
884
Amazon QuickSight User Guide
Embedding with the APIs
If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set
them up. Instead, they should be automatically subscribed the first time they access QuickSight. For
Microsoft AD users, you can use DescribeUser to get the user ARN.
The first time a user accesses QuickSight, you can also add this user to the appropriate group. The
following example shows the CLI command to add a user to a group.
You now have a user of your app who is also a user of QuickSight, and who has access to the
QuickSight console session.
Finally, to get a signed URL for the console session, call get-session-embed-url from the app
server. This returns the embeddable console session URL. The following example shows how to get
the URL for an embedded console session using a server-side call for users authenticated through
AWS Managed Microsoft AD or Single Sign-on (SSO).
For more information on using this operation, see GetSessionEmbedUrl. You can use this and other
API operations in your own code.
In the following section, you can find out how you can use the Amazon QuickSight embedding SDK
(JavaScript) to embed the console session URL from step 3 in your website or application page. With the
SDK, you can do the following:
885
Amazon QuickSight User Guide
Embedding with the APIs
• Handle error states with messages that are customized to your application.
Call the GetSessionEmbedUrl API operation to get the URL that you can embed in your app. This URL
is valid for 5 minutes, and the resulting session is valid for 10 hours. The API operation provides the URL
with an auth_code that enables a single-sign on session.
//The URL returned is over 900 characters. For this example, we've shortened the string for
//readability and added ellipsis to indicate that it's incomplete.
{
"Status": "200",
"EmbedUrl": "https: //dashboards.example.com/
embed/620bef10822743fab329fb3751187d2d...",
"RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713"
}
Embed this console session in your webpage by using the QuickSight Embedding SDK or by adding
this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those
and doesn't change your visual as your window resizes. If you set a relative percent height and width,
QuickSight provides a responsive layout that is modified as your window size changes. By using the
Amazon QuickSight Embedding SDK, you can also control parameters within the console session and
receive callbacks in terms of page load completion and errors.
The following example shows how to use the generated URL. This code is generated on your app server.
<!DOCTYPE html>
<html>
<head>
<title>Basic Embed</title>
<script src="./quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">
var dashboard;
function embedDashboard() {
var containerDiv = document.getElementById("embeddingContainer");
var options = {
// replace this dummy url with the one generated via embedding API
url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/
dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode",
container: containerDiv,
scrolling: "no",
height: "700px",
width: "1000px",
footerPaddingEnabled: true
};
dashboard = QuickSightEmbedding.embedDashboard(options);
}
</script>
</head>
<body onload="embedDashboard()">
<div id="embeddingContainer"></div>
</body>
</html>
For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the
embedded console session on your website using JavaScript. To get your copy, do one of the following:
886
Amazon QuickSight User Guide
Embedding with the APIs
• Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a
group of QuickSight developers.
• Download the latest embedding SDK version from https://www.npmjs.com/package/amazon-
quicksight-embedding-sdk.
• If you use npm for JavaScript dependencies, download and install it by running the following
command.
887
Amazon QuickSight User Guide
Resolving Amazon QuickSight issues and error messages
Topics
• Resolving Amazon QuickSight issues and error messages (p. 888)
• Connectivity issues when using Amazon Athena with Amazon QuickSight (p. 888)
• Data source connectivity issues for Amazon QuickSight (p. 895)
• Login issues with Amazon QuickSight (p. 904)
• Visual issues with Amazon QuickSight (p. 910)
• For errors during dataset ingestion (importing data), see SPICE ingestion error codes (p. 142).
• For technical user questions, visit the User Community.
• For administrator questions, see the AWS forums.
• If you need more customized assistance, contact AWS Support. To do this while you are signed in to
your AWS account, choose Support at upper right, and then choose Support Center.
Before you try troubleshooting anything else for Athena, make sure that you can connect to Athena.
For information about troubleshooting Athena connection issues, see I can't connect to Amazon
Athena (p. 897).
If you can connect but have other issues, it can be useful to run your query in the Athena console
(https://console.aws.amazon.com/athena/) before adding your query to Amazon QuickSight. For
additional troubleshooting information, see Troubleshooting in the Athena User Guide.
Topics
• Column not found when using Athena with Amazon QuickSight (p. 889)
• Invalid data when using Athena with Amazon QuickSight (p. 889)
888
Amazon QuickSight User Guide
Athena column not found
• Query timeout when using Athena with Amazon QuickSight (p. 889)
• Staging bucket no longer exists when using Athena with Amazon QuickSight (p. 890)
• Table incompatible when using AWS Glue with Athena in Amazon QuickSight (p. 890)
• Table not found when using Athena with Amazon QuickSight (p. 894)
• Workgroup and output errors when using Athena with Amazon QuickSight (p. 895)
In Amazon QuickSight, open your analysis. On the Visualize tab, choose Choose dataset, Edit analysis
data sets.
On the Data sets in this analysis screen, choose Edit near your dataset to refresh the dataset. Amazon
QuickSight caches the schema for two minutes. So it can take two minutes before the latest changes
display.
To investigate how the column was lost in the first place, you can go to the Athena console (https://
console.aws.amazon.com/athena/) and check the query history to find queries that edited the table.
If this error happened when you were editing a custom SQL query in preview, verify that the name of the
column in the query, and check for any other syntax errors. For example, check that the column name
isn't enclosed in single quotation marks, which are reserved for strings.
If you still have the issue, verify that your tables, columns, and queries comply with Athena requirements.
For more information, see Names for Tables, Databases, and Columns and Troubleshooting in the Athena
User Guide.
For example, suppose that you are using the function parseDate(expression, [‘format’],
[‘time_zone’]) as parseDate(date_column, ‘MM/dd/yyyy’). In this case, all values in
date_column must conform to 'MM/dd/yyyy' format (’05/12/2016’). Any value that isn't in this
format (‘2016/12/05’) can cause an error.
If the failure was generated while working on an analysis, remember that the Amazon QuickSight
timeout for generating any visual is two minutes. If you're using a custom SQL query, you can simplify
your query to optimize running time.
If you are in direct query mode (not using SPICE), you can try importing your data to SPICE. However, if
your query exceeds the Athena 30-minute timeout, you might get another timeout while importing data
889
Amazon QuickSight User Guide
Athena staging bucket missing
into SPICE. For the most current information on Athena limits, see Amazon Athena Limits in the AWS
General Reference.
When you create a dataset using Athena, Amazon QuickSight creates an Amazon S3 bucket. By default,
this bucket has a name similar to "aws-athena-query-results-<REGION>-<ACCOUNTID>". If you
remove this bucket, then your next Athena query might fail with an error saying the staging bucket no
longer exists.
To fix this error, create a new bucket with the same name in the correct AWS Region.
If you don't want to migrate to the AWS Glue Data Catalog at this time, you have two options. You can
recreate each AWS Glue table through the AWS Glue Management Console. Or you can use the AWS
CLI scripts listed in the following procedure to identify and update tables with missing TableType
attributes.
If you prefer to use the CLI to do this, use the following procedure to help you design your scripts.
1. Use the CLI to learn which AWS Glue tables have no TableType attributes.
For example, you can run the following command in the CLI.
Following is a sample of what the output looks like. You can see that the table
"table_missing_table_type" doesn't have the TableType attribute declared.
{
"TableList": [
{
"Retention": 0,
"UpdateTime": 1522368588.0,
"PartitionKeys": [
{
"Name": "year",
"Type": "string"
},
890
Amazon QuickSight User Guide
AWS Glue table incompatible with Athena
{
"Name": "month",
"Type": "string"
},
{
"Name": "day",
"Type": "string"
}
],
"LastAccessTime": 1513804142.0,
"Owner": "owner",
"Name": "table_missing_table_type",
"Parameters": {
"delimiter": ",",
"compressionType": "none",
"skip.header.line.count": "1",
"sizeKey": "75",
"averageRecordSize": "7",
"classification": "csv",
"objectCount": "1",
"typeOfData": "file",
"CrawlerSchemaDeserializerVersion": "1.0",
"CrawlerSchemaSerializerVersion": "1.0",
"UPDATED_BY_CRAWLER": "crawl_date_table",
"recordCount": "9",
"columnsOrdered": "true"
},
"StorageDescriptor": {
"OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
"SortColumns": [],
"StoredAsSubDirectories": false,
"Columns": [
{
"Name": "col1",
"Type": "string"
},
{
"Name": "col2",
"Type": "bigint"
}
],
"Location": "s3://myAthenatest/test_dataset/",
"NumberOfBuckets": -1,
"Parameters": {
"delimiter": ",",
"compressionType": "none",
"skip.header.line.count": "1",
"columnsOrdered": "true",
"sizeKey": "75",
"averageRecordSize": "7",
"classification": "csv",
"objectCount": "1",
"typeOfData": "file",
"CrawlerSchemaDeserializerVersion": "1.0",
"CrawlerSchemaSerializerVersion": "1.0",
"UPDATED_BY_CRAWLER": "crawl_date_table",
"recordCount": "9"
},
"Compressed": false,
"BucketColumns": [],
"InputFormat": "org.apache.hadoop.mapred.TextInputFormat",
"SerdeInfo": {
"Parameters": {
"field.delim": ","
},
"SerializationLibrary": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"
891
Amazon QuickSight User Guide
AWS Glue table incompatible with Athena
}
}
}
]
}
2. Edit the table definition in your editor to add "TableType": "EXTERNAL_TABLE" to the table
definition, as shown in the following example.
{
"Table": {
"Retention": 0,
"TableType": "EXTERNAL_TABLE",
"PartitionKeys": [
{
"Name": "year",
"Type": "string"
},
{
"Name": "month",
"Type": "string"
},
{
"Name": "day",
"Type": "string"
}
],
"UpdateTime": 1522368588.0,
"Name": "table_missing_table_type",
"StorageDescriptor": {
"BucketColumns": [],
"SortColumns": [],
"StoredAsSubDirectories": false,
"OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
"SerdeInfo": {
"SerializationLibrary": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
"Parameters": {
"field.delim": ","
}
},
"Parameters": {
"classification": "csv",
"CrawlerSchemaSerializerVersion": "1.0",
"UPDATED_BY_CRAWLER": "crawl_date_table",
"columnsOrdered": "true",
"averageRecordSize": "7",
"objectCount": "1",
"sizeKey": "75",
"delimiter": ",",
"compressionType": "none",
"recordCount": "9",
"CrawlerSchemaDeserializerVersion": "1.0",
"typeOfData": "file",
"skip.header.line.count": "1"
},
"Columns": [
{
"Name": "col1",
"Type": "string"
},
{
"Name": "col2",
"Type": "bigint"
}
],
892
Amazon QuickSight User Guide
AWS Glue table incompatible with Athena
"Compressed": false,
"InputFormat": "org.apache.hadoop.mapred.TextInputFormat",
"NumberOfBuckets": -1,
"Location": "s3://myAthenatest/test_date_part/"
},
"Owner": "owner",
"Parameters": {
"classification": "csv",
"CrawlerSchemaSerializerVersion": "1.0",
"UPDATED_BY_CRAWLER": "crawl_date_table",
"columnsOrdered": "true",
"averageRecordSize": "7",
"objectCount": "1",
"sizeKey": "75",
"delimiter": ",",
"compressionType": "none",
"recordCount": "9",
"CrawlerSchemaDeserializerVersion": "1.0",
"typeOfData": "file",
"skip.header.line.count": "1"
},
"LastAccessTime": 1513804142.0
}
}
3. You can adapt the following script to update the table input, so that it includes the TableType
attribute.
893
Amazon QuickSight User Guide
Athena Table not found
"Parameters": {
"classification": "csv",
"CrawlerSchemaSerializerVersion": "1.0",
"UPDATED_BY_CRAWLER": "crawl_date_table",
"columnsOrdered": "true",
"averageRecordSize": "7",
"objectCount": "1",
"sizeKey": "75",
"delimiter": ",",
"compressionType": "none",
"recordCount": "9",
"CrawlerSchemaDeserializerVersion": "1.0",
"typeOfData": "file",
"skip.header.line.count": "1"
},
"Columns": [
{
"Name": "col1",
"Type": "string"
},
{
"Name": "col2",
"Type": "bigint"
}
],
"Compressed": false,
"InputFormat": "org.apache.hadoop.mapred.TextInputFormat",
"NumberOfBuckets": -1,
"Location": "s3://myAthenatest/test_date_part/"
},
"Owner": "owner",
"Parameters": {
"classification": "csv",
"CrawlerSchemaSerializerVersion": "1.0",
"UPDATED_BY_CRAWLER": "crawl_date_table",
"columnsOrdered": "true",
"averageRecordSize": "7",
"objectCount": "1",
"sizeKey": "75",
"delimiter": ",",
"compressionType": "none",
"recordCount": "9",
"CrawlerSchemaDeserializerVersion": "1.0",
"typeOfData": "file",
"skip.header.line.count": "1"
},
"LastAccessTime": 1513804142.0
}'
In the Athena console (https://console.aws.amazon.com/athena/), check for your table under the
corresponding schema. You can recreate the table in Athena and then create a new dataset in Amazon
QuickSight on that table. To investigate how the table was lost in the first place, you can use the Athena
console to check the query history. Doing this helps you find the queries that dropped the table.
894
Amazon QuickSight User Guide
Workgroup and output errors when
using Athena with Amazon QuickSight
If this error happened when you were editing a custom SQL query in preview, verify that the name of the
table in the query, and check for any other syntax errors. Amazon QuickSight can't infer the schema from
the query. The schema must be specified in the query.
If you still have the issue, verify that your tables, columns, and queries comply with Athena requirements.
For more information, see Names for Tables, Databases, and Columns and Troubleshooting in the Athena
User Guide.
• The Athena workgroup that's associated with the data source must exist.
To fix this, you can return to the Athena data source settings and choose a different workgroup. For
more information, see Setting Up Workgroups in the Athena User Guide.
Another solution is to have the AWS account administrator recreate the workgroup in the Athena
console.
• The Athena workgroup that's associated with the data source must be enabled.
An AWS account administrator needs to enable the workgroup in the Athena console. Open the
Athena console by using this direct link: https://console.aws.amazon.com/athena/. Then choose the
appropriate workgroup in the Workgroup panel and view its settings. Choose Enable workgroup.
• Make sure that you have access to the Amazon S3 output location that's associated with the Athena
workgroup.
To grant Amazon QuickSight permissions to access the S3 output location, the Amazon QuickSight
administrator can edit Security & Permissions in the Manage QuickSight screen.
• The Athena workgroup must have an associated S3 output location.
An AWS account administrator needs to associate an S3 bucket with the workgroup in the Athena
console. Open the Athena console by using this direct link: https://console.aws.amazon.com/athena/.
Then choose the appropriate workgroup in the Workgroup panel and view its settings. Set Query
result location.
895
Amazon QuickSight User Guide
I can't connect although my data source
connection options look right (SSL)
Topics
• I can't connect although my data source connection options look right (SSL) (p. 896)
• I can't connect to Amazon Athena (p. 897)
• I can't connect to Amazon S3 (p. 900)
• I can't create or refresh a dataset from an existing Adobe Analytics data source (p. 902)
• I need to validate the connection to my data source, or change data source settings (p. 902)
• I can't connect to MySQL (issues with SSL and authorization) (p. 902)
• I can't connect to RDS (p. 904)
• You can connect to your database in other ways or from other locations but not in this case.
• You can connect to a similar database but not this one.
• Permissions issues
• Availability issues
• An expired or invalid certificate
• A self-signed certificate
• Certificate chain in the wrong order
• Ports not enabled
• Firewall blocking an IP address
• Web Sockets are blocked
• A virtual private cloud (VPC) or security group not configured correctly.
To help find issues with SSL, you can use an online SSL checker, or a tool like OpenSSL.
The following steps walk through troubleshooting a connection where SSL is suspect. The administrator
in this example has already installed OpenSSL.
Example
1. The user finds an issue connecting to the database. The user verifies that they can connect a different
database in another AWS Region. They check other versions of the same database and can connect
easily.
2. The administrator reviews the issue and decides to verify that the certificates are working correctly.
The administrator searches online for an article on using OpenSSL to troubleshoot or debug SSL
connections.
3. Using OpenSSL, the administrator verifies the SSL configuration in the terminal.
echo quit
896
Amazon QuickSight User Guide
I can't connect to Amazon Athena
...
...
...
CONNECTED(00000003)
012345678901234:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown
protocol:s23_clnt.c:782:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 278 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
Start Time: 1497569068
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
4. The administrator corrects the problem by installing the SSL certificate on the user's database server.
For more detail on the solution in this example, see Using SSL to Encrypt a Connection to a DB Instance
in the Amazon RDS User Guide.
If you can't connect to Amazon Athena, you might get an insufficient permissions error when you
run a query, showing that the permissions aren't configured. To verify that you can connect Amazon
QuickSight to Athena, check the following settings:
897
Amazon QuickSight User Guide
I can't connect to Amazon Athena
For details, see following. For information about troubleshooting other Athena issues, see Connectivity
issues when using Amazon Athena with Amazon QuickSight (p. 888).
Use the following procedure to make sure that you successfully authorized Amazon QuickSight to use
Athena. Permissions to AWS resources apply to all Amazon QuickSight users.
To perform this action, you must be an Amazon QuickSight administrator. To check if you have access,
verify that you see the Manage QuickSight option when you open the menu from your profile at upper
right.
1. Choose your profile name (upper right). Choose Manage QuickSight, and then choose Security &
permissions.
2. Under QuickSight access to AWS services, choose Add or remove.
3. Find Athena in the list. Clear the box by Athena, then select it again to enable Athena.
The settings for S3 buckets that you access here are the same ones that you access by choosing
Amazon S3 from the list of AWS services. Be careful that you don't inadvertently disable a bucket
that someone else uses.
5. Choose Finish to confirm your selection. Or choose Cancel to exit without saving.
6. Choose Update to save your new settings for Amazon QuickSight access to AWS services. Or choose
Cancel to exit without making any changes.
7. Make sure that you are using the correct AWS Region when you are finished.
If you had to change your AWS Region as part of the first step of this process, change it back to the
AWS Region that you were using before.
Make sure that your IAM policies grant the right permissions
Your AWS Identity and Access Management (IAM) policies must grant permissions to specific actions.
Your IAM user or role must be able to read and write both the input and the output of the S3 buckets
that Athena uses for your query.
If the dataset is encrypted, the IAM user needs to be a key user in the specified AWS KMS key's policy.
To verify that your IAM policies have permission to use S3 buckets for your query
898
Amazon QuickSight User Guide
I can't connect to Amazon Athena
2. Locate the IAM user or role that you are using. Choose the user or role name to see the associated
policies.
3. Verify that your policy has the correct permissions. Choose a policy that you want to verify, and then
choose Edit policy. Use the visual editor, which opens by default. If you have the JSON editor open
instead, choose the Visual editor tab.
4. Choose the S3 entry in the list to see its contents. The policy needs to grant permissions to list, read,
and write. If S3 is not in the list, or it doesn't have the correct permissions, you can add them here.
For examples of IAM policies that work with Amazon QuickSight, see IAM policy examples for Amazon
QuickSight (p. 983).
Make sure that the IAM user has read/write access to your S3
location
To access Athena data from Amazon QuickSight, first make sure that Athena and its S3 location are
authorized in Manage QuickSight screen. For more information, see Make sure that you authorized
Amazon QuickSight to use Athena (p. 898).
Next, verify the relevant IAM permissions. The IAM user for your Athena connection needs read/write
access to the location where your results go in S3. Start by verifying that the IAM user has an attached
policy that allows access to Athena, such as AmazonAthenaFullAccess. Let Athena create the bucket
using the name that it requires, and then add this bucket to the list of buckets that QuickSight can
access. If you change the default location of the results bucket (aws-athena-query-results-*), be
sure that the IAM user has permission to read and write to the new location.
Verify that you don't include the AWS Region code in the S3 URL. For example, use s3://
awsexamplebucket/path and not s3://us-east-1.amazonaws.com/awsexamplebucket/path.
Using the wrong S3 URL causes an Access Denied error.
Also verify that the bucket policies and object access control lists (ACLs) allow the IAM user to access
the objects in the buckets. If the IAM user is in a different AWS account, see Cross-account Access in the
Amazon Athena User Guide.
If the dataset is encrypted, verify that the IAM user is a key user in the specified AWS KMS key's policy.
You can do this in the AWS KMS console at https://console.aws.amazon.com/kms.
• Examine the Workgroup option at the top. It has the format Workgroup: group-name. If the
group name is the one that you want to use, skip to the next step.
• To choose a different workgroup, chose Workgroup at the top. Choose the workgroup that you
want to use, and choose Switch workgroup.
3. Choose Settings at upper right.
(Not common) If you get an error that your workgroup is not found, use these steps to fix it:
a. Ignore the error message for now, and instead find Workgroup: group-name on the Settings
page. Your workgroup's name is a hyperlink. Open it.
899
Amazon QuickSight User Guide
I can't connect to Amazon S3
b. On the Workgroup: <groupname> page, choose Edit workgroup at left. Now close the error
message.
c. Near Query result location, open the S3 location selector by choosing the Select button that
has the file folder icon.
d. Choose the small arrow at the end of the name of the S3 location for Athena. The name must
begin with aws-athena-query-results.
e. (Optional) Encrypt query results by selecting the Encrypt results stored in S3 check box.
f. Choose Save to confirm your choices.
g. If the error doesn't reappear, return to Settings.
Occasionally, the error might appear again. If so, take the following steps:
If you manage access with ACLs, make sure that the access control lists (ACLs) are set up by viewing
Access Control List.
8. If your dataset is encrypted (Encrypt query results is selected in the workgroup settings), make sure
that the IAM user or role is added as a key user in that AWS KMS key's policy. You can access AWS
KMS settings at https://console.aws.amazon.com/kms.
For more information, see the AWS Support article When I run an Athena query, I get an "Access Denied"
error.
To verify authentication, make sure that you authorized Amazon QuickSight to access the S3 account. It's
not enough that you, the user, are authorized. Amazon QuickSight must be authorized separately.
900
Amazon QuickSight User Guide
I can't connect to Amazon S3
1. In the AWS Region list at upper right, choose the US East (N. Virginia) Region. You use this AWS
Region temporarily while you edit your account permissions.
2. Inside Amazon QuickSight, choose your profile name (upper right). Choose Manage QuickSight, and
then choose Security & permissions.
3. Choose Add or remove.
4. Locate Amazon S3 in the list. Choose one of the following actions to open the screen where you can
choose S3 buckets:
• If the check box is clear, select the check box next to Amazon S3.
• If the check box is selected, choose Details, and then choose Select S3 buckets.
5. Choose the buckets that you want to access from Amazon QuickSight. Then choose Select.
6. Choose Update.
7. If you changed your AWS Region during the first step of this process, change it back to the AWS
Region that you want to use.
We strongly recommend that you make sure that your manifest file is valid. If Amazon QuickSight can't
parse your file, it gives you an error message. That might be something like "We can't parse the manifest
file as valid JSON" or "We can't connect to the S3 bucket."
1. Open your manifest file. You can do this directly from the Amazon S3 console at https://
console.aws.amazon.com/s3/. Go to your manifest file and choose Open.
2. Make sure that the URI or URLs provided inside the manifest file indicate the file or files that you
want connect to.
3. Make sure that your manifest file is formed correctly, if you use a link to the manifest file rather than
uploading the file. The link shouldn't have any additional phrases after the word .json. You can get
the correct link to an S3 file by viewing its Link value in the details on the S3 console.
4. Make sure that the content of the manifest file is valid by using a JSON validator, like the one at
https://jsonlint.com.
5. Verify permissions on your bucket or file. In the https://console.aws.amazon.com/s3/, navigate to
your Amazon S3 bucket, choose the Permissions tab, and add the appropriate permissions. Make
sure that the permissions are at the right level, either on the bucket or on the file or files.
6. If you are using the s3:// protocol, rather than https://, make sure that you reference your
bucket directly. For example, use s3://awsexamplebucket/myfile.csv instead of s3://s3-
us-west-2.amazonaws.com/awsexamplebucket/myfile.csv. Doubly specifying Amazon S3,
by using s3:// and also s3-us-west-2.amazonaws.com, causes an error.
For more information about manifest files and connecting to Amazon S3, see Supported formats for
Amazon S3 manifest files (p. 82).
In addition, verify that your Amazon S3 dataset was created according to the steps in Creating a dataset
using Amazon S3 files (p. 79).
If you use Athena to connect to Amazon S3, see I can't connect to Amazon Athena (p. 897).
901
Amazon QuickSight User Guide
I can't create or refresh a dataset from
an existing Adobe Analytics data source
902
Amazon QuickSight User Guide
I can't connect to MySQL (issues
with SSL and authorization)
+--------------------------------+----------------------+
| Variable_name | Value |
+--------------------------------+----------------------+
| Ssl_accept_renegotiates | 0 |
| Ssl_accepts | 1 |
| Ssl_callback_cache_hits | 0 |
| Ssl_cipher | |
| Ssl_cipher_list | |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_ctx_verify_depth | 18446744073709551615 |
| Ssl_ctx_verify_mode | 5 |
| Ssl_default_timeout | 0 |
| Ssl_finished_accepts | 0 |
| Ssl_finished_connects | 0 |
| Ssl_session_cache_hits | 0 |
| Ssl_session_cache_misses | 0 |
| Ssl_session_cache_mode | SERVER |
| Ssl_session_cache_overflows | 0 |
| Ssl_session_cache_size | 128 |
| Ssl_session_cache_timeouts | 0 |
| Ssl_sessions_reused | 0 |
| Ssl_used_session_cache_entries | 0 |
| Ssl_verify_depth | 0 |
| Ssl_verify_mode | 0 |
| Ssl_version | |
+--------------------------------+----------------------+
+--------------------------------+-------+
| Variable_name | Value |
+--------------------------------+-------+
| Ssl_accept_renegotiates | 0 |
| Ssl_accepts | 0 |
| Ssl_callback_cache_hits | 0 |
| Ssl_cipher | |
| Ssl_cipher_list | |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_ctx_verify_depth | 0 |
| Ssl_ctx_verify_mode | 0 |
| Ssl_default_timeout | 0 |
| Ssl_finished_accepts | 0 |
| Ssl_finished_connects | 0 |
| Ssl_session_cache_hits | 0 |
| Ssl_session_cache_misses | 0 |
| Ssl_session_cache_mode | NONE |
| Ssl_session_cache_overflows | 0 |
| Ssl_session_cache_size | 0 |
| Ssl_session_cache_timeouts | 0 |
| Ssl_sessions_reused | 0 |
| Ssl_used_session_cache_entries | 0 |
| Ssl_verify_depth | 0 |
| Ssl_verify_mode | 0 |
| Ssl_version | |
903
Amazon QuickSight User Guide
I can't connect to RDS
+--------------------------------+-------+
3. Make sure that you have installed a supported SSL certificate on the database server.
4. Grant usage for the specific user to connect using SSL.
For more detail on the solution in this example, see the following:
• SSL Support for MySQL DB Instances in the Amazon RDS User Guide.
• Using SSL to Encrypt a Connection to a DB Instance in the Amazon RDS User Guide.
• MySQL documentation
You can also refer to the Amazon RDS documentation on troubleshooting connections, Cannot Connect
to Amazon RDS DB Instance.
Topics
• Insufficient permissions when using Athena with Amazon QuickSight (p. 904)
• Amazon QuickSight isn't working in my browser (p. 905)
• How do I delete my Amazon QuickSight account? (p. 905)
• Individuals in my organization get an "External Login is Unauthorized" message when they try to
access Amazon QuickSight (p. 906)
• My email sign-in stopped working (p. 910)
1. Make sure that Amazon QuickSight can access the Amazon S3 buckets used by Athena:
a. To do this, choose your profile name (upper right). Choose Manage QuickSight, and then
choose Security & permissions.
904
Amazon QuickSight User Guide
Amazon QuickSight isn't working in my browser
The settings for S3 buckets that you access here are the same ones that you access by choosing
Amazon S3 from the list of AWS services. Be careful that you don't inadvertently disable a
bucket that someone else uses.
e. Choose Select to save your S3 buckets.
f. Choose Update to save your new settings for Amazon QuickSight access to AWS services. Or
choose Cancel to exit without making any changes.
2. If your data file is encrypted with an AWS KMS key, grant permissions to the Amazon QuickSight IAM
role to decrypt the key. The easiest way to do this is to use the AWS CLI.
aws kms create-grant --key-id <AWS KMS key ARN> --grantee-principal <Your Amazon
QuickSight Role ARN> --operations Decrypt
The Amazon Resource Name (ARN) for the Amazon QuickSight role has the format
arn:aws:iam::<account id>:role/service-role/aws-quicksight-service-role-
v<version number> and can be accessed from the IAM console. To find your AWS KMS key ARN,
use the S3 console. Go to the bucket that contains your data file and choose the Overview tab. The
key is located near KMS key ID.
For Amazon Athena, Amazon S3, and Athena Query Federation connections, QuickSight uses the
following IAM role by default:
arn:aws:iam::AWS-ACCOUNT-ID:role/service-role/aws-quicksight-s3-consumers-role-v0
arn:aws:iam::AWS-ACCOUNT-ID:role/service-role/aws-quicksight-service-role-v0
905
Amazon QuickSight User Guide
Individuals in my organization get
"External Login is Unauthorized"
The external login used for federation is unauthorized for the QuickSight user.
We recommend that you use the AssumeRoleWithWebIdentity API operation instead, which specifies
the role session name.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "cognito-identity.amazonaws.com"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
906
Amazon QuickSight User Guide
Individuals in my organization get
"External Login is Unauthorized"
"cognito-identity.amazonaws.com:aud": "us-west-2:cognito-pool-id"
},
"ForAnyValue:StringLike": {
"cognito-identity.amazonaws.com:amr": "unauthenticated"
}
}
}
]
}
This setup allows a temporary Amazon Cognito user to assume a role session mapped to a unique
QuickSight user. Because unauthenticated identities are temporary, they aren't supported by QuickSight.
We recommend that you don't use this setup, which setup isn't supported by Amazon QuickSight. For
Amazon QuickSight, make sure that the Amazon Cognito SSO uses authenticated users.
You deleted and recreated an Amazon Cognito user with the same user name
attributes
In this case, the associated Amazon Cognito user that's mapped to the Amazon QuickSight user was
deleted and recreated. The newly created Amazon Cognito user has a different underlying subject.
Depending on how the role session name is mapped to the QuickSight user, the session name might
correspond to the same QuickSight role-based user.
We recommend that you remap the QuickSight user to the updated Amazon Cognito user subject
by using the UpdateUser API operation. For more information, see the following UpdateUser API
example (p. 909).
You're mapping multiple Amazon Cognito user pools in different AWS accounts
to one identity pool and with QuickSight
Mapping multiple Amazon Cognito user pools in different AWS accounts to one identity pool and
QuickSight isn't supported by Amazon QuickSight.
The external-login-id should be the identity ID for the Amazon Cognito user. The format is
<identity-region>:<cognito-user-sub>, as shown in the following example.
907
Amazon QuickSight User Guide
Individuals in my organization get
"External Login is Unauthorized"
If the external login provider is a custom OpenID Connect (OIDC) provider, use the following CLI code to
create users.
To learn more about using RegisterUser in the CLI, see RegisterUser in the Amazon QuickSight API
Reference.
The result contains the external login information fields if there are any. Following is an example.
{
"Status": 200,
"User": {
"Arn": "arn:aws:quicksight:us-east-1:111222333:user-default-IdentityQuickSightRole-
user",
"UserName": "IdentityQuickSightRole-user",
"Email": "[email protected]",
"Role": "ADMIN",
"IdentityType": "IAM",
"Active": true,
"PrincipalId": "federated-iam-AROAAAAAAAAAAAAAA:user",
"ExternalLoginFederationProviderType": "COGNITO",
"ExternalLoginFederationProviderUrl": "cognito-identity.amazonaws.com",
"ExternalLoginId": "us-east-1:123abc-1234-123a-b123-12345678a"
},
"RequestId": "12345678-1234-1234-abc1-a1b1234567"
}
908
Amazon QuickSight User Guide
Individuals in my organization get
"External Login is Unauthorized"
To learn more about using DescribeUser in the CLI, see DescribeUser in the Amazon QuickSight API
Reference.
If you want to delete the external login information for the user, use NONE external login
federation provider type. Use the following CLI command to delete external login information.
To learn more about using UpdateUser in the CLI, see the UpdateUser in the Amazon QuickSight API
Reference.
909
Amazon QuickSight User Guide
My email sign-in stopped working
Topics
• I can't see my visuals (p. 910)
• I get a feedback bar across my printed documents (p. 910)
• My map charts don't show locations (p. 911)
• My pivot table stops working (p. 911)
• My visual can’t find missing columns (p. 911)
• My visual can’t find the query table (p. 911)
• My visual doesn't update after I change a calculated field (p. 912)
• Values in a Microsoft Excel file with scientific notation don't format correctly in QuickSight (p. 912)
• If you are having trouble adding a visual to an analysis, try the following:
• Check that you aren't trying to add more objects than the quota allows. Amazon QuickSight
supports up to 30 datasets in a single analysis, up to 30 visuals in a single sheet, and a limit of 20
sheets per analysis.
• Suppose that you are editing an analysis for a selected data source and the connection to the data
source ends unexpectedly. The resulting error state can prevent further changes to the analysis. In
this case, you can't add more visuals to the analysis. Check for this state.
• If your visuals don't load, try the following:
• If you are using a corporate network, verify that the network's firewall settings permit traffic from
*.aws.amazon.com, amazonaws.com, https://mobileanalytics.*.amazonaws.com, and
cloudfront.net.
• Add exceptions to your ad blocker for *.aws.amazon.com, amazonaws.com, https://
mobileanalytics.*.amazonaws.com, and cloudfront.net.
• If you are using a proxy server, verify that *.quicksight.aws.amazon.com and
cloudfront.net are added to the list of approved domains (the allow list).
To avoid this problem, use the twirl-down icon on the bottom left of the screen (shown following) to
minimize the feedback bar. Then print your document.
910
Amazon QuickSight User Guide
My map charts don't show locations
The most common cause of this error is that your data source schema changed. For example, it's possible
a column name changed from a_column to b_column.
Depending on how your dataset accesses the data source, choose one of the following.
For example, if the table name changed from a_column to b_column, you can update the SQL
statement to create an alias: SELECT b_column as a_column. By using the alias to maintain the
same field name in the dataset, you avoid having to add the column to your visuals as a new entity.
The most common cause of this error is that your data source schema changed. For example, it's possible
a table name changed from x_table to y_table.
911
Amazon QuickSight User Guide
My visual doesn't update after I change a calculated field
Depending on how the dataset accesses the data source, choose one of the following.
For example, if the table name changed from x_table to y_table, you can update the FROM
clause in the SQL statement to refer to the new table instead.
When you're done, choose Save & visualize, then choose each visual and readd the fields as needed.
• If the dataset isn't based on custom SQL, do the following:
1. Create a new dataset using the new table, y_table for example.
2. Open your analysis.
3. Replace the original dataset with the newly created dataset. If there are no column changes,
all the visuals should work after you replace the dataset. For more information, see Replacing
datasets (p. 125).
To resolve this issue, format the column as Text in Microsoft Excel, and then upload the file to
QuickSight.
912
Amazon QuickSight User Guide
Different editions of Amazon QuickSight
Topics
• Different editions of Amazon QuickSight (p. 913)
• AWS Regions, websites, IP address ranges, and endpoints (p. 915)
• Supported browsers (p. 917)
• Managing Amazon QuickSight usage (p. 918)
• Supporting multitenancy with isolated namespaces (p. 928)
• Customizing the QuickSight console (p. 931)
Both editions offer a full set of features for creating and sharing data visualizations. Enterprise edition
additionally offers encryption at rest and Microsoft Active Directory integration. In Enterprise edition,
you select a Microsoft Active Directory directory in AWS Directory Service. You use that active directory
to identify and manage your Amazon QuickSight users and administrators.
For more information about the different features offered by the Amazon QuickSight editions and about
pricing, see Amazon QuickSight pricing.
Availability of editions
All editions are available in any AWS Region that is currently supported by Amazon QuickSight.
The capacity region in which you start your Amazon QuickSight subscription is where your account's
default SPICE (p. 132) capacity is allocated. However, you can purchase additional SPICE capacity and
access your AWS resources in any other supported AWS Region.
You can start a new Amazon QuickSight subscription using Standard edition, choosing any default
capacity region. You can then upgrade it to Enterprise edition at any time.
To manage Enterprise account settings, you must temporarily change your region for your session to US
East (N. Virginia) Region. You can change it back when you have finished editing your account settings.
These settings include changing your subscription's notification email, enabling IAM access requests,
editing access to AWS resources, and unsubscribing from Amazon QuickSight.
913
Amazon QuickSight User Guide
Permissions for the different editions
When you create a user account, you also choose to assign it either an administrative or a user role. This
role assignment determines the user's permissions in Amazon QuickSight. You perform all management
of users by adding, changing, and deleting user accounts in Amazon QuickSight.
You can only add or remove Enterprise edition user accounts by adding or removing a person from a
Microsoft Active Directory group that you associated with Amazon QuickSight. When you add a user
account, the permissions it gets rely on whether the Microsoft Active Directory group is an administrative
group or a user group in Amazon QuickSight.
You can also bulk add or remove user accounts by integrating Microsoft Active Directory groups with, or
removing Microsoft Active Directory groups from, Amazon QuickSight.
Deactivating a user by removing the user from a Microsoft Active Directory group, or by removing their
Microsoft Active Directory group from integration with Amazon QuickSight, doesn't delete the associated
Amazon QuickSight user account for that person.
Additional AWS permissions are required to manage Amazon QuickSight permissions to AWS resources
and to unsubscribe from Amazon QuickSight. These tasks can only be performed by an IAM user who
also has administrative permissions in Amazon QuickSight, or by the IAM user or AWS account that
created the Amazon QuickSight account.
To manage access to AWS resources from Amazon QuickSight, you must be logged in as one of the
following:
In Enterprise edition, you must add AD users or groups to an IAM role that has Amazon QuickSight
permissions, rather than adding IAM users individually. All Microsoft Active Directory users that are
Amazon QuickSight administrators can to manage subscriptions and SPICE capacity.
914
Amazon QuickSight User Guide
Regions and IP ranges
Additional AWS permissions are required to manage Microsoft Active Directory groups, manage access to
AWS resources, or unsubscribe from Amazon QuickSight. Administrators are prompted for AWS or IAM
credentials to perform these tasks.
Amazon QuickSight is currently supported in the following AWS Regions. The following list provides
websites, IP address ranges, and endpoints for Amazon QuickSight in each AWS Region.
The IP addresses listed following are the ranges where QuickSight traffic originates from when making
outbound connections to databases. They are not the IP address ranges that you use to connect to the
QuickSight website or service API. For more information about authorizing QuickSight, see Authorizing
connections to AWS data stores (p. 946).
915
Amazon QuickSight User Guide
Supported AWS Regions for Amazon QuickSight Q
Supported browsers
Before you start working with Amazon QuickSight, use the following table to verify that your browser is
supported for Amazon QuickSight access.
Note
Amazon QuickSight ended support for Microsoft Internet Explorer 11 on July 31, 2022. We
can no longer ensure that the features and web pages of Amazon QuickSight will function
properly on IE 11. Please use one of our supported browsers: Microsoft Edge (Chromium),
Google Chrome, or Mozilla Firefox.
917
Amazon QuickSight User Guide
Managing usage
Topics
• Managing subscriptions (p. 918)
• Managing SPICE capacity (p. 920)
• Upgrading your Amazon QuickSight subscription from Standard edition to Enterprise
edition (p. 922)
• Changing your notification email (p. 924)
• Deleting your Amazon QuickSight subscription and closing the account (p. 925)
• Adding domains for embedded analytics (p. 926)
Managing subscriptions
You can purchase standard user subscriptions to get discounted pricing on Amazon QuickSight. When
you invite additional users to Amazon QuickSight, you're charged for those user accounts on a month-
by-month basis. If you have Enterprise edition, you have the option to take advantage of pay-per-session
pricing for reader accounts. These are users who only view data dashboards, and don't need author
or admin access. When you purchase an annual subscription, you pay for a user account on an annual
rather than monthly basis. With an annual subscription, you receive a discounted price in return for the
extended time commitment. You don't need to purchase an annual subscription to create or add users.
For more information about pricing, see Amazon QuickSight.
When you purchase a set of standard user subscriptions, you choose the number of user accounts you
want to cover. You also choose when the subscriptions should start (any time from the month following
the current month, to one year in the future) and whether the subscriptions autorenew. All subscriptions
that you purchase together must use the same values for these settings.
You can edit an existing set of user subscriptions to change whether it autorenews. If the set is not yet
active, you can also change the number of subscriptions it covers, or delete it entirely.
1. Choose your user name on the application bar and then choose Manage QuickSight.
918
Amazon QuickSight User Guide
Managing subscriptions
• 7 users with annual subscriptions. Only currently active subscriptions are shown here.
• 13 month-to-month users.
Pause over any section of the meter bar to display details about that user segment.
4. Use the information in the subscriptions table to see what current and future subscriptions you have.
Purchasing subscriptions
Use the following procedure to purchase subscriptions.
To purchase subscriptions
1. Choose your user name on the application bar and then choose Manage QuickSight.
2. Choose Your Subscriptions.
3. Choose Purchase subscription.
4. Choose or enter the number of subscriptions you want.
5. Choose the month and year when the subscriptions will start.
6. Choose whether the subscriptions autorenew.
7. Choose Purchase subscription.
Editing subscriptions
Use the following procedure to edit subscriptions.
To edit subscriptions
1. Choose your user name on the application bar and then choose Manage QuickSight.
2. Choose Your Subscriptions.
3. Next to the set of subscriptions you want to change, choose Edit.
4. (Optional) If the subscriptions haven't started yet, change the number of subscriptions you want.
5. Choose whether the subscriptions autorenew.
6. Choose Save changes.
Deleting subscriptions
Use the following procedure to delete subscriptions. You can only delete subscriptions that haven't
started yet.
To delete subscriptions
1. Choose your user name on the application bar and then choose Manage QuickSight.
2. Choose Your Subscriptions.
3. Next to the set of subscriptions that you want to delete, choose Edit.
919
Amazon QuickSight User Guide
Managing SPICE capacity
SPICE capacity is allocated separately per AWS Region. For each AWS account, SPICE capacity is shared
by all the people using QuickSight in a single AWS Region. The other AWS Regions have no SPICE
capacity unless you choose to purchase some.
QuickSight administrators can view how much SPICE (p. 132) capacity you have in each AWS Region
and how much of it is currently in use. Administrators can also purchase additional SPICE capacity or
release unused SPICE capacity. You can only release SPICE capacity that isn't currently used by a dataset.
Datasets in SPICE stay there until someone remove them from SPICE. To change that, you can either
delete the datasets or change them so they aren't stored in SPICE.
Purchasing or releasing SPICE capacity only affects the capacity for the currently selected AWS Region.
Each AWS account can have a separate QuickSight subscription and can be used in multiple AWS
Regions. For information about additional SPICE pricing, see Amazon QuickSight pricing.
Before you make any changes to SPICE capacity, make sure that you're using the correct AWS account
and AWS Region. It's possible to be using different AWS accounts or AWS Regions at the same time in
different contexts, as follows:
1. Open the AWS console, using the AWS account that you want to view SPICE information for. If you
have only one AWS account, you can skip this step.
a. On the navigation bar at the top of the page, choose the account name or number at right. If a
number displays, this might be your AWS account ID.
920
Amazon QuickSight User Guide
Managing SPICE capacity
To return to the original page, choose the AWS logo at upper left.
2. Open QuickSight by first entering "quicksight" into the Find Services search box. When the word
QuickSight appears below the search box, choose it from the list.
3. In QuickSight, open the profile menu by choosing your profile icon at top right. The AWS name of
the AWS Region that QuickSight is using displays in the menu.
The same AWS Region also displays in the URL, for example: https://us-
east-1.quicksight.aws.amazon.com/sn/admin. If this is your URL, the profile menu displays
the name N. Virginia.
To switch AWS Regions, display the list of supported Regions by choosing the Region name from the
profile menu. Then choose the Region that you want to use. Switching to a different AWS Region
changes the SPICE usage information that you can view. It also changes the QuickSight assets that
you can use, for example data sources and dashboards.
1. Open QuickSight. Make sure that you're using the correct AWS account and AWS Region as described
previously in Finding your current AWS account and AWS Region (p. 920).
2. Open the administration page by choosing Manage QuickSight from your profile menu.
3. Choose SPICE capacity from the navigation pane at left. The following information displays:
• The Total SPICE capacity section displays the total amount of used and unused SPICE capacity.
A bar graph shows how much of this storage space is in each of the following categories for this
AWS account in the AWS Region that's currently selected in QuickSight:
• Purchased SPICE capacity – This is the additional SPICE capacity you previously purchased.
• Free SPICE capacity bundled with QuickSight – This is the total default capacity associated with
your paid users.
Hover over any section of the meter to see details on that capacity type.
• The SPICE usage section displays the total amount of the used and unused SPICE capacity. A bar
graph shows how much of this storage space is in each of the following categories for this AWS
account in the AWS Region that's currently selected in QuickSight:
• Used SPICE capacity – This is the used portion of the default SPICE capacity that you get for
each user.
• Unused SPICE capacity – This is the unused portion of the default SPICE capacity that you get
for each user.
• Releasable unused capacity – This is the purchased capacity that isn't in use, and so can be
released to reduce costs.
1. Open QuickSight. Make sure that you're using the correct AWS account and AWS Region as described
previously in Finding your current AWS account and AWS Region (p. 920).
2. Open the administration page by choosing Manage QuickSight from your profile menu.
921
Amazon QuickSight User Guide
Upgrading your subscription
1. Open QuickSight. Make sure that you're using the correct AWS account and AWS Region as described
previously in Finding your current AWS account and AWS Region (p. 920).
2. Open the administration page by choosing Manage QuickSight from your profile menu.
3. Choose SPICE capacity from the navigation pane at left.
4. Choose Release unused purchased capacity.
5. Do one of the following:
• To release all SPICE capacity from the AWS Region that is currently selected in QuickSight, choose
Release all.
• To release a certain number of gigabytes of SPICE capacity from the AWS Region that is currently
selected in QuickSight, enter the number of gigabytes to release.
6. To confirm your choice, choose Release SPICE capacity. To exit without making any changes, choose
Cancel.
• Reader role with pay-per-session pricing—maximum of $5/reader/month; for more pricing details, see
following.
• Email reports for offline delivery of insights.
• Larger SPICE datasets with up to 500 million rows per SPICE dataset.
• Hourly refresh of SPICE data (using the QuickSight console).
• ML Insights to make the most of your data, including the following:
• Anomaly detection that can run on billions of rows of data on a schedule.
• Contribution analysis to help you figure out key drivers.
• One-click forecasting.
• Customizable natural language narratives that you can use to add business context to a dashboard.
• SageMaker integration.
• Embedded analytics in applications and portals:
• Embed dashboards with row level security.
• Namespaces with multitenant support for creating dashboards with embedded analytics.
• Templates for repeatable dashboard creation and management.
• Capacity pricing for embedding.
922
Amazon QuickSight User Guide
Upgrading your subscription
To see a full comparison of Standard edition with Enterprise edition, see Amazon QuickSight editions.
When you upgrade your account, your administrators and authors are billed at the Amazon QuickSight
Enterprise edition rates. For up-to-date information on rates, see Pricing. For pay-per-session pricing,
you can add additional users as readers. Before you reprovision existing users as readers, you transfer or
delete their resources, and then delete the users from your subscription.
Users who are in the reader role can view and manipulate shared dashboards, and receive emailed
updates. However, readers can't add or change data sources, datasets, analyses, visuals, or administrative
settings. Billing for readers is significantly lower in cost than regular user pricing. It's based on 30-
minute sessions, and it's capped at a maximum amount per month for each reader. Billing for upgrades
is prorated for the month of the upgrade. Upgrades to users are also prorated. If you have an annual
subscription to Standard edition, it's converted to Enterprise edition and stays in place for the remaining
term.
Warning
Downgrading from Enterprise edition to Standard edition isn't currently possible due to the
enhanced feature set available in Enterprise edition. To perform this downgrade, unsubscribe
from Amazon QuickSight, and then start a new subscription. Also, you can't transfer users or
assets between subscriptions.
Upgrading to Enterprise edition to use Active Directory connectivity isn't supported. This
is because of the differences in the user identity mechanisms between Amazon QuickSight
password-based users and existing Active Directory users. However, you can upgrade to
Enterprise and still use password-based users. If you want to upgrade and change how users
sign in, you can unsubscribe and start a new subscription.
Use the following procedure to upgrade to Enterprise edition. To perform the upgrade, you need
administrative access to Amazon QuickSight, with security permissions to subscribe. The person
performing the upgrade is usually an AWS administrator who is also an Amazon QuickSight
administrator.
1. Open the administrative settings page by clicking on your profile icon at top right.
2. At top left, choose Upgrade now.
The following screen appears. For the latest prices, see Amazon QuickSight pricing.
923
Amazon QuickSight User Guide
Changing your notification email
Billing for the upgrade to your subscription is prorated for the month of upgrade. Upgrades to
Amazon QuickSight users are also prorated.
4. (Optional) Downgrade users to readers:
• Before you start, make sure to transfer any assets your users own that you want to keep.
• Delete the users and add them back to your subscription as readers.
If you're using Active Directory, delete the authors, move them to the new reader group, then
recreate them as readers in Amazon QuickSight.
When you upgrade to Enterprise edition, your admin and author users retain their roles.
Use the following procedure to change your Amazon QuickSight notification email and to enable or
disable IAM user access requests.
To change your notification email and enable or disable IAM user access requests
1. Choose your user name on the application bar, and then choose Manage QuickSight.
2. Choose Account settings.
3. Under Notification email address, enter the email address you want to use.
924
Amazon QuickSight User Guide
Deleting your subscription
Choose whether to send IAM user access requests to the same email address. Choose Enable IAM
user access requests to this account to enable this setting.
Before you can delete your Amazon QuickSight account, make sure of the following:
• You're signed in using the IAM account or AWS root account that was used to create your Amazon
QuickSight account.
• You're a QuickSight administrator and have an Admin role in QuickSight.
• You're a root IAM admin user who originally subscribed to QuickSight, or have
quicksight:Unsubscribe and ds:UnauthorizeApplication permissions. If you don't have
these permissions, the delete operation doesn't work. Contact your account administrator for help
acquiring these permissions.
• You deleted any secondary namespaces that you created under your account.
To find any existing namespaces under your account, call the ListNamespaces API operation. To
do this, you must have the quicksight:ListNamespaces permission. For more information, see
ListNamespaces in the Amazon QuickSight API Reference.
To delete the namespaces, call the DeleteNamespace API operation. To do this, you must have the
quicksight:DeleteNamespace permission. For more information, see DeleteNamespace in the
Amazon QuickSight API Reference.
Note
You can't delete default namespaces. They are deleted automatically when you unsubscribe.
For more information about QuickSight namespaces, see Supporting multitenancy with isolated
namespaces (p. 928).
1. Choose your user name on the application bar, and then choose Manage QuickSight.
2. Choose Account settings, and then choose Delete account.
3. Choose Delete account.
4. On the Delete this account page, enter confirm and then choose Delete account.
925
Amazon QuickSight User Guide
Embedded domains
Note
You can delete your Amazon QuickSight account even when you can't access Amazon QuickSight
to do so. To do this, sign in to AWS and use the following link to open the Delete account
screen: https://us-east-1.quicksight.aws.amazon.com/sn/console/unsubscribe.
This approach works no matter which AWS Regions you use. It deletes all data, analyses,
Amazon QuickSight users, and Amazon QuickSight administrators. If you have difficulties,
contact AWS Support.
Deleting your account deletes all users, data, and assets (for example, datasets, data sources,
queries, dashboards, analyses, settings, and so on). You can't undo this action. However, after
your account is deleted, you can create a new Amazon QuickSight account using any edition and
user authorization method.
Closing your Amazon QuickSight account doesn't close your AWS account. If you also want to
close the associated AWS account, see Closing an AWS account.
In Amazon QuickSight Enterprise edition, you can embed QuickSight dashboards, visuals, consoles, and
Q search bars in an app or webpage. Domains that are going to host these embedded assets must be on
an allow list, the list of approved domains for your Amazon QuickSight subscription. This requirement
protects your data by preventing unapproved domains from hosting embedded dashboards. To embed a
QuickSight dashboard, visual, console, or Q search bar to a webpage or app, add approved domains to a
static allow list in the QuickSight console or add them at run time with the QuickSight API.
Use the following sections to learn more about adding domains for embedded analytics.
Topics
926
Amazon QuickSight User Guide
Embedded domains
Use the following procedure to view or edit the list of approved domains.
You can edit or delete existing domain by choosing the icons next to each domain in the list at the
bottom of the page.
Make sure that you use a valid HTTPS URL. The following list shows examples of URLs that are valid for
embedded dashboards that use a static domain:
• https://example-1.com
• https://www.アマゾンドメイン.jp
• https://www.亚马逊域名.cn:1234
• https://111.222.33.44:1234
• https://111.222.33.44
The following list shows examples of URLs that are not valid for embedded dashboards:
• http://example
• https://example.com.*.example-1.co.uk
• https://co.uk
• https://111.222.33.44.55:1234
• https://111.222.33.44.55
927
Amazon QuickSight User Guide
Multitenancy and namespaces
The AllowedDomains parameter is an optional parameter. It grants you the option as a developer to
override the static domains that are configured in the Manage QuickSight menu.
You can list up to three domains or subdomains. Adding domains to the allow list at runtime also adds
HTTP support for the domain localhost. The generated URL is then embedded in a developer's
website. Only the domains that are listed in the parameter can access the embedded dashboard.
To embed a dashboard to a domain at runtime, see Embedding with the QuickSight APIs (p. 793).
Make sure that you use a valid URL. The following list shows examples of URLs that are valid for
embedded dashboards that use a run-time domain:
• https://example-1.com
• http://localhost
• https://www.アマゾンドメイン.jp
• https://*.sapp.amazon.com
The following list shows examples of URLs that are not valid for embedded dashboards:
• https://example.com.*.example-1.co.uk
• https://co.uk
• https://111.222.33.44.55:1234
• https://111.222.33.44.55
For more information about embedded dashboards, see Working with embedded analytics (p. 782).
• You can allow the users of your QuickSight subscription to discover shared content and share with
other users. At the same time, you can be sure that users in one namespace can't see or interact with
users in another namespace.
• You can securely isolate data and also support diverse workloads without adding additional AWS
accounts. Access to data is still strictly controlled by AWS security features. Users can see assets
(like data and dashboards) only if they have the correct resource permissions. Also, users who have
permissions can't inadvertently expose content to people who outside of their namespace. For more
information, see AWS security in Amazon QuickSight (p. 941).
• You can monitor data flows and usage reports, neatly partitioned by namespace. Categorizing data
and reports by namespace can help simplify cost and security analysis.
• After you've registered users into your namespace, there's no additional administrative complexity or
overhead.
• Namespaces are designed to span AWS Regions, so the use containment doesn't change even if a
person signs in to a different AWS Region.
928
Amazon QuickSight User Guide
Multitenancy and namespaces
• Custom namespaces—those that are not the default namespace—are only accessible to Federated
Single-Sign On users.
• Use default namespaces instead of custom namespaces if you need to support the following:
• Password-based logins
• Credential-based Active Directory logins
• You can't transfer users directly from one namespace to another. You can choose to do some or all of
this work programmatically. For more information, see the Amazon QuickSight API reference. At the
bottom of the page of each API operation, there's a list of links to the same operation in the SDKs for
other languages. To see what SDKs are available, see SDKs and toolkits in the AWS getting started
resource center.
If you don't have an existing AWS account or you need to sign up for QuickSight, read the following
guidelines, then follow the applicable instructions in Signing up for an Amazon QuickSight
subscription (p. 25):
If you already signed up for Standard edition, you can easily upgrade your subscription to Enterprise
edition. The person performing the upgrade must be a QuickSight user with administrator privileges.
For more information, see Upgrading your Amazon QuickSight subscription from Standard edition to
Enterprise edition (p. 922).
If you have an Enterprise edition subscription that you've been using for some time, it's also possible
to migrate your users into namespaces. When you sign up for QuickSight and add users, all of them
reside in the default namespace. All of the users can interact directly with each other and share data and
dashboards with each other. To isolate your users from each other, you can create one or more additional
namespaces.
Important
QuickSight assets and resources, including datasets, data sources, dashboards, analyses, and so
on, exist outside of any namespace. They are visible only to users who have resource permissions
granted to them.
• CreateNamespace
• DescribeNamespace
• ListNamespaces
• DeleteNamespace
Note
If you need to install the AWS CLI, see Installing the AWS CLI version 2 in the AWS Command
Line Interface User Guide.
929
Amazon QuickSight User Guide
Multitenancy and namespaces
To add users to a namespace, you use the RegisterUser API operation. Each namespace has a completely
independent set of users. The user ARNs include the namespace qualifier to distinguish them, as shown
in the following examples:
When you use RegisterUser, you select an access level for each user. After a person's user name is
assigned to one of the security cohorts, their access to the console and API is restricted. People using
QuickSight can have a single access level, as follows:
1. Identify the users that you want to transfer to a different namespace by using the QuickSight user
and group API operations. For more information, see API operations for controlling access in the
Amazon QuickSight API reference.
2. Create users in the new namespace by using the RegisterUser API operation. Within a namespace,
user names are unique.
If a namespace user starts using the QuickSight console or API in a new AWS Region, that user is still
constrained to the namespace that you added them to. Each namespace represents a user directory
of an identity provider. As such, it originates in the primary AWS Region where QuickSight is set up.
However, because the user directory is propagated globally in your AWS account, the namespace is
accessible from any AWS Region where your users are using QuickSight.
3. To identify the asset and resource permissions that the new namespace users need, use the
QuickSight API operations associated with each type of asset (dashboards, datasets, and so on). For
more information, see QuickSight API operations to control assets in the Amazon QuickSight API
reference.
For example, let's say you are focusing on dashboards. You can use ListDashboards to list
all the dashboard IDs in your AWS account. Then, to determine which users or groups can
access these dashboards, you can use DescribeDashboardPermissions on the result set
generated by ListDashboards. If you need to identify specific versions of a dashboard, you can
ListDashboardVersions for that. You can also collect information about the location of the data
that's used in the dashboard with the data source and dataset API operations. For more information,
see QuickSight API operations to control data resources in the Amazon QuickSight API reference.
For more information about filtering API response output, see the SDK documentation for the
language you're using. For information relating to the AWS Command Line Interface (AWS CLI), see
Controlling command output from the AWS CLI in the AWS Command Line Interface User Guide.
4. For QuickSight assets and resources, copy the permissions that the source namespace user has for
each asset. Then use, for example, UpdateDashboardPermissions to apply the same permissions
to the target namespace user. Each asset type has its own separate set of API operations for
controlling the permissions that users have to use it. For more information, see QuickSight API
operations for asset and resource permissions in the Amazon QuickSight API reference.
930
Amazon QuickSight User Guide
Account customizations
5. When you are finished adding users and permissions, it's a good practice to allow some time for user
acceptance testing. Doing this ensures that everyone is successfully using the new namespace. It also
ensures that all assets and resources are accessible in the new namespace.
After you're certain that you no longer need the original user names, you can begin to deprecate
their permissions in the original namespace. Finally, when the users are ready, you can remove the
unused group and user names in the source namespace. Do this in each AWS Region where your
users were previously active.
Currently, different options for customizing QuickSight are available separately in the console and the
QuickSight API. Following, you can find information about the available options.
• You can customize the welcome content QuickSight provides for new users:
• You can accept or decline the sample assets. These assets include sample datasets and analyses that
are added when a person signs in for the first time.
• You can show or hide default introductory videos. These videos include the animation that displays
for new users and also the tutorial videos shown on the QuickSight home page.
• You can create and specify a default theme.
• You can create and set defaults for sharing dashboards via email with email templates.
Important
All customizations apply only to the AWS Region that you are using in the API or that is selected
in the QuickSight console.
To check your Region setting, you can use one of the following procedures.
• On the command line, enter the following command and press Enter to view the current settings.
To keep your default Region, you can add the --region parameter to most CLI commands.
Topics
931
Amazon QuickSight User Guide
Welcome content
1. In Amazon QuickSight, choose your profile icon at upper right to open the menu.
2. Choose Manage QuickSight to open the administration page.
3. On the navigation pane, choose Account customization to open the customization options.
4. Select the Show introductory videos check box to show the default tutorial videos and the
introductory animation. Clear the check box to hide QuickSight videos and the intro animation for
all users in your current AWS Region.
5. Select the Create sample datasets and analyses check box to accept sample datasets and analyses
for new users. Doing this also applies to existing users who open QuickSight in a new AWS Region.
Clear the check box if you want to decline sample datasets and analyses. You can also provide your
own versions of these to your users.
6. Choose Update.
Any changes to customizations take about 10 minutes to appear. They apply only to your current
AWS Region.
In Amazon QuickSight, you can customize how dashboard email reports appear and behave for account
users. You can customize the sender display name (who the email says it's from), the logo, and the footer
that displays in the email. You can also customize where the dashboard opens when recipients click on
it in the email report. You can even include a user-friendly name in place of your custom email address,
such as Sales, for the email to be from.
Before you can create a custom email report template, make sure you have the appropriate IAM
permissions to create and update account customizations, including creating and updating custom email
templates. If you plan to use a custom email address to send reports from, such as a company email
address, make sure you also have permissions to obtain SES identity attributes. For more information
about the permissions you need, and to see an example IAM policy, see IAM identity-based policies for
Amazon QuickSight: customizing email report templates (p. 985).
Important
All customizations apply only to the AWS Region and account that's selected in the QuickSight
console.
1. In QuickSight, choose your user name at upper right, and then choose Manage QuickSight.
932
Amazon QuickSight User Guide
Email report templates
933
Amazon QuickSight User Guide
Email report templates
The Customize email template page opens with the following options for customizing dashboard
reports.
The following sections describe each of these options. To create a custom email template that fits
your business needs, follow the steps in each section. When you're finished, choose Save.
Before you can send email reports from a custom email address, make sure that you set up a verified
SES identity for the email address. An SES identity is an email address or domain that your email is sent
from. For more information, see Verifying an email address in the Amazon Simple Email Service Developer
Guide.
• For Select "Sent from" display name configuration, choose one of the following options:
• Custom email address within the Simple Email Service (SES) AWS account #111222333. – When
you choose this option, you can enter an email address to display in the "Sent from" line in email
reports.
If you choose this option, QuickSight sends email reports for the email address that you provide.
To use a custom email address, you first confirm that the email address is a verified SES identity.
Then you create a custom policy for that identity using the provided authorization policy code in
SES, and then verify the authorization policy in QuickSight. You can also provide a user friendly
display name (optional) for the email. For more information, see following.
934
Amazon QuickSight User Guide
Email report templates
• QuickSight: [email protected] – When you select this option, the QuickSight no-reply
email address displays in the "Sent from" line in email reports.
To set up a custom email address in your SES account for QuickSight email reports
1. For STEP 1, enter a verified SES email address in the text box, and then choose Verify.
If the email address has been verified in your SES account, a verification message appears. If it
hasn't, go to your SES account and verify the email address. For more information, see Verifying an
email address in the Amazon Simple Email Service Developer Guide.
2. For STEP 2, choose Copy authorization policy, and then do the following:
a. Choose Go to SES.
b. Sign in to your SES account and create a custom policy for the email address that you verified in
the previous step. You can paste the authorization policy code that you copied from QuickSight
in the SES policy editor.
For more information about creating identity policies in SES, see Creating a custom policy in the
Amazon Simple Email Service Developer Guide.
3. For STEP 3, choose Verify Authorization to verify that the SES identity has authorized QuickSight to
send emails on its behalf.
• Custom logo – When you choose this option, you can upload an image to display a custom logo in
your email reports. You can customize the logo header background color as well.
The image you upload must be a JPG, JPEG, or PNG file, and can have a maximum size of 1 MB.
When uploaded, the logo automatically resizes to a max height of 32 pixels.
• To upload an image for the custom logo, choose Upload an image and choose an image file.
Make sure that the image that you upload is a .jpg, .jpeg, or .png file. The file can have a
maximum size of 1 MB. When uploaded, the logo automatically resizes to a maximum height of
32 pixels.
• To change the header background color, choose the color picker icon, or enter a hexadecimal
number in the space provided.
• QuickSight logo – This is the default logo that displays in email reports unless specified
otherwise.
• No logo – When you choose this option, no logo is displayed in the email.
935
Amazon QuickSight User Guide
Email report templates
• For Select where the dashboard opens, choose one of the following options:
• Open in custom application – When you choose this option, users are redirected to your
application when they click on the link to the dashboard in the email report.
• To open the dashboard in your application, enter the URL for your application. You can
use parameters in the URL. Any parameters that you add are replaced at runtime with the
appropriate information. The following parameters are supported: <<$accountId>>, <<
$dashboardId>>, and <<$awsRegion>>.
For example, let's say that you enter the following URL with parameters:
https://www.example.com/analytics?account-id=<<$accountId>>&dashboard-
id=<<$dashboardId>>®ion=<<$awsRegion>>.
When the email report is sent to subscribers, QuickSight replaces the parameters with the
appropriate values at runtime. The URL in the dashboard report email might be similar to the
following:
https://www.example.com/analytics?account-id=111222333&dashboard-
id=28ab58b4-8b53-441c-b52b-bc475f620d7f®ion=us-west-2.
• To enter a custom call to action for the dashboard link in the email, enter text for Enter custom
call to action text.
• Open in quicksight.aws.com – When you choose this option, users are redirected to QuickSight
when they click on the link to the dashboard in the email report.
• Hide dashboard link in email – When you choose this option, a link to view the dashboard isn't
shown.
• Custom footer – When you choose this option, you can enter a custom footer of up to 500
characters.
• QuickSight footer – When you choose this option, the following default QuickSight footer is used.
DescribeAccountCustomization
{
"eventSource": "quicksight.amazonaws.com",
"eventName": "DescribeAccountCustomization",
"requestParameters": {
"awsAccountId": "111222333",
"resolved": false
},
"responseElements": null,
"eventCategory": "Management"
}
DescribeEmailCustomizationTemplate
{
"eventSource": "quicksight.amazonaws.com",
"eventName": "DescribeEmailCustomizationTemplate",
"requestParameters": {
"awsAccountId": "111222333",
"emailCustomizationTemplateId": "TemplateId"
},
"responseElements": null,
eventCategory": "Management"
}
When the template is saved, the following snippets are added as part of the eventName for
CreateAccountCustomization and CreateEmailCustomizationTemplate.
CreateAccountCustomization
{
"eventSource": "quicksight.amazonaws.com",
"eventName": "CreateAccountCustomization",
"requestParameters": {
"accountCustomization": {
"defaultEmailCustomizationTemplate": "arn:aws:quicksight:us-west-2:111222333:email-
customization-template/template-id"
},
"awsAccountId": "111222333"
},
"responseElements": {
"status": 201,
"arn": "arn:aws:quicksight:us-west-2:111222333:customization/account/111222333",
"awsAccountId": "111222333",
"accountCustomization": {
"defaultEmailCustomizationTemplate": "arn:aws:quicksight:us-west-2:111222333:email-
customization-template/template-id"
},
"requestId": "6b6f2ce8-584b-47cb-9f56-4273ab7061a6"
},
"eventCategory": "Management"
}
CreateEmailCustomizationTemplate
{
"eventSource": "quicksight.amazonaws.com",
"eventName": "CreateEmailCustomizationTemplate",
"requestParameters": {
"fromEmailAddressCurrentOption": "DEFAULT",
"description": "",
"awsAccountId": "111222333",
"emailCustomizationTemplateId": "template-id",
"name": "Email Customization Template",
"dashboardLinkCurrentOption": "DEFAULT",
"footerCurrentOption": "DEFAULT",
937
Amazon QuickSight User Guide
Email report templates
"logoCurrentOption": "DEFAULT"
},
"responseElements": {
"emailCustomizationTemplateId": "template-id",
"status": 200,
"requestId": "17dea6c9-7811-4ee2-9c79-00c4d376a2c2",
"arn": "arn:aws:quicksight:us-west-2:111222333:email-customization-template/template-
id"
},
"eventCategory": "Management"
}
When the template is saved, the following snippets are added as part of the eventName for
UpdateAccountCustomization and UpdateEmailCustomizationTemplate.
UpdateAccountCustomization
{
"eventSource": "quicksight.amazonaws.com",
"eventName": "UpdateAccountCustomization",
"requestParameters": {
"accountCustomization": {
"defaultEmailCustomizationTemplate": "arn:aws:quicksight:us-west-2:111222333:email-
customization-template/template-id"
},
"awsAccountId": "111222333"
},
"responseElements": {
"status": 200,
"arn": "arn:aws:quicksight:us-west-2:111222333:customization/account/111222333",
"awsAccountId": "111222333",
"accountCustomization": {
"defaultEmailCustomizationTemplate": "arn:aws:quicksight:us-west-2:111222333:email-
customization-template/template-id"
},
"requestId": "6b6f2ce8-584b-47cb-9f56-4273ab7061a6"
},
"eventCategory": "Management"
}
UpdateEmailCustomizationTemplate
{
"eventSource": "quicksight.amazonaws.com",
"eventName": "UpdateEmailCustomizationTemplate",
"requestParameters": {
"fromEmailAddressCurrentOption": "DEFAULT",
"description": "",
"awsAccountId": "111222333",
"emailCustomizationTemplateId": "template-id",
"name": "Email Customization Template",
"dashboardLinkCurrentOption": "DEFAULT",
"footerCurrentOption": "DEFAULT",
"logoCurrentOption": "DEFAULT"
},
"responseElements": {
"emailCustomizationTemplateId": "template-id",
"status": 200,
"requestId": "17dea6c9-7811-4ee2-9c79-00c4d376a2c2",
"arn": "arn:aws:quicksight:us-west-2:111222333:email-customization-template/template-
id"
},
"eventCategory": "Management"
}
938
Amazon QuickSight User Guide
Default analysis theme
1. Identify the custom theme that you want to use as the default, and locate its theme ID. If you want
to use one of the QuickSight starter themes, skip this step.
To get the theme ID of a custom theme, use the ListThemes API operation for the Region where the
theme is. Make sure that the theme is in the same Region with the users or groups that need to use
it.
The following example shows a shell script that uses the list-themes command in the AWS CLI. It
sets the AWS account ID and the AWS Region as variables. If you previously used aws configure to
set a default Region, adding the --region variable to your command overrides your default setting.
#declare variables
awsacct1='111122223333'
region='us-west-2'
2. Use the ListUsers or ListGroups API operation to collect the Amazon Resource Names (ARNs) for
users or groups that need to use the theme as a default. You need only the top-level ARN. If all your
users are part of the same group, use the group ARN.
For more information on QuickSight ARNs, see ARN formats in the Amazon QuickSight API Reference.
3. If you're using a custom theme, grant access to the theme for the ARNs that you collected in the
previous step. If you're using a starter theme, skip this step because all users have access to starter
themes.
The following example shows a shell script that uses the update-theme-permissions command The
grant-permissions parameter is shown using shorthand syntax. You can use JSON or YAML
instead. For more information, see Specifying parameter values in the AWS Command Line Interface
User Guide.
#declare variables
awsacct1='111122223333'
namespace='default'
region='us-west-2'
theme-id='bdb844d0-0fe9-4d9d-b520-0fe602d93639' #Find this with list-themes
4. Assign the theme as the default for the same ARN or ARNs.
#declare variables
awsacct1='111122223333'
939
Amazon QuickSight User Guide
Default analysis theme
namespace='default'
region='us-west-2'
theme-id='bdb844d0-0fe9-4d9d-b520-0fe602d93639'
Currently, there are three starter themes: Classic, Midnight, and Seaside. Their ARNs are the capitalized
spelling of their theme name. If you are using a starter theme instead of a custom theme, use one of the
following theme ARNs:
• arn:aws:quicksight::aws:theme/CLASSIC
• arn:aws:quicksight::aws:theme/MIDNIGHT
• arn:aws:quicksight::aws:theme/SEASIDE
940
Amazon QuickSight User Guide
Data protection
Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and
network architecture that is built to meet the requirements of the most security-sensitive organizations.
Security is a shared responsibility between AWS and you. The shared responsibility model describes this
as security of the cloud and security in the cloud:
• Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services
in the AWS Cloud. AWS also provides you with services that you can use securely. The effectiveness
of our security is regularly tested and verified by third-party auditors as part of the AWS compliance
programs. To learn about the compliance programs that apply to Amazon QuickSight, see AWS
Services in Scope by Compliance Program.
• Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also
responsible for other factors, including the sensitivity of your data, your organization’s requirements,
and applicable laws and regulations.
This documentation helps you understand how to apply the shared responsibility model when using
Amazon QuickSight. The following topics show you how to configure Amazon QuickSight to meet your
security and compliance objectives. You also learn how to use other AWS services that can help you to
monitor and secure your Amazon QuickSight resources.
Amazon QuickSight enables you to manage your users and content using a comprehensive set of security
features. These include role-based access control, Microsoft Active Directory integration, AWS CloudTrail
auditing, single sign-on using AWS Identity and Access Management (IAM) and third-party solutions,
private VPC subnets, and data backup. Amazon QuickSight can also support FedRAMP, HIPAA, PCI DSS,
ISO, and SOC compliance to help you meet industry-specific or regulatory requirements.
For data protection purposes, we recommend that you protect AWS account credentials and set up
individual user accounts with AWS Identity and Access Management (IAM). That way each user is given
only the permissions necessary to fulfill their job duties. We also recommend that you secure your data
in the following ways:
941
Amazon QuickSight User Guide
Data encryption
• Use AWS encryption solutions, along with all default security controls within AWS services.
• Use advanced managed security services such as Amazon Macie, which assists in discovering and
securing personal data that is stored in Amazon S3.
• If you require FIPS 140-2 validated cryptographic modules when accessing AWS through a command
line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints,
see Federal Information Processing Standard (FIPS) 140-2.
We strongly recommend that you never put confidential or sensitive information, such as your
customers' email addresses, into tags or free-form fields such as a Name field. This includes when
you work with Amazon QuickSight or other AWS services using the console, API, AWS CLI, or AWS
SDKs. Any data that you enter into tags or free-form fields used for names may be used for billing or
diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not
include credentials information in the URL to validate your request to that server.
Topics
• Data encryption in Amazon QuickSight (p. 942)
• Inter-network traffic privacy in Amazon QuickSight (p. 943)
• Accessing data sources (p. 944)
You can find more detail on these topics in the following sections.
Topics
• Encryption at rest (p. 942)
• Encryption in transit (p. 943)
• Key management (p. 943)
Encryption at rest
Amazon QuickSight securely stores your Amazon QuickSight metadata. This includes the following:
• Amazon QuickSight user data, including Amazon QuickSight user names, email addresses, and
passwords. Amazon QuickSight administrators can view user names and emails, but each user's
password is completely private to each user.
• Minimal data necessary to coordinate user identification with your Microsoft Active Directory or
identity federation implementation (Federated Single Sign-On (SSO) through Security Assertion
Markup Language 2.0 (SAML 2.0)).
• Data source connection data
• Names of your uploaded files, data source names, and data set names.
• Statistics that Amazon QuickSight uses to populate machine learning (ML) insights
Amazon QuickSight securely stores your Amazon QuickSight data. This includes the following:
942
Amazon QuickSight User Guide
Inter-network traffic privacy
• Data-at-rest in SPICE is encrypted using hardware block-level encryption with AWS-managed keys.
• Data-at-rest other than SPICE is encrypted using Amazon-managed KMS keys. This includes the
following:
• Email reports, Sample value for filters, Query result cache.
When you delete a user, all of that user's metadata is permanently deleted. If you don't transfer that
user's Amazon QuickSight objects to another user, all of the deleted user's Amazon QuickSight objects
(data sources, datasets, analyses, and so on) are also deleted. When you unsubscribe from Amazon
QuickSight, all metadata and any data you have in SPICE is completely and permanently deleted.
Encryption in transit
Amazon QuickSight supports encryption for all data transfers. This includes transfers from the data
source to SPICE, or from SPICE to the user interface. However, encryption isn't mandatory. For some
databases, you can choose whether transfers from the data source are encrypted or not. Amazon
QuickSight secures all encrypted transfers by using Secure Sockets Layer (SSL).
Key management
All keys associated with Amazon QuickSight are managed by AWS.
Database server certificates that are not managed by AWS are the responsibility of the customer and
should be signed by a trusted CA. For more information, see Network and database configuration
requirements (p. 1036).
You can use a Microsoft AD connector and single sign-on (SSO) in a corporate network environment. You
can further restrict access through the identity provider. Optionally, you can also use MFA.
Amazon QuickSight accesses data sources by using connection information supplied by the data source
owner in Amazon QuickSight. Connections are protected both between Amazon QuickSight and on-
premises applications and between Amazon QuickSight and other AWS resources within the same AWS
Region. For connections to any source, the data source must allow connections from Amazon QuickSight.
• An AWS Site-to-Site VPN connection. For more information, see What is AWS site-to-site VPN?
• An AWS Direct Connect connection. For more information, see What is AWS direct connect?
If you are using AWS API operations to interact with Amazon QuickSight through the network, clients
must support Transport Layer Security (TLS) 1.0. We recommend TLS 1.2. Clients must also support
cipher suites with Perfect Forward Secrecy (PFS), such as Ephemeral Diffie-Hellman (DHE) or Elliptic
Curve Diffie-Hellman Ephemeral (ECDHE). Most modern systems such as Java 7 and later support these
modes. You must sign requests using an access key ID and a secret access key that are associated with
943
Amazon QuickSight User Guide
Accessing data sources
an IAM principal, or you can use the AWS Security Token Service (STS) to generate temporary security
credentials to sign requests.
Use this section to help you configure access to resources in other AWS services.
We recommend that you use SSL to secure Amazon QuickSight connections to your data sources. To use
SSL, you must have a certificate signed by a recognized certificate authority (CA). Amazon QuickSight
doesn't accept certificates that are self-signed or issued from a nonpublic CA. For more information, see
QuickSight SSL and CA certificates (p. 1038).
Topics
• Required permissions (p. 944)
• Allowing autodiscovery of AWS resources (p. 945)
• Authorizing connections to AWS data stores (p. 946)
• Accessing AWS resources (p. 965)
• Exploring your AWS data in Amazon QuickSight (p. 968)
Required permissions
When you connect to a data source that requires a user name, the user name must have SELECT
permissions on some system tables. These permissions allow Amazon QuickSight to do things such as
discover table schemas and estimate table size.
The following table identifies the tables that the user account must have SELECT permissions for,
depending on the type of database you are connecting to. These requirements apply for all database
instances you connect to, regardless of their environment. In other words, they apply whether your
database instances are on-premises, in Amazon RDS, in Amazon EC2, or elsewhere.
944
Amazon QuickSight User Guide
Accessing data sources
INFORMATION_SCHEMA.TABLES
pg_class
pg_namespace
MariaDB INFORMATION_SCHEMA.STATISTICS
INFORMATION_SCHEMA.TABLES
sp_statistics
MySQL INFORMATION_SCHEMA.STATISTICS
INFORMATION_SCHEMA.TABLES
Oracle DBA_TAB_COLS
ALL_TABLES
dba_segments
all_segments
user_segments
PostgreSQL pg_stats
pg_class
pg_namespace
Note
If you are using MySQL or PostgreSQL, verify that you are connecting from an allowed host
or IP address. For more detail, see Database configuration requirements for self-administered
instances (p. 1039).
945
Amazon QuickSight User Guide
Accessing data sources
Each AWS service that you access from Amazon QuickSight needs to allow traffic from QuickSight.
Instead of opening each service console separately to add permissions, a QuickSight administrator can
do this in the administration screen. Before you begin, make sure that you have addressed the following
prerequisites.
If you choose to enable autodiscovery of AWS resources for your Amazon QuickSight account, Amazon
QuickSight creates an AWS Identity and Access Management (IAM) role in your AWS account. This IAM
role grants your account permission to identify and retrieve data from your AWS data sources.
Because AWS limits the number of IAM roles that you can create, make sure that you have at least
one free role. You need this role for Amazon QuickSight to use if you want Amazon QuickSight to
autodiscover your AWS resources.
You can have Amazon QuickSight autodiscover Amazon RDS DB instances or Amazon Redshift clusters
that are associated with your AWS account. These resources must be located in the same AWS Region as
your Amazon QuickSight account.
If you choose to enable autodiscovery, choose one of the following options to make the AWS resource
accessible:
• For Amazon RDS DB instances that you created in a default VPC and didn't make private, or that aren't
in a VPC (EC2-Classic instances), see Authorizing connections from Amazon QuickSight to Amazon RDS
DB instances (p. 947). In this topic, you can find information on creating a security group to allow
connections from Amazon QuickSight servers.
• For Amazon Redshift clusters that you created in a default VPC and didn't choose to make private,
or that aren't in a VPC (that is, EC2-Classic instances), see Authorizing connections from Amazon
QuickSight to Amazon Redshift clusters (p. 950). In this topic, you can find information on creating a
security group to allow connections from Amazon QuickSight servers.
• For an Amazon RDS DB instance or Amazon Redshift cluster that is in a nondefault VPC, see
Authorizing connections from Amazon QuickSight to Amazon RDS DB instances (p. 947) or
Authorizing connections from Amazon QuickSight to Amazon Redshift clusters (p. 950). In these
topics, you can find information on first creating a security group to allow connections from Amazon
QuickSight servers. In addition, you can find information on then verifying that the VPC meets the
requirements described in Network configuration for an AWS instance in a nondefault VPC (p. 1037).
• If you don't use a private VPC, set up the Amazon RDS instance to allow connections from the Amazon
QuickSight Region's public IP address.
Enabling autodiscovery is the easiest way to make this data available in Amazon QuickSight. You can still
manually create data connections whether or not you enable autodiscovery.
For Amazon QuickSight to access your AWS resources, you must create security groups for them that
authorize connections from the IP address ranges used by Amazon QuickSight servers. You must have
AWS credentials that permit you to access these AWS resources to modify their security groups.
Use the procedures in the following sections to enable Amazon QuickSight connections.
946
Amazon QuickSight User Guide
Accessing data sources
Topics
• Authorizing connections from Amazon QuickSight to Amazon RDS DB instances (p. 947)
• Authorizing connections from Amazon QuickSight to Amazon Redshift clusters (p. 950)
• Authorizing connections from Amazon QuickSight to Amazon EC2 instances (p. 956)
• Authorizing connections through AWS Lake Formation (p. 959)
• Authorizing connections to Amazon OpenSearch Service (p. 961)
• Authorizing connections to Amazon Athena (p. 963)
For Amazon QuickSight to connect to an Amazon RDS DB instance, you must create a new security
group for that DB instance. This security group contains an inbound rule authorizing access from the
appropriate IP address range for the Amazon QuickSight servers in that AWS Region. To learn more
about authorizing Amazon QuickSight connections, see Manually enabling access to an Amazon RDS
instance in a VPC (p. 947) or Manually enabling access to an Amazon RDS instance that is not in a
VPC (p. 949).
To create and assign a security group for an Amazon RDS DB instance, you must have AWS credentials
that permit access to that DB instance.
Enabling connection from Amazon QuickSight servers to your instance is just one of several prerequisites
for creating a data set based on an AWS database data source. For more information about what is
required, see Creating datasets from new database data sources (p. 95).
Use the following procedure to enable Amazon QuickSight access to an Amazon RDS DB instance in a
VPC. If your Amazon RDS DB instance is in subnet that is private (in relation to Amazon QuickSight) or
that has Internet Gateways attached, see Connecting to a VPC with Amazon QuickSight (p. 1040).
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. Choose Databases, locate the DB instance, and view its details. To do this, you click directly on its
name (a hyperlink in the DB identifier column).
3. Locate Port and note the Port value. This can be a number or a range.
4. Locate VPC and note the VPC value.
5. Choose the VPC value to open the VPC console. In the Amazon VPC Management Console, choose
Security Groups in the navigation pane.
6. Choose Create Security Group.
7. On the Create Security Group page, enter the security group information as follows:
947
Amazon QuickSight User Guide
Accessing data sources
For example, for Europe (Ireland) you would enter Europe (Ireland)'s CIDR address block:
52.210.255.224/27. For more information on the IP address ranges for Amazon QuickSight in
supported AWS Regions, see AWS Regions, websites, IP address ranges, and endpoints (p. 915).
Note
If you have activated Amazon QuickSight in multiple AWS Regions, you can create
inbound rules for each Amazon QuickSight endpoint CIDR. Doing this allows Amazon
QuickSight to have access to the Amazon RDS DB instance from any AWS Region defined
in the inbound rules.
Anyone who uses Amazon QuickSight in multiple AWS Regions is treated as a single user.
In other words, even if you are using Amazon QuickSight in every AWS Region, both
your Amazon QuickSight subscription (sometimes called an 'account') and your users are
global.
12. For Description, enter a useful description, for example "Europe (Ireland) QuickSight".
13. Choose Save rules to save your new inbound rule. Then choose Close.
14. Go back to the detailed view of the DB instance. Return the Amazon RDS console (https://
console.aws.amazon.com/rds/) and choose Databases.
15. Choose the DB identifier for the relevant RDS instance. Choose Modify. The same screen displays
whether you choose Modify from the databases screen or the DB instance screen: Modify DB
Instance.
16. Locate the Network & Security section (the third section from the top).
The currently assigned security group or groups are already chosen for Security Group. Don't
remove any of the existing ones unless you are sure.
Instead, choose your new security group to add it to the other groups that are selected. If you
followed the name suggested previously, this group might be named something similar to Amazon-
QuickSight-access.
17. Scroll to the bottom of the screen. Choose Continue. and then choose Modify DB Instance.
18. Choose Apply during the next scheduled maintenance (the screen indicates when this will occur).
Don't choose Apply immediately. Doing this also applies any additional changes that are in the
pending modifications queue. Some of these changes might require downtime. If you bring the
server down outside the maintenance window, this can cause a problem for users of this DB instance.
Consult your system administrators before applying immediate changes.
948
Amazon QuickSight User Guide
Accessing data sources
19. Choose Modify DB Instance to confirm your changes. Then, wait for the next maintenance window
to pass.
Use the following procedure to access an Amazon RDS DB instance that is not in a VPC. You can associate
a security group with a DB instance by using Modify on the RDS console, the ModifyDBInstance
Amazon RDS API, or the modify-db-instance AWS CLI command.
Note
This section included for backwards compatibility purposes.
To use the console to access an Amazon RDS DB instance that is not in a VPC
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. Choose Databases, select the DB instance, and choose Modify.
3. Choose Security Groups in the navigation pane.
4. Choose Create DB Security Group.
5. Enter Amazon-QuickSight-access for the Name and Description values, and then choose
Create.
6. The new security group is selected by default.
Select the details icon next to the security group, as shown following.
9. Choose Authorize.
10. Return to the Instances page of the Amazon RDS Management Console, choose the instance that
you want to enable access to, choose Instance Actions, and then choose Modify.
11. In the Network & Security section, the currently assigned security group or groups already is chosen
for Security Group. Press CTRL and choose Amazon-QuickSight-access in addition to the other
selected groups.
949
Amazon QuickSight User Guide
Accessing data sources
For Amazon QuickSight to connect to an Amazon Redshift instance, you must create a new security
group for that instance. This security group contains an inbound rule authorizing access from the
appropriate IP address range for the Amazon QuickSight servers in that AWS Region. To learn more
about authorizing Amazon QuickSight connections, see Manually enabling access to an Amazon Redshift
cluster in a VPC (p. 950) or Manually enabling access to an Amazon Redshift cluster that is not in a
VPC (p. 954).
To create and assign a security group for an Amazon Redshift cluster, you must have AWS credentials
that permit access to that cluster.
Enabling connection from Amazon QuickSight servers to your cluster is just one of several prerequisites
for creating a data set based on an AWS database data source. For more information about what is
required, see Creating datasets from new database data sources (p. 95).
Use the following procedure to enable Amazon QuickSight access to an Amazon Redshift cluster in a
VPC.
1. Sign in to the AWS Management Console and open the Amazon Redshift console at https://
console.aws.amazon.com/redshift/.
2. Choose the details page icon next to the cluster you want to make available, as shown following.
950
Amazon QuickSight User Guide
Accessing data sources
3. In the Cluster Database Properties section, find Port. Note the Port value.
4. In the Cluster Properties section, find VPC ID and note the VPC ID value. Choose View VPCs to open
the Amazon VPC Management Console.
5. On the Amazon VPC Management Console, choose Security Groups in the navigation pane.
6. Choose Create Security Group.
7. On the Create Security Group page, enter the security group information as follows:
951
Amazon QuickSight User Guide
Accessing data sources
952
Amazon QuickSight User Guide
Accessing data sources
953
Amazon QuickSight User Guide
Accessing data sources
12. The currently assigned security groups are already chosen for VPC Security Groups. Press CTRL and
choose Amazon-QuickSight-access in addition to the other selected groups.
13. Choose Modify.
Use the following procedure to access an Amazon Redshift cluster that is not in a VPC.
1. Sign in to the AWS Management Console and open the Amazon Redshift console at https://
console.aws.amazon.com/redshift/.
2. Choose Security in the navigation pane.
3. Choose Create Cluster Security Group.
4. Enter Amazon-QuickSight-access for the Cluster Security Group Name and Description values,
and then choose Create.
5. Choose the details icon next to the security group, as shown following.
954
Amazon QuickSight User Guide
Accessing data sources
8. Choose Authorize.
9. Return to the Clusters page of the Amazon Redshift console, open the details page for the cluster
that you want to enable access to, choose Cluster, and then choose Modify.
10. The currently assigned security groups are already chosen for Cluster Security Group. Press CTRL
and choose Amazon-QuickSight-access in addition to the other selected groups.
11. Choose Modify.
Using Amazon Redshift Spectrum, you can connect Amazon QuickSight to an external catalog with
Amazon Redshift. For example, you can access the Amazon Athena catalog . You can then query
unstructured data on your Amazon S3 data lake using an Amazon Redshift cluster instead of the Athena
query engine.
You can also combine data sets that include data stored in Amazon Redshift and in S3. Then you can
access them using the SQL syntax in Amazon Redshift.
After you've registered your data catalog (for Athena) or external schema (for a Hive metastore), you
can use Amazon QuickSight to choose the external schema and Amazon Redshift Spectrum tables. This
process works just as for any other Amazon Redshift tables in your cluster. You don't need to load or
transform your data.
For more information on using Amazon Redshift Spectrum, see Using Amazon Redshift Spectrum to
query external data in the Amazon Redshift Database Developer Guide.
• Create or identify an IAM role associated with the Amazon Redshift cluster.
• Add the IAM policies AmazonS3ReadOnlyAccess and AmazonAthenaFullAccess to the IAM role.
• Register an external schema or data catalog for the tables that you plan to use.
Redshift Spectrum lets you separate storage from compute, so you can scale them separately. You only
pay for the queries that you run.
955
Amazon QuickSight User Guide
Accessing data sources
To connect to Redshift Spectrum tables, you don't need to grant Amazon QuickSight access to Amazon
S3 or Athena. Amazon QuickSight needs access only to the Amazon Redshift cluster. For full details
on configuring Redshift Spectrum, see Getting started with Amazon Redshift Spectrum in the Amazon
Redshift Database Developer Guide.
For Amazon QuickSight to connect to an Amazon EC2 instance, you must create a new security group for
that instance. This security group contains an inbound rule authorizing access from the appropriate IP
address range for the Amazon QuickSight servers in that AWS Region.
To modify the security groups for these Amazon EC2 instances, you must have AWS credentials that
permit you to access to the instances.
Enabling connection from Amazon QuickSight servers to your instance is just one of several prerequisites
for creating a data set based on an AWS database data source. For more information about what is
required, see Creating datasets from new database data sources (p. 95).
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. If your EC2 instance is in a VPC, choose the instance to view the instance details pane. Find its VPC ID
and note that ID for later use.
3. Choose Security Groups in the NETWORK & SECURITY section of the navigation pane. Then choose
Create Security Group, as shown following.
956
Amazon QuickSight User Guide
Accessing data sources
957
Amazon QuickSight User Guide
Accessing data sources
QuickSight in every AWS Region, both your Amazon QuickSight account and your users
are global.
7. Choose Create.
8. Choose Instances in the INSTANCES section of the navigation pane, and then choose the instance
that you want to enable access to.
9. Choose Actions, then Networking, and then Change Security Groups.
10. In Change Security Groups, choose the Amazon-QuickSight-access security group.
958
Amazon QuickSight User Guide
Accessing data sources
If you are querying data with Amazon Athena, you can use AWS Lake Formation to simplify how you
secure and connect to your data from Amazon QuickSight. Lake Formation adds to the AWS Identity and
Access Management (IAM) permissions model by providing its own permissions model that is applied
to AWS analytics and machine learning services. This centrally defined permissions model controls data
access at a granular level through a simple grant and revoke mechanism. You can use Lake Formation
instead of, or in addition to, using scoped-down policies with IAM.
When you set up Lake Formation, you register your data sources to allow it to move the data into a new
data lake in Amazon S3. Lake Formation and Athena both work seamlessly with AWS Glue Data Catalog,
making it easy to use them together. Athena databases and tables are metadata containers. These
containers describe the underlying schema of the data, the data definition language (DDL) statements,
and the location of the data in Amazon S3.
The following diagram shows the relationships of the AWS services involved.
959
Amazon QuickSight User Guide
Accessing data sources
After Lake Formation is configured, you can use Amazon QuickSight to access databases and tables by
name or through SQL queries. Amazon QuickSight provides a full-featured editor where you can write
SQL queries. Or you can use the Athena console, the AWS CLI, or your favorite query editor. For more
information, see Accessing Athena in the Amazon Athena User Guide.
To set up Lake Formation, the person or team who works on it needs access to create a new IAM role and
to Lake Formation. They also need the information shown in the following list. For more information, see
Setting up lake formation in the AWS Lake Formation Developer Guide.
• Collect the Amazon Resource Names (ARNs) of the Amazon QuickSight users and groups that
need to access the data in Lake Formation. These users should be Amazon QuickSight authors or
administrators.
1. Use the AWS CLI to find user ARNs for Amazon QuickSight authors and admins. To do this, run
the following list-users command in your terminal (Linux or Mac) or at your command prompt
(Windows).
The response returns information for each user. We show the Amazon Resource Name (ARN) in
bold in the following example.
RequestId: a27a4cef-4716-48c8-8d34-7d3196e76468
Status: 200
UserList:
- Active: true
Arn: arn:aws:quicksight:us-east-1:111122223333:user/default/SaanviSarkar
Email: [email protected]
PrincipalId: federated/iam/AIDAJVCZOVSR3DESMJ7TA
Role: ADMIN
UserName: SaanviSarkar
To avoid using the AWS CLI, you can construct the ARNs for each user manually.
2. (Optional) Use the AWS CLI to find ARNs for Amazon QuickSight groups by running the following
list-group command in your terminal (Linux or Mac) or at your command prompt (Windows).
The response returns information for each group. The ARN appears in bold in the following
example.
GroupList:
- Arn: arn:aws:quicksight:us-east-1:111122223333:group/default/DataLake-Scorecard
Description: Data Lake for CXO Balanced Scorecard
GroupName: DataLake-Scorecard
PrincipalId: group/d-90671c9c12/6f9083c2-8400-4389-8477-97ef05e3f7db
960
Amazon QuickSight User Guide
Accessing data sources
RequestId: c1000198-18fa-4277-a1e2-02163288caf6
Status: 200
If you don't have any Amazon QuickSight groups, add a group by using the AWS CLI to run
the create-group command. There currently isn't an option to do this from the Amazon
QuickSight console. For more information, see Creating and managing groups in Amazon
QuickSight (p. 1019).
To avoid using the AWS CLI, you can construct the ARNs for each group manually.
For information about how to verify or change AWS resource permissions in Amazon QuickSight, see
Allowing autodiscovery of AWS resources (p. 945) and Accessing data sources (p. 944).
Before you can use OpenSearch in a QuickSight dataset, there are a few tasks for the QuickSight
administrator to complete with the cooperation of a person who has access to the OpenSearch console.
To get started, identify each OpenSearch domain that you want to connect to. Then gather the following
information for each domain:
961
Amazon QuickSight User Guide
Accessing data sources
Before you proceed, the QuickSight administrator enables authorized connections from QuickSight to
OpenSearch Service. This process is required for every AWS service that you connect to from QuickSight.
You need to do this only once per AWS account for each AWS service that you use as a data source.
For OpenSearch Service, the authorization process adds the AWS managed policy
AWSQuickSightOpenSearchPolicy to your AWS account.
Important
Make sure that the IAM policy for your OpenSearch domain doesn't conflict with the permissions
in AWSQuickSightOpenSearchPolicy. You can find the domain access policy in the
OpenSearch Service console. For more information, see Configuring access policies in the
Amazon OpenSearch Service Developer Guide.
If a connection isn't already defined in QuickSight for the VPC that you want to use, you can create one.
This task is a multistep process that you need to complete before you proceed. To learn how to add
QuickSight to a VPC and add a connection from QuickSight to the VPC, see Connecting to a VPC with
Amazon QuickSight (p. 1040).
1. For domains that use fine-grained access control, configure permissions in the form of a role. This
process is similar to using scoped-down policies in QuickSight.
2. For each domain that you create a role for, add a role mapping.
If your OpenSearch domain has fine-grained access control enabled, there are some permissions to
configure so the domain is accessible from QuickSight. Perform these steps for each domain that you
want to use.
The following procedure uses OpenSearch Dashboards, which is an open-source tool that works with
OpenSearch. You can find the link to Dashboards on the domain dashboard on the OpenSearch Service
console.
1. Open OpenSearch Dashboards for the OpenSearch domain that you want to work with. The URL is
opensearch-domain-endpoint/dashboards/.
962
Amazon QuickSight User Guide
Accessing data sources
If you don't see the navigation pane, open it by using the menu icon at upper left. To keep the menu
open, choose Dock navigation at lower left.
3. Choose Roles, Create role.
4. Name the role quicksight_role.
You can choose a different name, but we recommend this one because we use it in our
documentation and it's thus easier to support.
5. Under Cluster permissions, add the following permissions:
• cluster:monitor/main
• cluster:monitor/health
• cluster:monitor/state
• indices:data/read/scroll
• indices:data/read/scroll/clear,
6. Under Index permissions specify * as the index pattern.
7. For Index permissions, add the following permissions:
• indices:admin/get
• indices:admin/mappings/fields/get*
• indices:data/read/search*
8. Choose Create.
9. Repeat this procedure for each OpenSearch domain that you're planning to use.
Use the following procedure to add a role mapping for the permissions that you added in the previous
procedure. You might find it more efficient to add the permissions and the role mapping as part of a
single process. These instructions are separate for clarity.
1. Open OpenSearch Dashboards for the OpenSearch domain that you want to work with. The URL is
opensearch-domain-endpoint/dashboards/.
2. Choose Security from the navigation pane.
3. Search for and open quicksight_role from the list.
4. On the Mapped users tab, choose Manage mapping.
5. In the Backend roles section, enter the ARN of the AWS-managed IAM role for QuickSight. Following
is an example.
arn:aws:iam::AWS-ACCOUNT-ID:role/service-role/aws-quicksight-service-role-v0
6. Choose Map.
7. Repeat this procedure for each OpenSearch domain that you want to use.
963
Amazon QuickSight User Guide
Accessing data sources
data that's stored in relational, non-relational, object, and custom data sources. For more information,
see Using Athena federated query in the Amazon Athena User Guide.
Review the following considerations when setting up access to Athena from QuickSight:
• Athena stores query results from QuickSight in a bucket. By default, this bucket has a name similar
to aws-athena-query-results-AWSREGION-AWSACCOUNTID, for example aws-athena-query-
results-us-east-2-111111111111. Therefore, it's important to make sure QuickSight has
permissions to access the bucket Athena is currently using.
• If your data file is encrypted with an AWS KMS key, grant permissions to the Amazon QuickSight IAM
role to decrypt the key. The easiest way to do this is to use the AWS CLI.
You can run the KMS create-grant API operation in AWS CLI to do this.
The Amazon Resource Name (ARN) for the Amazon QuickSight role has the format
arn:aws:iam::<account id>:role/service-role/aws-quicksight-s3-consumers-role-
v<version number> and can be accessed from the IAM console. To find your KMS key ARN, use the
S3 console. Go to the bucket that contains your data file and choose the Overview tab. The key is
located near KMS key ID.
• For Amazon Athena, Amazon S3, and Athena Query Federation connections, QuickSight uses the
following IAM role by default:
arn:aws:iam::AWS-ACCOUNT-ID:role/service-role/aws-quicksight-s3-consumers-role-v0
arn:aws:iam::AWS-ACCOUNT-ID:role/service-role/aws-quicksight-service-role-v0
• If you assigned scope-down policies to your users, verify that the policies contain the
lambda:InvokeFunction permission. Without this permission, your users can't access Athena
Federated Queries. For more information about assigning IAM policies to your users in QuickSight,
see Setting granular access to AWS services through IAM (p. 967). For more information about the
lambda:InvokeFunction permission, see Actions, resources, and condition keys for AWS Lambda in the
IAM User Guide.
1. (Optional) If you are using AWS Lake Formation with Athena, you also need to enable
Lake Formation. For more information, see Authorizing connections through AWS Lake
Formation (p. 959).
2. Open your profile menu at top right and choose Manage QuickSight. You must be a QuickSight
administrator to do this. If you don't see Manage QuickSight on the profile menu, you don't have
sufficient permissions.
3. Choose Security & permissions, Add or remove.
4. Choose the box near Amazon Athena, Next.
If it was already enabled, you might have to double-click it. Do this even if Amazon Athena is already
enabled, so you can view the settings. No changes are saved until you choose Update at the end of
this procedure.
5. Enable the S3 buckets you want to access.
6. (Optional) To enable Athena federated queries, select the Lambda functions you want to use.
964
Amazon QuickSight User Guide
Accessing data sources
Note
You can only see Lambda functions for the Athena catalogs in the same region of
QuickSight.
7. To confirm your changes, choose Finish.
If you don't have sufficient permissions to connect to an Athena dataset or run an Athena query, an
error displays directing you to contact a QuickSight administrator. This error means need to recheck
your connection authorization settings to find the discrepancy. .
5. After you can connect successfully, you or your QuickSight authors can create data sources
connections and share them with other QuickSight authors. The authors can then create multiple
datasets from the connections, to use in QuickSight dashboards.
For troubleshooting information on Athena, see Connectivity issues when using Amazon Athena
with Amazon QuickSight (p. 888).
You can control the AWS resources that Amazon QuickSight can access and scope down access to these
resources at a more granular level. In Enterprise edition, you can also set up general access defaults for
everyone in your account, and you can set up specific access for individual users and groups.
Use the following sections to help you configure your AWS resources to work with Amazon QuickSight.
Before you begin, make sure that you have the correct permissions; your system administrator can
give you these. To do so, your system administrator creates a policy that enables you to use certain
IAM actions. Your system administrator then associates that policy with your user or group in IAM. The
required actions are the following:
965
Amazon QuickSight User Guide
Accessing data sources
To enable or disable the AWS services that Amazon QuickSight can access
A screen appears where you can enable all available AWS services.
Note
If you see a permissions error, and you're an authorized Amazon QuickSight administrator,
contact your system administrator for assistance.
5. Select the check boxes for the services that you want to allow. Clear check boxes for services that
you don't want to allow.
If you have already enabled an AWS service, the check box for that service is already selected. If
Amazon QuickSight can't access a particular AWS service, its check box is not selected.
This policy used by Amazon QuickSight for AWS resource access was
modified outside of Amazon QuickSight, so you can no longer edit this
policy to provide AWS resource permission to Amazon QuickSight. To edit
this policy permissions, go to the IAM console and delete this policy
permission with policy arn - arn:aws:iam::111122223333:policy/service-role/
AWSQuickSightS3Policy.
This type of message means that one of the IAM policies that Amazon QuickSight uses was manually
altered. To fix this, the system administrator needs to delete the IAM policy listed in the error
message and reload the Security & permissions screen before you try again.
6. Choose Update to confirm, or Cancel to return to the previous screen.
Topics
• Setting default resource access to AWS services (p. 966)
• Setting granular access to AWS services through IAM (p. 967)
In Enterprise edition, you can configure specific permissions for the AWS services that an Amazon
QuickSight user can access. If no such configuration occurs, Amazon QuickSight uses a default set of
permissions based on the user's settings. The current behavior is displayed in a blue information box.
To change the default resource access for all users (to use when no other permissions are
configured)
966
Amazon QuickSight User Guide
Accessing data sources
2. At upper left, choose your user name, and then choose Manage QuickSight.
3. Choose Security & permissions.
4. Under Default resource access, choose Change.
5. Choose one of the following:
In Enterprise edition, Amazon QuickSight provides a way for you to set up detailed access to resources in
AWS services. Like every other AWS service, Amazon QuickSight uses IAM policies to control access for
users and groups.
Before you begin, ask an IAM administrator to set up the necessary IAM policies ahead of time. If
these are set up, you can select them as part of the procedure in this section. For information about
creating IAM policies to use with Amazon QuickSight, see Identity and access management in Amazon
QuickSight (p. 970).
The remaining steps at this point involve choosing an IAM policy to assign to the user or group. You
can assign multiple IAM policies to one Amazon QuickSight user or group. To determine permissions,
Amazon QuickSight performs a union and an intersection with the AWS account–level policies.
If you already have active IAM policy assignments, they are listed on this page. You can search for
existing assignments by using the search box. If you have drafts that aren't active yet, they are listed
under Assignment drafts.
5. Choose one of the following:
If you are creating or editing an assignment, continue to the next step. Otherwise, skip to the end of
this procedure.
967
Amazon QuickSight User Guide
Accessing data sources
6. On the next screen, you perform the policy assignment process, which is divided into steps. As
you work through the steps, you can go forward or backward to make changes. When you exit the
screen, your changes from all of the steps are saved.
a. Step 1: Name assignment – If this is a new assignment, enter a name for the assignment, and
then choose Next to continue. If you want to change the name, choose Step 1 at left.
b. Step 2: Select an IAM policy – Choose an IAM policy that you want to use. From this screen, you
can interact with the policies as follows:
To choose a policy, choose the button beside it, and then choose Next to continue.
c. Step 3: Assign users and groups – Choose specific users or groups. Or choose to use the
selected IAM policy for all users and groups.
• For Assign to all users and groups, select the check box to assign the IAM policy to all
Amazon QuickSight users and groups. Choosing this option assigns the policy to all current
and future users and groups.
• Choose the users and groups you want to assign to this IAM policy. You can search for them
by name, email address, or group name.
When you are finished selecting users and groups, choose Next to continue.
d. Step 4: Review and enable changes – Save your changes.
Use this section to learn how to explore AWS data in Amazon QuickSight using the AWS Management
Console. Using the Explore in QuickSight shortcut, you can access a customizable dashboard template
showing your data. Just as with any Amazon QuickSight dashboard, this dashboard can be refreshed on a
schedule, published, and shared with other users in your organization.
Topics
• Exploring Amazon S3 analytics data (p. 969)
968
Amazon QuickSight User Guide
Accessing data sources
After you have enabled storage class analysis, you can use Amazon QuickSight to explore your S3
analytics data.
When you choose the option to explore in Amazon QuickSight, your S3 analytics data is automatically
loaded into the dashboard template. The dashboard contains multiple visualizations to help you to
understand the storage access pattern of your bucket.
Use the template as is, or customize it to suit your needs. For example, one visual on the default
template helps you identify infrequently accessed data. It compares the amount of data retrieved to the
amount of storage consumed, for objects of different ages.
969
Amazon QuickSight User Guide
Identity and access management
You can also add your own visualizations to the dashboard. For example, you can break down the data
access patterns, using filters for storage class analysis that you already have defined in S3 analytics.
To learn more about using S3 analytics and storage class analysis, see Amazon S3 analytics – Storage
class analysis in the Amazon S3 Developer Guide.
Amazon QuickSight Enterprise edition integrates with your existing directories, using either Microsoft
Active Directory or single sign-on (SSO) using Security Assertion Markup Language (SAML). You can use
AWS Identity and Access Management (IAM) to further enhance your security, or for custom options such
as embedding dashboards.
In Amazon QuickSight Standard edition, you can manage users entirely within Amazon QuickSight. If you
prefer, you can integrate with your existing users, groups, and roles in IAM.
You can use the following tools for identity and access to Amazon QuickSight:
970
Amazon QuickSight User Guide
Service control policies (SCP)
AWS Organizations is an account management service that you can use to consolidate multiple
AWS accounts into an organization that you create and centrally manage. You can use SCPs in AWS
Organizations to manage the permissions in your organization. For more information, see What is AWS
Organizations? and Service control policies in the AWS Organizations User Guide.
In the following topic, you can learn about two ways to restrict Amazon QuickSight sign-up options using
SCPs in AWS Organizations. The topic includes an example SCP. To learn more about creating SCPs, see
the following topics in the AWS Organizations User Guide:
971
Amazon QuickSight User Guide
Service control policies (SCP)
Example SCP
The following example for Amazon QuickSight shows a service control policy that denies signing up for
a QuickSight Standard Edition and turns off the ability to sign up using QuickSight or Active Directory
credentials. This policy uses the quicksight:subscribe action, in addition to the condition keys
previously described. For a list of QuickSight-specific keys for use in IAM permission policies, seeActions,
resources, and condition keys for Amazon QuickSight in the Service Authorization Reference.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Statement1",
"Effect": "Deny",
"Action": [
"quicksight:Subscribe"
],
"Resource": [
"*"
],
"Condition": {
"ForAnyValue:StringEquals": {
"quicksight:DirectoryType": [
"microsoft_ad",
"quicksight",
"ad_connector"
]
}
}
},
{
"Sid": "Statement2",
"Effect": "Deny",
"Action": [
"quicksight:Subscribe"
],
"Resource": [
"*"
],
"Condition": {
"StringEquals": {
"quicksight:Edition": "standard"
}
}
}
]
}
With this policy in effect, individuals in an organization can sign up only for QuickSight Enterprise
Edition. Additionally, they can sign up only using the IAM federated identities option. If they attempt to
sign up for QuickSight Standard Edition or by using another form of authentication, they are restricted
from signing up. They receive a message explaining that they don’t have the right permissions to sign up
for QuickSight.
972
Amazon QuickSight User Guide
IAM
AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely
control access to AWS resources. IAM administrators control who can be authenticated (signed in) and
authorized (have permissions) to use Amazon QuickSight resources. IAM is an AWS service that you can
use with no additional charge.
Topics
• Introduction to IAM concepts (p. 973)
• Using Amazon QuickSight with IAM (p. 977)
• IAM policy examples for Amazon QuickSight (p. 983)
• Provisioning users for Amazon QuickSight (p. 989)
• Troubleshooting Amazon QuickSight identity and access (p. 990)
IAM is used with Amazon QuickSight in several ways, including the following:
• If your company uses IAM for their identity management, people might have IAM user names and
passwords that they use to sign in to Amazon QuickSight.
• If you want your Amazon QuickSight users to be automatically created at first sign-in, you can use IAM
to create a policy for users who are preauthorized to use Amazon QuickSight.
• If you want to create specialized access for specific groups of users or to specific resources, you can use
IAM policies to accomplish this.
Audience
Use the following to help understand the context of the information provided in this section, and how it
applies to your role. How you use AWS Identity and Access Management (IAM) differs depending on the
work that you do in Amazon QuickSight.
Service user – In some cases, you might use Amazon QuickSight to interact with data, analyses, and
dashboards through the Amazon QuickSight by using the browser interface. In these cases, this section
provides only background information for you. You don't directly interact with the IAM service, except if
you use IAM to sign into Amazon QuickSight.
IAM administrator – If you're an IAM administrator, you might want to learn details about how you can
write policies to manage access to Amazon QuickSight. To view examples of Amazon QuickSight identity-
based policies that you can use in IAM, see IAM identity-based policies for Amazon QuickSight (p. 983).
973
Amazon QuickSight User Guide
IAM
You must be authenticated (signed in to AWS) as the AWS account root user, an IAM user, or by assuming
an IAM role. You can also use your company's single sign-on authentication or even sign in using Google
or Facebook. In these cases, your administrator previously set up identity federation using IAM roles.
When you access AWS using credentials from another company, you are assuming a role indirectly.
To sign in directly to the AWS Management Console, use your password with your root user email
address or your IAM user name. You can access AWS programmatically using your root user or IAM
users access keys. AWS provides SDK and command line tools to cryptographically sign your request
using your credentials. If you don't use AWS tools, you must sign the request yourself. Do this using
Signature Version 4, a protocol for authenticating inbound API requests. For more information about
authenticating requests, see Signature Version 4 signing process in the AWS General Reference.
Regardless of the authentication method that you use, you might also be required to provide additional
security information. For example, AWS recommends that you use multi-factor authentication (MFA) to
increase the security of your account. To learn more, see Using multi-factor authentication (MFA) in AWS
in the IAM User Guide.
When you create an AWS account, you begin with one sign-in identity that has complete access to
all AWS services and resources in the account. This identity is called the AWS account root user and is
accessed by signing in with the email address and password that you used to create the account. We
strongly recommend that you do not use the root user for your everyday tasks. Safeguard your root user
credentials and use them to perform the tasks that only the root user can perform. For the complete list
of tasks that require you to sign in as the root user, see Tasks that require root user credentials in the
AWS General Reference.
An IAM user is an identity within your AWS account that has specific permissions for a single person or
application. Where possible, we recommend relying on temporary credentials instead of creating IAM
users who have long-term credentials such as passwords and access keys. However, if you have specific
use cases that require long-term credentials with IAM users, we recommend that you rotate access keys.
For more information, see Rotate access keys regularly for use cases that require long-term credentials in
the IAM User Guide.
An IAM group is an identity that specifies a collection of IAM users. You can't sign in as a group. You
can use groups to specify permissions for multiple users at a time. Groups make permissions easier to
manage for large sets of users. For example, you could have a group named IAMAdmins and give that
group permissions to administer IAM resources.
Users are different from roles. A user is uniquely associated with one person or application, but a role
is intended to be assumable by anyone who needs it. Users have permanent long-term credentials, but
roles provide temporary credentials. To learn more, see When to create an IAM user (instead of a role) in
the IAM User Guide.
IAM roles
An IAM role is an identity within your AWS account that has specific permissions. It is similar to an IAM
user, but is not associated with a specific person. You can temporarily assume an IAM role in the AWS
Management Console by switching roles. You can assume a role by calling an AWS CLI or AWS API
974
Amazon QuickSight User Guide
IAM
operation or by using a custom URL. For more information about methods for using roles, see Using IAM
roles in the IAM User Guide.
IAM roles with temporary credentials are useful in the following situations:
• Federated user access – To assign permissions to a federated identity, you create a role and define
permissions for the role. When a federated identity authenticates, the identity is associated with
the role and is granted the permissions that are defined by the role. For information about roles for
federation, see Creating a role for a third-party Identity Provider in the IAM User Guide.
If you use IAM Identity Center, you configure a permission set. To control what your identities can
access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM. For
information about permissions sets, see Permission sets in the AWS IAM Identity Center (successor to
AWS Single Sign-On) User Guide.
• Temporary IAM user permissions – An IAM user or role can assume an IAM role to temporarily take on
different permissions for a specific task.
• Cross-account access – You can use an IAM role to allow someone (a trusted principal) in a different
account to access resources in your account. Roles are the primary way to grant cross-account access.
However, with some AWS services, you can attach a policy directly to a resource (instead of using a role
as a proxy). To learn the difference between roles and resource-based policies for cross-account access,
see How IAM roles differ from resource-based policies in the IAM User Guide.
• Cross-service access – Some AWS services use features in other AWS services. For example, when you
make a call in a service, it's common for that service to run applications in Amazon EC2 or store objects
in Amazon S3. A service might do this using the calling principal's permissions, using a service role, or
using a service-linked role.
• Principal permissions – When you use an IAM user or role to perform actions in AWS, you are
considered a principal. Policies grant permissions to a principal. When you use some services, you
might perform an action that then triggers another action in a different service. In this case, you
must have permissions to perform both actions. To see whether an action requires additional
dependent actions in a policy, see Actions, Resources, and Condition Keys for Amazon QuickSight in
the Service Authorization Reference.
• Service role – A service role is an IAM role that a service assumes to perform actions on your behalf.
An IAM administrator can create, modify, and delete a service role from within IAM. For more
information, see Creating a role to delegate permissions to an AWS service in the IAM User Guide.
• Service-linked role – A service-linked role is a type of service role that is linked to an AWS service.
The service can assume the role to perform an action on your behalf. Service-linked roles appear
in your IAM account and are owned by the service. An IAM administrator can view, but not edit the
permissions for service-linked roles.
• Applications running on Amazon EC2 – You can use an IAM role to manage temporary credentials
for applications that are running on an EC2 instance and making AWS CLI or AWS API requests.
This is preferable to storing access keys within the EC2 instance. To assign an AWS role to an EC2
instance and make it available to all of its applications, you create an instance profile that is attached
to the instance. An instance profile contains the role and enables programs that are running on the
EC2 instance to get temporary credentials. For more information, see Using an IAM role to grant
permissions to applications running on Amazon EC2 instances in the IAM User Guide.
To learn whether to use IAM roles or IAM users, see When to create an IAM role (instead of a user) in the
IAM User Guide.
975
Amazon QuickSight User Guide
IAM
in AWS as JSON documents. For more information about the structure and contents of JSON policy
documents, see Overview of JSON policies in the IAM User Guide.
Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can
perform actions on what resources, and under what conditions.
Every IAM entity (user or role) starts with no permissions. By default, users can do nothing, not even
change their own password. To give a user permission to do something, an administrator must attach
a permissions policy to a user. Or the administrator can add the user to a group that has the intended
permissions. When an administrator gives permissions to a group, all users in that group are granted
those permissions.
IAM policies define permissions for an action regardless of the method that you use to perform the
operation. For example, suppose that you have a policy that allows the iam:GetRole action. A user with
that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API.
Identity-based policies
Identity-based policies are JSON permissions policy documents that you can attach to an identity, such
as an IAM user, group of users, or role. These policies control what actions users and roles can perform,
on which resources, and under what conditions. To learn how to create an identity-based policy, see
Creating IAM policies in the IAM User Guide.
Identity-based policies can be further categorized as inline policies or managed policies. Inline policies
are embedded directly into a single user, group, or role. Managed policies are standalone policies that
you can attach to multiple users, groups, and roles in your AWS account. Managed policies include AWS
managed policies and customer managed policies. To learn how to choose between a managed policy or
an inline policy, see Choosing between managed policies and inline policies in the IAM User Guide.
Resource-based policies
Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-
based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-
based policies, service administrators can use them to control access to a specific resource. For the
resource where the policy is attached, the policy defines what actions a specified principal can perform
on that resource and under what conditions. You must specify a principal in a resource-based policy.
Principals can include accounts, users, roles, federated users, or AWS services.
Resource-based policies are inline policies that are located in that service. You can't use AWS managed
policies from IAM in a resource-based policy.
Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to
access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy
document format.
Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs. To learn more about
ACLs, see Access control list (ACL) overview in the Amazon Simple Storage Service Developer Guide.
AWS supports additional, less-common policy types. These policy types can set the maximum
permissions granted to you by the more common policy types.
• Permissions boundaries – A permissions boundary is an advanced feature in which you set the
maximum permissions that an identity-based policy can grant to an IAM entity (IAM user or role).
You can set a permissions boundary for an entity. The resulting permissions are the intersection of
entity's identity-based policies and its permissions boundaries. Resource-based policies that specify
976
Amazon QuickSight User Guide
IAM
the user or role in the Principal field are not limited by the permissions boundary. An explicit deny
in any of these policies overrides the allow. For more information about permissions boundaries, see
Permissions boundaries for IAM entities in the IAM User Guide.
• Service control policies (SCPs) – SCPs are JSON policies that specify the maximum permissions for
an organization or organizational unit (OU) in AWS Organizations. AWS Organizations is a service for
grouping and centrally managing multiple AWS accounts that your business owns. If you enable all
features in an organization, then you can apply service control policies (SCPs) to any or all of your
accounts. The SCP limits permissions for entities in member accounts, including each AWS account
root user. For more information about Organizations and SCPs, see How SCPs work in the AWS
Organizations User Guide.
• Session policies – Session policies are advanced policies that you pass as a parameter when you
programmatically create a temporary session for a role or federated user. The resulting session's
permissions are the intersection of the user or role's identity-based policies and the session policies.
Permissions can also come from a resource-based policy. An explicit deny in any of these policies
overrides the allow. For more information, see Session policies in the IAM User Guide.
When multiple types of policies apply to a request, the resulting permissions are more complicated to
understand. To learn how AWS determines whether to allow a request when multiple policy types are
involved, see Policy evaluation logic in the IAM User Guide.
Before you use IAM to manage access to Amazon QuickSight, you should understand what IAM features
are available to use with Amazon QuickSight. To get a high-level view of how Amazon QuickSight and
other AWS services work with IAM, see AWS Services That Work with IAM in the IAM User Guide.
Topics
• Amazon QuickSight Policies (identity-based) (p. 977)
• Amazon QuickSight policies (resource-based) (p. 980)
• Authorization based on Amazon QuickSight tags (p. 980)
• Amazon QuickSight IAM roles (p. 980)
• Passing IAM roles to Amazon QuickSight (p. 980)
You can use AWS root credentials or IAM user credentials to create an Amazon QuickSight account. AWS
root and administrator credentials already have all of the required permissions for managing Amazon
QuickSight access to AWS resources.
977
Amazon QuickSight User Guide
IAM
However, we recommend that you protect your root credentials, and instead use IAM user credentials.
To do this, you can create a policy and attach it to the IAM user and roles that you plan to use for
Amazon QuickSight. The policy must include the appropriate statements for the Amazon QuickSight
administrative tasks you need to perform, as described in the following sections.
Important
Be aware of the following when working with Amazon QuickSight and IAM policies:
• Avoid directly modifying a policy that was created by Amazon QuickSight. When you modify
it yourself, Amazon QuickSight can't edit it. This inability can cause an issue with the policy. To
fix this issue, delete the previously modified policy.
• If you get an error on permissions when you try to create an Amazon QuickSight account, see
Actions Defined by Amazon QuickSight in the IAM User Guide.
• In some cases, you might have an Amazon QuickSight account that you can't access even from
the root account (for example, if you accidentally deleted its directory service). In this case,
you can delete your old Amazon QuickSight account, then recreate it. For more information,
see Deleting your Amazon QuickSight subscription and closing the account (p. 925).
Actions
Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can
perform actions on what resources, and under what conditions.
The Action element of a JSON policy describes the actions that you can use to allow or deny access in a
policy. Policy actions usually have the same name as the associated AWS API operation. There are some
exceptions, such as permission-only actions that don't have a matching API operation. There are also
some operations that require multiple actions in a policy. These additional actions are called dependent
actions.
Policy actions in Amazon QuickSight use the following prefix before the action: quicksight:.
For example, to grant someone permission to run an Amazon EC2 instance with the Amazon EC2
RunInstances API operation, you include the ec2:RunInstances action in their policy. Policy
statements must include either an Action or NotAction element. Amazon QuickSight defines its own
set of actions that describe tasks that you can perform with this service.
To specify multiple actions in a single statement, separate them with commas as follows:
"Action": [
"quicksight:action1",
"quicksight:action2"]
You can specify multiple actions using wildcards (*). For example, to specify all actions that begin with
the word Create, include the following action:
"Action": "quicksight:Create*"
Amazon QuickSight provides a number of AWS Identity and Access Management (IAM) actions. All
Amazon QuickSight actions are prefixed with quicksight:, such as quicksight:Subscribe. For
information about using Amazon QuickSight actions in an IAM policy, see IAM policy examples for
Amazon QuickSight (p. 983).
To see the most up-to-date list of Amazon QuickSight actions, see Actions Defined by Amazon
QuickSight in the IAM User Guide.
978
Amazon QuickSight User Guide
IAM
Resources
Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can
perform actions on what resources, and under what conditions.
The Resource JSON policy element specifies the object or objects to which the action applies.
Statements must include either a Resource or a NotResource element. As a best practice, specify
a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific
resource type, known as resource-level permissions.
For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to
indicate that the statement applies to all resources.
"Resource": "*"
Following is an example policy. It means that the caller with this policy attached, is able to invoke the
CreateGroupMembership operation on any group, provided that the user name they are adding to the
group is not user1.
{
"Effect": "Allow",
"Action": "quicksight:CreateGroupMembership",
"Resource": "arn:aws:quicksight:us-east-1:aws-account-id:group/default/*",
"Condition": {
"StringNotEquals": {
"quicksight:UserName": "user1"
}
}
}
Some Amazon QuickSight actions, such as those for creating resources, cannot be performed on a
specific resource. In those cases, you must use the wildcard (*).
"Resource": "*"
Some API actions involve multiple resources. To specify multiple resources in a single statement,
separate the ARNs with commas.
"Resource": [
"resource1",
"resource2"
To see a list of Amazon QuickSight resource types and their Amazon Resource Names (ARNs), see
Resources Defined by Amazon QuickSight in the IAM User Guide. To learn with which actions you can
specify the ARN of each resource, see Actions Defined by Amazon QuickSight.
Condition keys
Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can
perform actions on what resources, and under what conditions.
The Condition element (or Condition block) lets you specify conditions in which a statement is in
effect. The Condition element is optional. You can create conditional expressions that use condition
operators, such as equals or less than, to match the condition in the policy with values in the request.
If you specify multiple Condition elements in a statement, or multiple keys in a single Condition
element, AWS evaluates them using a logical AND operation. If you specify multiple values for a single
979
Amazon QuickSight User Guide
IAM
condition key, AWS evaluates the condition using a logical OR operation. All of the conditions must be
met before the statement's permissions are granted.
You can also use placeholder variables when you specify conditions. For example, you can grant an IAM
user permission to access a resource only if it is tagged with their IAM user name. For more information,
see IAM policy elements: variables and tags in the IAM User Guide.
AWS supports global condition keys and service-specific condition keys. To see all AWS global condition
keys, see AWS global condition context keys in the IAM User Guide.
Amazon QuickSight does not provide any service-specific condition keys, but it does support using some
global condition keys. To see all AWS global condition keys, see AWS Global Condition Context Keys in
the IAM User Guide.
Examples
To view examples of Amazon QuickSight identity-based policies, see IAM identity-based policies for
Amazon QuickSight (p. 983).
• Service-linked roles.
• Service roles.
• Temporary credentials (direct use): However, Amazon QuickSight uses temporary credentials to allow
users to assume an IAM role to access embedded dashboards. For more information, see Working with
embedded analytics (p. 782).
For more information on how Amazon QuickSight uses IAM roles, see Using Amazon QuickSight with
IAM (p. 977) and IAM policy examples for Amazon QuickSight (p. 983).
When your IAM users sign up for Amazon QuickSight, they can choose to use the QuickSight-managed
role (this is the default role). Or they can pass an existing IAM role to QuickSight.
Prerequisites
For your users to pass IAM roles to QuickSight, your IAM administrator needs to complete the following
tasks:
980
Amazon QuickSight User Guide
IAM
• Create an IAM role. For more information about creating IAM roles, see Creating IAM roles in the IAM
User Guide.
• Attach a trust policy to your IAM role that allows QuickSight to assume the role. Use the following
example to create a trust policy for the role. The following example trust policy allows the Amazon
QuickSight principal to assume the IAM role that it's attached to.
For more information about creating IAM trust policies and attaching them to roles, see Modifying a
Role (Console) in the IAM User Guide.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "quicksight.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
• Assign the following IAM permissions to your IAM administrator (IAM users or roles):
• quicksight:UpdateResourcePermissions – This grants IAM users who are QuickSight
administrators the permission to update resource-level permissions in QuickSight. For more
information about resource types defined by QuickSight, see Actions, resources, and condition keys
for Amazon QuickSight in the IAM User Guide.
• iam:PassRole – This grants users permission to pass roles to QuickSight. For more information,
see Granting a user permissions to pass a role to an AWS service in the IAM User Guide.
• iam:ListRoles – (Optional) This grants users permission to see a list of existing roles in
QuickSight. If this permission is not provided, they can use an ARN to use existing IAM roles.
Following is an example IAM permissions policy that allows managing resource-level permissions,
listing IAM roles, and passing IAM roles in Amazon QuickSight.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iam:ListRoles",
"Resource": "arn:aws:iam::account-id:role:*"
},
{
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "arn:aws:iam::account-id:role/path/role-name",
"Condition": {
"StringEquals": {
"iam:PassedToService": [
"quicksight.amazonaws.com"
]
}
}
},
{
"Effect": "Allow",
"Action": "quicksight:UpdateResourcePermissions",
"Resource": "*"
}
]
981
Amazon QuickSight User Guide
IAM
For more examples of IAM policies that you can use with QuickSight, see IAM policy examples for
Amazon QuickSight (p. 983).
For more information about assigning permissions policies to users or user groups, see Changing
permissions for an IAM user in the IAM User Guide.
After your IAM administrator completes the prerequisites, your IAM users can pass IAM roles to
QuickSight. They do so by choosing an IAM role when they sign up for QuickSight (p. 25), or by switching
to an IAM role on their QuickSight Security and Permissions page. To learn how to switch to an existing
IAM role in QuickSight, see the following section.
If you're using another AWS service, such as Amazon Athena or Amazon S3, you can create a permissions
policy that grants QuickSight permission to perform specific actions. You can then attach the policy to
the IAM roles that you later pass to QuickSight. The following are examples of how you can set up and
attach additional permissions policies to your IAM roles.
For an example managed policy for QuickSight in Athena, see AWSQuicksightAthenaAccess Managed
Policy in the Amazon Athena User Guide. IAM users can access this role in QuickSight using the following
ARN: arn:aws:iam::aws:policy/service-role/AWSQuicksightAthenaAccess.
The following is an example of a permissions policy for QuickSight in Amazon S3. For more information
about using IAM with Amazon S3, see Identity and access management in Amazon S3 in the Amazon S3
User Guide.
For information on how to create cross-account access from QuickSight to an Amazon S3 bucket in
another account, see How do I set up cross-account access from Amazon QuickSight to an Amazon S3
bucket in another account? in the AWS Knowledge Center.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*"
},
{
"Action": [
"s3:ListBucket"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::aws-athena-query-results-us-west-2-123456789"
]
},
{
"Action": [
"s3:GetObject",
"s3:GetObjectVersion"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::aws-athena-query-results-us-west-2-123456789/*"
]
},
{
"Action": [
982
Amazon QuickSight User Guide
IAM
"s3:ListBucketMultipartUploads",
"s3:GetBucketLocation"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::aws-athena-query-results-us-west-2-123456789"
]
},
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts"
],
"Resource": [
"arn:aws:s3:::aws-athena-query-results-us-west-2-123456789/*"
]
}
]
}
If you're a QuickSight administrator and have permissions to update QuickSight resources and pass IAM
roles, you can use existing IAM roles in QuickSight. To learn more about the prerequisites for passing IAM
roles in QuickSight, see the prerequisites outlined in the previous list.
Use the following procedure to learn how to pass IAM roles in QuickSight.
1. In QuickSight, choose your account name in the navigation bar at top right and choose Manage
QuickSight.
2. On the Manage QuickSight page that opens, choose Security & Permissions in the menu at left.
3. In the Security & Permissions page that opens, under QuickSight access to AWS services, choose
Manage.
4. For IAM role, choose Use an existing role, and then do one of the following:
• Choose the role that you want to use from the list.
• Or, if you don't see a list of existing IAM roles, you can enter the IAM ARN for the role in the
following format: arn:aws:iam::account-id:role/path/role-name.
5. Choose Save.
Topics
• IAM identity-based policies for Amazon QuickSight: dashboards (p. 984)
• IAM identity-based policies for Amazon QuickSight: namespaces (p. 984)
• IAM identity-based policies for Amazon QuickSight: custom permissions (p. 985)
• IAM identity-based policies for Amazon QuickSight: customizing email report templates (p. 985)
983
Amazon QuickSight User Guide
IAM
• IAM identity-based policies for Amazon QuickSight: creating users (p. 986)
• IAM identity-based policies for Amazon QuickSight: creating and managing groups (p. 986)
• IAM identity-based policies for Amazon QuickSight: all access for Standard edition (p. 987)
• IAM identity-based policies for Amazon QuickSight: all access for Enterprise edition (p. 987)
• IAM identity-based policies for Amazon QuickSight: active directory groups (p. 988)
• AWS resources for Amazon QuickSight: accessing AWS resources (p. 988)
• AWS resources Amazon QuickSight: scoping policies in Enterprise edition (p. 989)
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "quicksight:RegisterUser",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "quicksight:GetDashboardEmbedUrl",
"Resource": "arn:aws:quicksight:us-
west-2:111122223333:dashboard/1a1ac2b2-3fc3-4b44-5e5d-c6db6778df89",
"Effect": "Allow"
}
]
}
Creating namespaces
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ds:AuthorizeApplication",
"ds:UnauthorizeApplication",
"ds:DeleteDirectory",
"ds:CreateIdentityPoolDirectory",
"quicksight:CreateNamespace"
],
"Resource": "*"
}
]
}
Deleting namespaces
{
"Version": "2012-10-17",
"Statement": [
984
Amazon QuickSight User Guide
IAM
{
"Effect": "Allow",
"Action": [
"ds:UnauthorizeApplication",
"ds:DeleteDirectory",
"ds:DescribeDirectories",
"quicksight:DeleteNamespace"
],
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:*CustomPermissions"
],
"Resource": "*"
}
]
}
The following example shows another way to grant the same permissions as shown in the previous
example.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:CreateCustomPermissions",
"quicksight:DescribeCustomPermissions",
"quicksight:ListCustomPermissions",
"quicksight:UpdateCustomPermissions",
"quicksight:DeleteCustomPermissions"
],
"Resource": "*"
}
]
}
IAM identity-based policies for Amazon QuickSight: customizing email report templates
The following example shows a policy that allows viewing, updating, and creating email report templates
in QuickSight, as well as obtaining verification attributes for an Amazon Simple Email Service identity.
This policy allows a QuickSight administrator to create and update custom email report templates, and
to confirm that any custom email address they want to send email reports from is a verified identity in
SES.
{
"Version": "2012-10-17",
985
Amazon QuickSight User Guide
IAM
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight: DescribeAccountCustomization",
"quicksight: CreateAccountCustomization",
"quicksight: UpdateAccountCustomization",
"quicksight: DescribeEmailCustomizationTemplate",
"quicksight: CreateEmailCustomizationTemplate",
"quicksight: UpdateEmailCustomizationTemplate",
"ses: GetIdentityVerificationAttributes"
],
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"quicksight:CreateUser"
],
"Effect": "Allow",
"Resource": "arn:aws:quicksight::<YOUR_AWS_ACCOUNTID>:user/${aws:userid}"
}
]
}
IAM identity-based policies for Amazon QuickSight: creating and managing groups
The following example shows a policy that allows QuickSight administrators and developers to create
and manage groups.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"quicksight:ListGroups",
"quicksight:CreateGroup",
"quicksight:SearchGroups",
"quicksight:ListGroupMemberships",
"quicksight:CreateGroupMembership",
"quicksight:DeleteGroupMembership",
"quicksight:DescribeGroupMembership",
"quicksight:ListUsers"
],
"Resource": "*"
}
]
}
986
Amazon QuickSight User Guide
IAM
IAM identity-based policies for Amazon QuickSight: all access for Standard edition
The following example for Amazon QuickSight Standard edition shows a policy that allows subscribing,
creating authors and readers. This example explicitly denies permission to unsubscribe from Amazon
QuickSight.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ds:AuthorizeApplication",
"ds:UnauthorizeApplication",
"ds:CheckAlias",
"ds:CreateAlias",
"ds:DescribeDirectories",
"ds:DescribeTrusts",
"ds:DeleteDirectory",
"ds:CreateIdentityPoolDirectory",
"iam:ListAccountAliases",
"quicksight:CreateUser",
"quicksight:Subscribe"
],
"Resource": "*"
},
{
"Effect": "Deny",
"Action":
"quicksight:Unsubscribe",
"Resource": "*"
}
]
}
IAM identity-based policies for Amazon QuickSight: all access for Enterprise edition
The following example for Amazon QuickSight Enterprise edition shows a policy that allows subscribing,
creating users, and managing Active Directory. This example explicitly denies permission to unsubscribe
from Amazon QuickSight.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ds:AuthorizeApplication",
"ds:UnauthorizeApplication",
"ds:CheckAlias",
"ds:CreateAlias",
"ds:DescribeDirectories",
"ds:DescribeTrusts",
"ds:DeleteDirectory",
"ds:CreateIdentityPoolDirectory",
"iam:ListAccountAliases",
"quicksight:CreateAdmin",
"quicksight:Subscribe",
"quicksight:GetGroupMapping",
"quicksight:SearchDirectoryGroups",
"quicksight:SetGroupMapping"
987
Amazon QuickSight User Guide
IAM
],
"Resource": "*"
},
{
"Effect": "Deny",
"Action": "quicksight:Unsubscribe",
"Resource": "*"
}
]
}
{
"Statement": [
{
"Action": [
"ds:DescribeTrusts",
"quicksight:GetGroupMapping",
"quicksight:SearchDirectoryGroups",
"quicksight:SetGroupMapping"
],
"Effect": "Allow",
"Resource": "*"
}
],
"Version": "2012-10-17"
}
You can also use optional conditions to limit access to the policy. To learn more about best practices for
securing IAM policies, see IAM Best Practices.
{
"Effect": "Allow",
"Action": [
"iam:AttachRolePolicy",
"iam:DetachRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:GetPolicy",
"iam:CreatePolicyVersion",
"iam:DeletePolicyVersion",
"iam:GetPolicyVersion",
"iam:ListPolicyVersions",
"iam:DeleteRole",
"iam:CreateRole",
"iam:GetRole",
"iam:ListRoles",
"iam:CreatePolicy",
"iam:ListEntitiesForPolicy",
"s3:ListAllMyBuckets",
"athena:ListDataCatalogs",
"athena:GetDataCatalog"
],
"Resource": "*"
988
Amazon QuickSight User Guide
IAM
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"quicksight:*IAMPolicyAssignment*",
"quicksight:AccountConfigurations"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
You can use an AWS user or group policy to give users the ability to add themselves as administrators of
Amazon QuickSight. Users that have been granted this ability can only add themselves as administrators
and can't use this policy to add others. Their accounts become active and billable the first time that
they open Amazon QuickSight. To set up self-provisioning, give these users permission to use the
quicksight:CreateAdmin action.
Granting permissions with IAM actions only affects the specified user's ability to create a QuickSight
account for their specified role. After a user has created and logged into their account, you use a separate
set of permissions within QuickSight to manage QuickSight-specific features. For more information, see
Customizing access to the Amazon QuickSight console (p. 1027).
Alternatively, you can use the following procedure to use the console to set or create the administrator
for Amazon QuickSight.
• Use IAM to create the user that you want to be the administrator of Amazon QuickSight.
Alternatively, identify an existing user in IAM for the administrator role. You can also put the user
inside a new group, for manageability.
• Grant the user (or group) sufficient permissions.
989
Amazon QuickSight User Guide
IAM
2. Sign in to your AWS Management Console with the target user's credentials.
3. Go to http://quicksight.aws.amazon.com/sn/console/get-user-email, type in the target user's email
address, and choose Continue.
You can use an AWS user or group policy to give users the ability to create an Amazon QuickSight
author account for themselves. Their accounts become active and billable the first time they open
Amazon QuickSight. To set up self-provisioning, you need to give them permission to use the
quicksight:CreateUser action.
If you are using Microsoft Active Directory with Amazon QuickSight, you can manage read-only
permissions by using a group. Otherwise, you can bulk-invite users to use Amazon QuickSight. You can
also use an AWS user or group policy to give people the ability to create an Amazon QuickSight reader
account for themselves.
Reader accounts become active and billable the first time they open Amazon QuickSight. If you decide to
upgrade or downgrade a user, billing for that user is prorated for the month. To set up self-provisioning,
you need to give them permission to use the quicksight:CreateReader action.
Use the following information to help you diagnose and fix common issues that you might encounter
when working with Amazon QuickSight and IAM.
Topics
• I am not authorized to perform an action in Amazon QuickSight (p. 991)
• I am not authorized to perform iam:PassRole (p. 991)
• I want to view my access keys (p. 991)
• I'm an administrator and want to allow others to access Amazon QuickSight (p. 991)
• I want to allow people outside of my AWS account to access my Amazon QuickSight
resources (p. 992)
990
Amazon QuickSight User Guide
IAM
The following example error occurs when the mateojackson IAM user tries to use the console to view
details about a widget but does not have quicksight:GetWidget permissions.
In this case, Mateo asks his administrator to update his policies to allow him to access the my-example-
widget resource using the quicksight:GetWidget action.
Some AWS services allow you to pass an existing role to that service instead of creating a new service
role or service-linked role. To do this, you must have permissions to pass the role to the service.
The following example error occurs when an IAM user named marymajor tries to use the console to
perform an action in Amazon QuickSight. However, the action requires the service to have permissions
that are granted by a service role. Mary does not have permissions to pass the role to the service.
In this case, Mary's policies must be updated to allow her to perform the iam:PassRole action.
If you need help, contact your AWS administrator. Your administrator is the person who provided you
with your sign-in credentials.
Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a secret
access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). Like a user name and
password, you must use both the access key ID and secret access key together to authenticate your
requests. Manage your access keys as securely as you do your user name and password.
Important
Do not provide your access keys to a third party, even to help find your canonical user ID. By
doing this, you might give someone permanent access to your account.
When you create an access key pair, you are prompted to save the access key ID and secret access key in
a secure location. The secret access key is available only at the time you create it. If you lose your secret
access key, you must add new access keys to your IAM user. You can have a maximum of two access keys.
If you already have two, you must delete one key pair before creating a new one. To view instructions,
see Managing access keys in the IAM User Guide.
991
Amazon QuickSight User Guide
Identity federation and SSO
To get started right away, see Creating your first IAM delegated user and group in the IAM User Guide.
• To learn whether Amazon QuickSight supports these features, see Using Amazon QuickSight with
IAM (p. 977).
• To learn how to provide access to your resources across AWS accounts that you own, see Providing
access to an IAM user in another AWS account that you own in the IAM User Guide.
• To learn how to provide access to your resources to third-party AWS accounts, see Providing access to
AWS accounts owned by third parties in the IAM User Guide.
• To learn how to provide access through identity federation, see Providing access to externally
authenticated users (identity federation) in the IAM User Guide.
• To learn the difference between using roles and resource-based policies for cross-account access, see
How IAM roles differ from resource-based policies in the IAM User Guide.
Amazon QuickSight supports identity federation in both Standard and Enterprise editions. When you
use federated identities, you can manage users with your enterprise identity provider (IdP) and use AWS
Identity and Access Management (IAM) to authenticate users when they sign in to Amazon QuickSight.
You can use a third-party identity provider that supports through Security Assertion Markup Language
2.0 (SAML 2.0) to provide a simple onboarding flow for your Amazon QuickSight users. Such identity
providers include Microsoft Active Directory Federation Services, Okta, and Ping One Federation Server.
With identity federation, your users get one-click access to their Amazon QuickSight applications using
their existing identity credentials. You also have the security benefit of identity authentication by your
identity provider. You can control which users have access to Amazon QuickSight using your existing
identity provider.
Use the following topics to understand using an existing federation with AWS:
For information from some common providers, see the following third-party documentation:
992
Amazon QuickSight User Guide
Identity federation and SSO
Topics
• Initiating sign-on from the identity provider (IdP) (p. 993)
• Setting up IdP federation using IAM and QuickSight (p. 994)
• Initiating sign-on from Amazon QuickSight (p. 997)
• Setting up service provider–initiated federation with Amazon QuickSight Enterprise edition (p. 997)
• Tutorial: Accessing Amazon QuickSight using Okta SSO (p. 999)
• Configuring email syncing for federated users in Amazon QuickSight (p. 1006)
In this scenario, your users initiate the sign-on process from the identity provider's portal. After the users
are authenticated, they sign in to QuickSight. After QuickSight checks that they are authorized, your
users can access QuickSight.
Beginning with a user signing into the IdP, authentication flows through these steps:
1. The user browses to https://applications.example.com and signs on to the IdP. At this point
the user isn't signed in to the service provider.
2. The federation service and the IdP authenticate the user:
a. The federation service requests authentication from the organization's identity store.
b. The identity store authenticates the user and returns the authentication response to the federation
service.
c. When authentication is successful, the federation service posts the SAML assertion to the user’s
browser.
3. The user opens QuickSight:
a. The user's browser posts the SAML assertion to the AWS Sign-In SAML endpoint (https://
signin.aws.amazon.com/saml).
b. AWS Sign-In receives the SAML request, processes the request, authenticates the user, and forwards
the authentication token to the Amazon QuickSight service.
4. Amazon QuickSight accepts the authentication token from AWS and presents QuickSight to the user.
From the user's perspective, the process happens transparently. The user starts at your organization's
internal portal and lands at an Amazon QuickSight application portal, without ever having to supply any
AWS credentials.
In the following diagram, you can find an authentication flow between Amazon QuickSight and a third-
party identity provider (IdP). In this example, the administrator has set up a sign-in page to access
Amazon QuickSight, called applications.example.com. When a user signs in, the sign-in page posts
a request to a federation service that complies with SAML 2.0. The end user initiates authentication from
the sign-on page of the IdP.
993
Amazon QuickSight User Guide
Identity federation and SSO
You can use an AWS Identity and Access Management (IAM) role and a relay state URL to configure
an identity provider (IdP) that is compliant with SAML 2.0. The role grants users permissions to
access Amazon QuickSight. The relay state is the portal that the user is forwarded to, after successful
authentication by AWS.
Topics
• Prerequisites (p. 994)
• Step 1: Create a SAML provider in AWS (p. 995)
• Step 2: Configure permissions in AWS for your federated users (p. 995)
• Step 3: Configure the SAML IdP (p. 996)
• Step 4: Create assertions for the SAML authentication response (p. 996)
• Step 5: Configure the relay state of your federation (p. 997)
Prerequisites
Before configuring your SAML 2.0 connection, do the following:
994
Amazon QuickSight User Guide
Identity federation and SSO
• Using your IdP, generate a metadata document that describes your organization as an identity
provider.
• Set up SAML 2.0 authentication, using the same steps as for the AWS Management Console. When
this process is complete, you can configure your relay state to match the relay state of Amazon
QuickSight. For more information, see Step 5: Configure the relay state of your federation (p. 997).
• Create an Amazon QuickSight account and note the name to use when you configure your IAM policy
and IdP. For more information on creating an Amazon QuickSight account, see Signing up for an
Amazon QuickSight subscription (p. 25).
After you create the setup to federate to the AWS Management Console as outlined in the tutorial, you
can edit the relay state provided in the tutorial. You do so with the relay state of Amazon QuickSight,
described in step 5 following.
• Integrating Third-Party SAML Solution Providers with AWS in the IAM User Guide.
• Troubleshooting SAML 2.0 federation with AWS, also in the IAM User Guide.
• Setting up trust between ADFS and AWS and using Active Directory credentials to connect to Amazon
Athena with ODBC driver – This walkthrough article is helpful, although you don't need to set up
Athena in order to use QuickSight.
1. Sign in to the AWS Management Console and open the IAM console at https://
console.aws.amazon.com/iam/.
2. Create a new SAML provider, which is an entity in IAM that holds information about your
organization's identity provider. For more information, see Creating SAML Identity Providers in the
IAM User Guide.
3. As part of this process, upload the metadata document produced by the IdP software in your
organization noted in the previous section.
After you have created the role, you can limit the role to have permissions only to Amazon QuickSight by
attaching an inline policy to the role. The following sample policy document provides access to Amazon
QuickSight. This policy allows the user access to Amazon QuickSight and allows them to create both
author accounts and reader accounts.
Note
In the following example, replace <YOUR_AWS_ACCOUNT_ID> with your 12-digit AWS account
ID (with no hyphens ‘‐’).
995
Amazon QuickSight User Guide
Identity federation and SSO
"Statement": [
{
"Action": [
"quicksight:CreateUser"
],
"Effect": "Allow",
"Resource": [
"arn:aws:quicksight::<YOUR_AWS_ACCOUNT_ID>:user/${aws:userid}"
]
}
],
"Version": "2012-10-17"
}
If you want to provide access to Amazon QuickSight and also the ability to create Amazon QuickSight
admins, authors (standard users), and readers, you can use the following policy example.
{
"Statement": [
{
"Action": [
"quicksight:CreateAdmin"
],
"Effect": "Allow",
"Resource": [
"arn:aws:quicksight::<YOUR_AWS_ACCOUNT_ID>:user/${aws:userid}"
]
}
],
"Version": "2012-10-17"
}
After you have set up SAML and the IAM policy or policies, you don't need to invite users manually. The
first time that users open Amazon QuickSight, they are provisioned automatically, using the highest level
permissions in the policy. For example, if they have permissions to both quicksight:CreateUser
and quicksight:CreateReader, they are provisioned as authors. If they also have permissions to
quicksight:CreateAdmin, they are provisioned as admins. Each permission level includes the ability
to create the same level user and below. For example, an author can add other authors or readers.
Users who are invited manually are created in the role assigned by the person who invited them. They
don't need to have policies that grant them permissions.
To update the IdP metadata, see the instructions provided by your IdP. Some providers give you the
option to type the URL, after which the IdP gets and installs the file for you. Others require you to
download the file from the URL and then provide it as a local file.
996
Amazon QuickSight User Guide
Identity federation and SSO
https://quicksight.aws.amazon.com
In this scenario, your user initiates the sign-on process from an Amazon QuickSight application portal
without being signed on to the identity provider. In this case, the user has a federated account managed
by a third-party IdP. The user might have an account on QuickSight. QuickSight sends an authentication
request to the IdP. After the user is authenticated, QuickSight opens.
Beginning with the user signing into QuickSight, authentication flows through these steps:
1. The user opens QuickSight. At this point, the user isn't signed in to the IdP.
2. The user attempts to sign in to QuickSight.
3. QuickSight redirects the user's input to the federation service and requests authentication.
4. The federation service and the IdP authenticate the user:
a. The federation service requests authentication from the organization's identity store.
b. The identity store authenticates the user and returns the authentication response to the federation
service.
c. When authentication is successful, the federation service posts the SAML assertion to the user's
browser.
d. The user's browser posts the SAML assertion to the AWS Sign-In SAML endpoint (https://
signin.aws.amazon.com/saml).
e. AWS Sign-In receives the SAML request, processes the request, authenticates the user, and forwards
the authentication token to the Amazon QuickSight service.
5. Amazon QuickSight accepts the authentication token from AWS and presents QuickSight to the user.
From the user's perspective, the process happens transparently. The user starts at an Amazon QuickSight
application portal. Amazon QuickSight negotiates authentication with your organization's federation
service and AWS. QuickSight opens, without the user needing to supply any additional credentials.
997
Amazon QuickSight User Guide
Identity federation and SSO
After you have finished configuring your identity provider with AWS Identity and Access Management
(IAM), you can set up service provider–initiated sign in through Amazon QuickSight Enterprise Edition.
For QuickSight-initiated SSO to work, you need to authorize QuickSight to send the authentication
request to your IdP. A QuickSight administrator can configure this by adding the following information
provided by the IdP:
• The IdP URL – QuickSight redirects users to this URL for authentication..
• The relay state parameter – This parameter relays the state that the browser session was in when
it was redirected for authentication. The IdP redirects the user back to the original state after
authentication. The state is provided in the form of a URL.
The following table shows the standard authentication URL and relay state parameter for redirecting the
user to the Amazon QuickSight URL that you provide.
QuickSight supports connecting to one IdP per AWS account. The configuration page in QuickSight
provides you with test URLs based on your entries, so you can test the settings before you turn the
feature on. To make the process even more seamless, QuickSight provides a parameter (enable-sso=0)
to temporarily turn off QuickSight initiated SSO, in case you need to disable it temporarily.
To set up QuickSight as a service provider that can initiate SSO for an existing IdP
1. Make sure that you already have SSO set up in your IdP, in IAM, and QuickSight. To test this setup,
check if you can share a dashboard with another person in your company's domain.
2. Open QuickSight, and choose Manage QuickSight from your profile menu at upper right.
To perform this procedure, you need to be a QuickSight administrator. If you aren't, you can't see
Manage QuickSight under your profile menu.
3. Choose Single sign-on (SSO) from the navigation pane.
4. For Configuration, IdP URL, enter the URL that your IdP provides to authenticate users.
5. For IdP URL, enter the parameter that your IdP provides to relay state, for example RelayState.
The actual name of the parameter is provided by your IdP.
6.
Test signing in:
998
Amazon QuickSight User Guide
Identity federation and SSO
• To test signing in with your identity provider, use the custom URL provided in Test starting
with your IdP. You should arrive at the start page for QuickSight, for example https://
quicksight.aws.amazon.com/sn/start.
• To test signing in with QuickSight first, use the custom URL provided in Test the end-to-end
experience. The enable-sso parameter is appended to the URL. If enable-sso=1, SSO
attempts to authenticate.
7. Choose Save to keep your settings.
1. Make sure your SSO settings are configured and tested. If you're not sure about the configuration,
test the connection by using the URLs from the previous procedure.
2. Open QuickSight, and choose Manage QuickSight from your profile menu.
3. Choose Single sign-on (SSO) from the navigation pane.
4. For Status, choose ON.
5. Verify that it's working by disconnecting from your IdP and opening QuickSight.
1. Open QuickSight, and choose Manage QuickSight from your profile menu.
2. Choose Single sign-on (SSO) from the navigation pane.
3. For Status, choose OFF.
In the following tutorial, you can find a walkthrough for setting up the IdP Okta as a federation service
for Amazon QuickSight. Although this tutorial shows the integration of AWS Identity and Access
Management (IAM) and Okta, you can also replicate this solution using your choice of SAML 2.0 IdPs.
In the following procedure, you create an app in the Okta IdP using their "AWS Account Federation"
shortcut. Okta describes this integration app as follows:
"By federating Okta to Amazon Web Services (AWS) Identity and Access Management (IAM) accounts,
end users get single sign-on access to all their assigned AWS roles with their Okta credentials. In each
AWS account, administrators set up federation and configure AWS roles to trust Okta. When users sign in
to AWS, they get Okta single sign-in experience to see their assigned AWS roles. They can then select a
desired role, which defined their permissions for the duration of their authenticated session. Customers
with large numbers of AWS Accounts, check out the AWS Single Sign-On app as an alternative." (https://
www.okta.com/aws/)
To create an Okta app using Okta's "AWS Account Federation" application shortcut
1. Sign in to your Okta dashboard. If you don't have one, create a free Okta Developer Edition account
by using this QuickSight-branded URL. When you have activated your email, sign in to Okta.
999
Amazon QuickSight User Guide
Identity federation and SSO
2. On the Okta website, choose <> Developer Console at upper left, and then choose Classic UI.
3. Choose Add Applications, and choose Add app.
4. Enter aws for Search, and choose AWS Account Federation from the search results.
5. Choose Add to create an instance of this application.
6. For Application label, enter AWS Account Federation - QuickSight.
7. Choose Next.
8. For SAML 2.0, Default Relay State, enter https://quicksight.aws.amazon.com.
9. Open the context (right-click) menu for Identity Provider metadata, and choose to save the file.
Name the file metadata.xml. You need this file in the next procedure.
10. After you have the XML file saved, scroll to the bottom of the Okta page, and choose Done.
11. Leave this browser window open, if possible. You need it later in the tutorial.
1. Sign in to the AWS Management Console and open the IAM console at https://
console.aws.amazon.com/iam/.
2. In the navigation pane, choose Identity providers, Create Provider.
3. Enter the following settings:
1000
Amazon QuickSight User Guide
Identity federation and SSO
5. Locate the IdP that you just created and choose it to view the settings. Note the Provider ARN. You
need this to finish the tutorial.
6. Verify that the identity provider is created with your settings. In IAM, choose Identity providers,
Okta (the IdP you just added), Download metadata. The file should be the one that you just
uploaded.
Next, you create an IAM role to enable the SAML 2.0 federation to act as a trusted entity in your AWS
account. For this step, you need to choose how you want to provision users in Amazon QuickSight. You
can do one of the following:
• Grant permission to the IAM role so that first-time visitors become QuickSight users automatically.
• Provision QuickSight users in advance by using the QuickSight API. By choosing this option, you can
provision users and add them to groups at the same time. For more information, see Creating and
managing groups in Amazon QuickSight (p. 1019).
1. Sign in to the AWS Management Console and open the IAM console at https://
console.aws.amazon.com/iam/.
2. In the navigation pane, choose Roles, Create Role.
3. For Select type of trusted entity, choose the card labeled SAML 2.0 federation.
4. For SAML provider, select the IdP that you created in the previous procedure, for example Okta.
5. Enable the option Allow programmatic and AWS Management Console access.
6. Choose Next: Permissions.
7. Paste the following policy into the editor.
In the policy editor, update the JSON with your provider's Amazon Resource Name (ARN).
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRoleWithSAML",
"Resource": "arn:aws:iam::111111111111:saml-provider/Okta",
"Condition": {
"StringEquals": {
"saml:aud": "https://signin.aws.amazon.com/saml"
}
}
}
]
}
In the policy editor, update the JSON with your AWS account ID. It should be the same account ID
that you used in the previous policy in the provider ARN.
{
"Version": "2012-10-17",
"Statement": [
1001
Amazon QuickSight User Guide
Identity federation and SSO
{
"Action": [
"quicksight:CreateReader"
],
"Effect": "Allow",
"Resource": [
"arn:aws:quicksight::111111111111:user/${aws:userid}"
]
}
]
}
You can leave out the AWS Region name in the ARN, as shown following.
arn:aws:quicksight::111111111111:user/$${aws:userid}
If you don't want to use automatic provisioning, you can skip the following step.
To add a QuickSight user, use register-user. To add a QuickSight group, use create-group. To add
users to the QuickSight group, use create-group-membership.
16.
(Optional) For Search, enter QuicksightCreateReader. Choose the policy to enable it ( ).
Do this step if you want to provision QuickSight users automatically, rather than using the
QuickSight API.
a. Return to the main page of the IAM console at https://console.aws.amazon.com/iam/. You can
use your browser's Back button.
b. Choose Roles.
c. For Search, enter Okta. Choose QuicksightOktaFederatedRole from the search results.
d. On the Summary page for the policy, examine the Permissions tab. Verify that the role has the
policy or policies that you attached to it. It should have QuicksightOktaFederatedPolicy.
If you chose to add the ability to create users, it should also have QuicksightCreateReader.
e.
Use the icon to open each policy. Verify that the text matches what is shown in this
procedure. Double-check that you added your own AWS account number in place of the
example account number 111111111111.
f. On the Trust relationships tab, verify that the Trusted entities field contains the ARN for
the identity provider. You can double-check the ARN in the IAM console by opening Identity
providers, Okta.
g.
1002
Amazon QuickSight User Guide
Identity federation and SSO
1. Sign in to the AWS Management Console and open the IAM console at https://
console.aws.amazon.com/iam/.
2. Add a policy that allows Okta to display a list of IAM roles to the user. To do this, choose Policy,
Create policy.
3. Choose JSON, then enter the following policy.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:ListRoles",
"iam:ListAccountAliases"
],
"Resource": "*"
}
]
}
a. Open the IAM console, and choose Users. Search for OktaSSOUser, and open it by choosing the
user name from the search results.
b. On the Permissions tab, verify that the OktaListRolesPolicy is attached.
c.
Use the icon to open the policy. Verify that the text matches what is shown in this
procedure.
d. On the Security credentials tab, you can check the access key, although you already
downloaded it. You can return to this tab to create an access key when you need a new one.
In the following procedure, you return to Okta to provide the access key. The access key works with your
new security settings to allow AWS and the Okta IdP to work together.
1003
Amazon QuickSight User Guide
Identity federation and SSO
1. Return to your Okta dashboard. If requested to do so, sign in. If the developer console is no longer
open, choose Admin to reopen it.
2. If you have to reopen Okta, you can return to this section by following these steps:
arn:aws:iam::111122223333:saml-provider/Okta
5. Choose Done or Save. The name of the button varies depending if you are creating or editing the
application.
6. Choose the Provisioning tab, and at the lower part of the tab, choose Configure API Integration.
7. Turn on Enable API integration to display the settings.
8. For Access Key and Secret Key, provide the access key and secret key that you downloaded
previously to a file named OktaSSOUser_credentials.csv.
9. Choose Test API Credentials. Look above the Enable API integration setting for a message
confirming that "AWS Account Federation was verified successfully".
10. Choose Save.
11. Make sure that To App is highlighted at left, and choose Edit at right.
12. For Create Users, turn on the option Enable.
13. Choose Save.
14. On the Assignments tab, near Provisioning and Import, choose Assign.
15. Do one or more of the following to enable federated access:
1004
Amazon QuickSight User Guide
Identity federation and SSO
You can now manage identities using Okta and use federated access with Amazon QuickSight.
The following procedure is an optional part of this tutorial. If you follow its steps, you authorize
QuickSight to forward authorizations requests to the IdP on behalf of your users. Using this method,
users can sign in to QuickSight with no need to sign in using the IdP page first.
1. Open QuickSight, and choose Manage QuickSight from your profile menu.
2. Choose Single sign-on (SSO) from the navigation pane.
3. For Configuration, IdP URL, enter the URL that your IdP provides to authenticate users, for example
https://dev-1-----0.okta.com/home/amazon_aws/0oabababababaGQei5d5/282. You can find
this in your Okta app page, on the General tab, in Embed Link.
4. For IdP URL, enter RelayState.
5. Do one of the following:
• To test signing in with your identity provider first, use the custom URL provided in Test
starting with your IdP. You should arrive at the start page for QuickSight, for example https://
quicksight.aws.amazon.com/sn/start.
• To test signing in with QuickSight first, use the custom URL provided in Test the end-to-end
experience. The enable-sso parameter is appended to the URL. If enable-sso=1, SSO
attempts to authenticate. If enable-sso=0, QuickSight doesn't send the authentication request,
and you sign in to QuickSight as before.
6. For Status, choose ON.
7. Choose Save to keep your settings.
You can create a deep link to a QuickSight dashboard to allow users to use SSO to connect directly to
specific dashboards. To do this, you append the relay state flag and dashboard URL to the Okta single
sign-on URL, as described following.
1. Locate the Okta application’s single sign-on (SSO) URL in the metadata.xml file that you
downloaded beginning of the tutorial. You can find the URL near the bottom of the file, in the
element named md:SingleSignOnService. The attribute is named Location and the value ends
with /sso/saml, as shown in the following example.
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://dev-0000001.okta.com/app/amazon_aws/abcdef2hATwiVft645d5/sso/saml"/>
2. Take the value of the SSO URL and append ?RelayState= followed by the URL of your QuickSight
dashboard. The RelayState parameter relays the state (the URL) that the user was in when they
were redirected to the authentication URL.
3. To the new SSO with the relay state added, append the URL of your QuickSight dashboard. The
resulting URL should resemble the following.
https://dev-1-----0.okta.com/app/amazon_aws/abcdef2hATwiVft645d5/
sso/saml?RelayState=https://us-west-2.quicksight.aws.amazon.com/sn/
analyses/12a12a2a-121a-212a-121a-abcd12abc1ab
4. If the link you create doesn't open, check that you are using the most recent SSO URL from the
metadata.xml. Also check that the user name you use to sign in isn't assigned in more than one
SSO Okta app.
1005
Amazon QuickSight User Guide
Identity federation and SSO
In Amazon QuickSight Enterprise edition, as an administrator you can restrict new users from using
personal email addresses when provisioning through their identity provider (IdP) directly to QuickSight.
QuickSight then uses the preconfigured email addresses passed through the IdP when provisioning new
users to your account. For example, you can make it so that only corporate-assigned email addresses are
used when users are provisioned to your QuickSight account through your IdP.
Note
Make sure that your users are federating directly to QuickSight through their IdP. Federating to
the AWS Console through their IdP and then clicking into QuickSight results in an error and they
won't be able to access QuickSight.
When you configure email syncing for federated users in QuickSight, users who log in to your QuickSight
account for the first time have preassigned email addresses. These are used to register their accounts.
This approach allows users to bypass manually entering an email address. It also ensures that users can't
use an email address that might differ from the email address prescribed by you, the administrator.
QuickSight supports provisioning through an IdP that supports SAML or OpenID Connect (OIDC)
authentication. To configure email addresses for new users when provisioning through an IdP,
you update the trust relationship for the IAM role that they use with AssumeRoleWithSAML or
AssumeRoleWithWebIdentity. Then you add a SAML attribute or OIDC token in their IdP. Last, you
turn on email syncing for federated users in QuickSight.
Step 1: Update the trust relationship for the IAM role with
AssumeRoleWithSAML or AssumeRoleWithWebIdentity
You can configure email addresses for your users to use when provisioning through your IdP to
QuickSight. To do this, add the sts:TagSession action to the trust relationship for the IAM role that
you use with AssumeRoleWithSAML or AssumeRoleWithWebIdentity. By doing this, you can pass in
principal tags when users assume the role.
The following example illustrates an updated IAM role where the IdP is Okta. To use this example,
update the Federated Amazon Resource Name (ARN) with the ARN for your service provider. You can
replace items in red with your AWS and IdP service-specific information.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::account-id:saml-provider/Okta"
},
"Action": "sts:AssumeRoleWithSAML",
"Condition": {
"StringEquals": {
1006
Amazon QuickSight User Guide
Identity federation and SSO
"SAML:aud": "https://signin.aws.amazon.com/saml"
}
}
},
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::account-id:saml-provider/Okta"
},
"Action": "sts:TagSession",
"Condition": {
"StringLike": {
"aws:RequestTag/Email": "*"
}
}
}
]
}
Step 2: Add a SAML attribute or OIDC token for the IAM principal tag in your IdP
After you update the trust relationship for the IAM role as describe preceding, add a SAML attribute or
OIDC token for the IAM Principal tag in your IdP.
The following examples illustrate a SAML attribute and an OIDC token. To use these examples, replace
the email address with a variable in your IdP that points to a user's email address. You can replace items
highlighted in red with your information.
<Attribute Name="https://aws.amazon.com/SAML/Attributes/
PrincipalTag:Email"><AttributeValue>[email protected]</AttributeValue></Attribute>
Note
If you're using Okta as your IdP, make sure to turn on a feature flag in your Okta account to
use SAML. For more information, see Okta and AWS Partner to Simplify Access Via Session
Tags on the Okta blog.
• OIDC token: The following example illustrates an OIDC token example.
1. From any page in QuickSight, choose your user name at top right, and then choose Manage
QuickSight.
2. Choose Single sign-on (SSO) in the menu at left.
3. On the Service Provider Initiated SSO page, for Email Syncing for Federated Users, choose ON.
When email syncing for federated users is on, QuickSight uses the email addresses that you
configured in steps 1 and 2 when provisioning new users to your account. Users can't enter their own
email addresses.
1007
Amazon QuickSight User Guide
Microsoft Active Directory (EE)
When email syncing for federated users is off, QuickSight asks users to input their email address
manually when provisioning new users to your account. They can use any email addresses that they
want.
Amazon QuickSight Enterprise edition supports both AWS Directory Service for Microsoft Active
Directory and Active Directory Connector.
To create a new directory to be your identity manager for Amazon QuickSight, use AWS Directory Service
for Microsoft Active Directory, also known as AWS Managed Microsoft AD. This is an Active Directory
host in the AWS Cloud that offers most of the same functionality of Active Directory. Currently, you
can connect to Active Directory in any AWS Region supported by Amazon QuickSight, except for Asia
Pacific (Singapore). When you create a directory, you use it with a virtual private cloud (VPC). For more
information, see VPC (p. 1043).
If you have an existing directory that you want to use for Amazon QuickSight, you can use Active
Directory Connector. This service redirects directory requests to your Active Directory—in another AWS
Region or on-premises—without caching any information in the cloud.
For a walkthrough about creating and managing a directory with AWS Managed Microsoft AD, see Use an
AWS Managed Microsoft AD with Amazon QuickSight? in the AWS Knowledge Center.
When you use AWS Directory Service to launch a directory, AWS creates an organizational unit (OU)
with the same name as your domain. AWS also creates an administrative account with delegated
administrative rights for the OU. You can create user accounts, groups, and policies within the OU by
using Active Directory users and groups. For more information, see Best Practices for AWS Managed
Microsoft AD in the Directory Service Administration Guide.
After you establish your directory, you use it with Amazon QuickSight by creating at least three groups
for users:
• Amazon QuickSight admins – Admins can change account settings, manage user accounts. Admins
can also purchase additional Amazon QuickSight user subscriptions or SPICE (p. 132) capacity, or
cancel the subscription to Amazon QuickSight for your AWS account.
• Amazon QuickSight authors – Amazon QuickSight authors can create data sources, data sets,
analyses, and dashboards. They can share analyses and dashboards with other Amazon QuickSight
users.
• Amazon QuickSight readers – Readers can view and interact with dashboards that were created by
someone else.
You can add or refine access by applying IAM policies. For example, you can use IAM policies to allow
users to subscribe themselves.
1008
Amazon QuickSight User Guide
Supported directory integration (EE)
When you subscribe to Amazon QuickSight Enterprise edition and choose Active Directory as your
identity provider, you can associate your AD groups with Amazon QuickSight. You can also add or change
your AD groups later on.
If you want to use SSO with an on-premises Active Directory, you implement AWS Directory Service as a
separate Active Directory with a trust relationship to the on-premises Active Directory.
If you want to avoid using a trust relationship, you can deploy a standalone domain for authentication
within AWS. Then you can create users and groups in Active Directory. You'd then map them to users
and groups in Amazon QuickSight. In this example, users authenticate using their Active Directory login
credentials. To make access to Amazon QuickSight transparent to your users, use SSO in this scenario.
There are several ways you can use multi-factor authentication (MFA) with Amazon QuickSight. You can
use it with AWS Identity and Access Management (IAM). You can use it with AD Connector or your AWS
Directory Service for Microsoft Active Directory, also known as AWS Microsoft Active Directory or AWS
Managed Microsoft Active Directory. And if you use an external identity provider (IdP), AWS doesn't need
to have any information about MFA because that is part of the authentication handled by the IdP.
1009
Amazon QuickSight User Guide
Managing user access
• Enable Multi-Factor Authentication for AD Connector in the AWS Directory Service Administration
Guide
• How do I use an MFA token to authenticate access to my AWS resources through the AWS CLI in the
AWS Knowledge Center
• Configuring MFA-protected API access in the IAM User Guide
Amazon QuickSight administrators can use the following topics to manage user access to Amazon
QuickSight and Amazon QuickSight access to AWS resources.
Topics
• Managing users in Amazon QuickSight Standard edition (p. 1010)
• Inviting users to access Amazon QuickSight (p. 1011)
• Viewing Amazon QuickSight user account details (p. 1013)
• Deleting a user account (p. 1013)
• Managing user accounts in Amazon QuickSight Enterprise edition (p. 1015)
• Creating and managing groups in Amazon QuickSight (p. 1019)
Use this topic to learn more about managing user accounts in Amazon QuickSight Standard edition.
If you have administrative privileges in Amazon QuickSight, you can create and delete user accounts. You
can create user accounts based on AWS Identity and Access Management (IAM) credentials, or you can
create Amazon QuickSight–only user accounts using the email address of the user.
You can't create Amazon QuickSight user accounts using AWS credentials that aren't IAM credentials.
Federated logins work through IAM roles.
Each Amazon QuickSight Standard edition account can have up to 100 user accounts, including the AWS
root account or IAM account that created the Amazon QuickSight account. If you need an exception to
this limit, follow the instructions in AWS service limits in the AWS General Reference to submit a limit
increase request.
Note
Currently, email addresses are case-sensitive.
1010
Amazon QuickSight User Guide
Managing user access
1. In Amazon QuickSight, choose your user icon at top right, and then choose Manage QuickSight.
2. Choose Manage users in the pane at left, and then choose Invite users.
3. In the Invite users to this account page that opens, enter an email address for the user that you
want to add, and then choose the plus icon at right. If the user is an IAM user, enter their IAM user
name.
You can add users one at a time, or you can enter multiple email addresses separated by commas.
4. When finished, choose Invite.
In Standard edition, and in Enterprise edition using SSO, you can invite any person with a valid email
address to use Amazon QuickSight. When they sign up, a new Amazon QuickSight-only user account
is created for them. You can also invite IAM users in your AWS account to use Amazon QuickSight. In
this case, they can use their IAM credentials to sign in to Amazon QuickSight. Any IAM user you invite
must have a password associated with their IAM credentials, and you must also have an email address for
them.
User accounts are created in two steps. First, you invite a user to join Amazon QuickSight. Doing this
creates an inactive user account in Amazon QuickSight, and sends an invitation email to the user. When
the user accepts the invitation and signs in for the first time, the user creates a password to activate the
user account.
For information about signing in for the first time, see Signing in to Amazon QuickSight (p. 27).
1. Choose your user name on the application bar and then choose Manage QuickSight.
2. Choose Manage Users. On this screen, you can manage users who already exist in your account.
1011
Amazon QuickSight User Guide
Managing user access
Repeat this step until you have entered everyone who you want to invite. Then go to the next step
to enter details.
• Choose ADMIN if you want the user to be able to both use Amazon QuickSight for authoring and
for performing administrative tasks like managing users or purchasing SPICE (p. 132) capacity.
There are some differences in the administrative tasks that IAM admin users and Amazon
QuickSight admin users can perform. These differences occur because some administrative tasks
require permissions in AWS, which Amazon QuickSight–only users lack. The differences are these:
• Admin users can manage users, SPICE capacity, and subscriptions.
• Admin users who are also IAM admin users can also manage users, SPICE capacity, and
subscriptions. In addition, they can manage Amazon QuickSight permissions to AWS resources,
upgrade to Enterprise edition, and unsubscribe from Amazon QuickSight.
If you want to create an admin user with IAM admin access, check with your AWS administrator.
Make sure that the IAM user has the all necessary statements in their IAM permissions policy
to work with Amazon QuickSight resources. For more information about what statements are
required, see IAM policy examples for Amazon QuickSight (p. 983).
• To set the user to be able to author analyses and dashboards in Amazon QuickSight but not
perform any administrative tasks, choose AUTHOR.
• In Enterprise edition, you can set users to be able to interact with shared dashboards, but not
author analyses or dashboards or perform any administrative tasks. To do this, choose READER.
7. For IAM User, verify that it says Yes for accounts that are associated with IAM users, and No for
those that are Amazon QuickSight-only.
8. (Optional) To delete a user, choose the delete icon at the end of the relevant row.
9. Choose Invite.
1012
Amazon QuickSight User Guide
Managing user access
1. Choose your user name on the application bar and then choose Manage QuickSight.
2. Choose Manage Users.
3. Find the entry for the person you want to re-invite, and choose Resend invitation for that user.
4. Choose Confirm.
You can view Amazon QuickSight user accounts on the Manage Users page. To view a user account, use
the following procedure.
1. Choose your user name on the application bar and then choose Manage QuickSight.
2. Choose Manage Users to view details about people who are QuickSight users. The information that
displays includes:
User accounts can be deleted by either an AWS administrator or an Amazon QuickSight administrator.
Deleting a user account works the same in both the Standard and Enterprise editions of Amazon
QuickSight.
Deleting a user account removes or transfers their resources. In Enterprise edition, the network
administrator can temporarily deactivate a user account by removing it from the network group that
has access to Amazon QuickSight. If a user is deleted, but not deactivated, that user can still access
Amazon QuickSight as a new user. For more information about deactivating an Enterprise user account,
see Deactivating Active Directory user accounts (p. 1017).
1013
Amazon QuickSight User Guide
Managing user access
1. Choose your user name on the application bar and then choose Manage QuickSight.
2. Choose Manage Users.
3. Locate the user account you want to delete and then choose the delete icon at the end of that row.
4. Choose to either delete or transfer any resources owned by the user and then choose OK.
• If you chose to transfer user resources, enter the user name of the account to transfer them to and
then choose Delete and transfer resources.
• If you chose to delete user resources, choose Delete. You can't undo this action.
1014
Amazon QuickSight User Guide
Managing user access
AWS administrators can use this topic to learn more about managing user accounts in Amazon
QuickSight Enterprise edition. For information about managing user accounts in Amazon QuickSight
Standard edition, see Managing user access inside Amazon QuickSight (p. 1010).
In Enterprise edition, you can manage users through any of the following:
• Microsoft Active Directory. You can add and remove Active Directory directory groups to create and
deactivate user accounts. You can access the directory groups directly or by using the AD Connector.
• Federated logins.
• Inviting users by email.
To manage users in these ways, you must have both administrative privileges in Amazon QuickSight and
also appropriate AWS permissions. For more information on the necessary AWS permissions, see IAM
policy examples for Amazon QuickSight (p. 983). If you are using directory groups, you need to be a
network administrator.
Each Amazon QuickSight Enterprise edition account can have an unlimited number of user accounts.
User names that contain a semicolon ( ; ) aren't supported.
Use the following procedures to add, view, and deactivate Amazon QuickSight Enterprise edition user
accounts.
Important
You can't remap Amazon QuickSight users or groups from one identity store to another. For
example, if you are migrating from an on-premises Active Directory to AWS Directory Service,
or the other way around, you unsubscribe and resubscribe to Amazon QuickSight. You do this
1015
Amazon QuickSight User Guide
Managing user access
because even if the user's aliases remain the same, the underlying identity data changes. To
make the transition easier, request in advance that your users document all their Amazon
QuickSight assets and settings before the migration.
To see what groups are integrated with your Amazon QuickSight account, use the procedure in Viewing
user account details (p. 1016). For more information about adding a user to an Active Directory directory
group, see Add users and groups (Simple AD and Microsoft Active Directory). Or you can read more about
how to connect to a directory using AD Connector.
Users who are invited by email are notified how to sign in. Other users aren't automatically notified
of their access to Amazon QuickSight. You or your assigned Amazon QuickSight administrator
must provide users with your Amazon QuickSight account name, the sign-in URL (https://
quicksight.aws.amazon.com/), and instructions to sign in.
Note
Although you can manage users through Active Directory groups or as AWS Identity and Access
Management (IAM) users, you don't have to do it this way. You can instead choose to invite
Amazon QuickSight–only users by email. Choose the Manage Users feature of the Manage
QuickSight page, and enter an email address to invite someone to join your Amazon QuickSight
account. Each user gets an email containing a link to Amazon QuickSight. Using the invitation
link, the user can then set up a user name and password in Amazon QuickSight. Users can
also request access through self-provisioning. For more information on requesting access, see
Provisioning users for Amazon QuickSight (p. 989).
Amazon QuickSight subscriptions based on Active Directory can only have users provisioned in
Active Directory.
1. Choose Manage Users to view details about people who are QuickSight users. The information that
displays includes:
1016
Amazon QuickSight User Guide
Managing user access
4. (Optional) If you are managing groups, then enter your AWS or IAM credentials on the AWS sign-in
page that appears.
To deactivate a user account individually, remove that user from all Microsoft Active Directory directory
groups that are integrated with Amazon QuickSight. To view the groups integrated with your Amazon
QuickSight account, use the procedure in Viewing user account details (p. 1016).
If you later need to reactivate a user account, put the user into a group with access to Amazon
QuickSight. Doing this restores their access to Amazon QuickSight and to any existing resources that are
still associated with that user account.
Note
You can't upgrade or downgrade a user by transferring them between groups. For more
information, see Updating Enterprise user accounts (p. 1019).
You can activate or deactivate multiple user accounts at once by adding or removing one or more Active
Directory directory groups from integration with Amazon QuickSight.
Important
Removing all groups and users doesn't remove any resources and doesn't cancel your
subscription to Amazon QuickSight.
Use the following procedure to remove an Active Directory directory group from Amazon QuickSight.
1. Choose your user name on the application bar and then choose Manage QuickSight.
1017
Amazon QuickSight User Guide
Managing user access
6. In the Manage users screen, you can view each deactivated user in the Deleted user section. This is
located beneath the Active users this month section.
To transfer the user's resources, click on the Action "x" button beside that user's name. You are
prompted to decide what to do with resources owned solely by that user.
1018
Amazon QuickSight User Guide
Managing user access
Whichever action you choose applies to all resources owned solely by that user. If you transfer
the user's resources, Amazon QuickSight reassigns them to the user you choose. It doesn't make
unnecessary duplicates of those resources.
To downgrade authors to readers, you delete the users and then recreate them as readers. After you
choose to remove a user, you are prompted to transfer or delete their assets. If you are using directory
groups, also move that user into the appropriate group. Just moving them into another group doesn't
change their access the way it does for transfers between admin and author.
You can change a user's name by first creating a new user and then deleting the original user. By using
this approach, you can transfer their assets directly back to them. If you are using a directory service, you
can temporarily transfer their assets to a different user. Then, make your changes in Active Directory.
The next time the user signs in to Amazon QuickSight, they are asked to create a new account. After they
create the new account, the user possessing their assets can transfer all assets back to them.
When you make changes to users or groups in Amazon QuickSight, it can take up to five minutes for the
change to take effect. Examples of such changes are the following:
• Deleting a user
• Changing a user from an admin to an author
• Adding or removing group members
The five-minute time period allows changes to propagate throughout the system.
1019
Amazon QuickSight User Guide
Managing user access
Admins with IAM credentials who have access to the Amazon QuickSight console can organize sets of
users into groups that make it easier to manage access and security. For example, you can create a group
of users that you can share QuickSight assets with all at once. You can create and manage groups using
the QuickSight console or the AWS Command Line Interface (AWS CLI). You can create up to 10,000
groups in a namespace. If you want to create more than 10,000 groups in a namespace, contact AWS
Support.
1. On the Amazon QuickSight start page, choose Manage QuickSight, and then choose Manage
groups.
1020
Amazon QuickSight User Guide
Managing user access
1021
Amazon QuickSight User Guide
Managing user access
3. On the Create new group page, enter the name and description of the new group in the
corresponding boxes.
1022
Amazon QuickSight User Guide
Managing user access
After you have created a new group, you can't change the group's title but you can change the group's
description.
1. On the Amazon QuickSight start page, choose Manage QuickSight, and then choose Manage
groups.
2. Choose the group that you want to change, and then choose the Edit link next to the group
description.
3. In the Edit description box that appears, enter the new description and choose Save.
After you create a group, you can add and remove users from the Manage groups page. You can't add a
user to a group if you haven't added the user to your account. For more information on adding users to
your QuickSight account, see Managing user access inside Amazon QuickSight (p. 1010).
1023
Amazon QuickSight User Guide
Managing user access
1. On the Amazon QuickSight start page, choose Manage QuickSight, and then choose Manage
groups.
2. Choose the group that you want to add a user to, and choose ADD USER at the page's upper right.
3. Enter the user name or email of the user that you want to add, and choose the correct user for
Search users.
1. On the Amazon QuickSight start page, choose Manage QuickSight, and then choose Manage
groups.
2. Choose the group that you want to remove a user from.
3. Find the user that you want to remove and choose Remove.
Choosing remove automatically removes the selected user from the group.
You can also search for a group member by entering the user's full user name into the search bar on the
right-hand side of the group's page.
You can't delete a group from the QuickSight console, but you can delete a group with the AWS CLI. For
more information on deleting a QuickSight group with the AWS CLI, see Deleting groups from Amazon
QuickSight (p. 1025).
1024
Amazon QuickSight User Guide
Managing user access
1. Open a terminal window. If you are using Microsoft Windows, open a command prompt.
2. Enter the following command at the prompt to create a group. Substitute the correct values for your
parameters.
You might find it easier to create the command in a text editor before entering it at the prompt. For
more information on create-group and other available commands, see the Amazon QuickSight
API reference.
3. Verify that the group exists by using a command similar to one of the following. The following
command lists all groups.
4. Add a member to the new group by using a command similar to the following.
1. Open a terminal window. If you are using Microsoft Windows, open a command prompt.
2. Enter the following command at the prompt to create a group. Substitute the correct values for your
parameters.
You might find it easier to create the command in a text editor before entering it at the prompt. For
more information on delete-group and other available commands, see the Amazon QuickSight
API reference.
1025
Amazon QuickSight User Guide
Turning on IP restrictions
Only admins with AWS Identity and Access Management (IAM) credentials who have access to the
Amazon QuickSight console pages can access the IP restrictions table.
Adding an IP rule
An IP rule is created when you add a CIDR address with a public IP version 4 address to the IP restrictions
table. You can add up to 100 IP rules to the IP restrictions table. You can only add rules from the AWS
Region where your account is.
A CIDR address is composed of two parts: the prefix and the suffix. The prefix is the CIDR's network
address and is written like a normal IP address. The suffix shows how many bits are in the address. An
example of a put-together CIDR address is 10.24.34.0/23.
IP rules apply only to Amazon QuickSight web, embedded, and mobile access and don't restrict access
to the public API. Your users can still call all API operations from restricted IP ranges. For information on
restricting calls to the public API from specific IP addresses, see AWS: Denies access to AWS based on the
source IP in the IAM User Guide.
Before you save any IP rule changes or turn on other IP rules, make sure that you have an IP rule that
includes your IP address. If there isn’t an IP rule that includes your IP address, you can't save your
changes.
When you add, change, or delete an IP rule, a yellow box appears at the top of the table. This box tracks
unsaved changes.
To apply changes to the IP restrictions table, choose Save changes in the box. The changes don't apply
to the rules table until you save them. After you choose Save changes, it can take up to 10 minutes for a
change to take effect.
1. On the Amazon QuickSight start page, choose Manage QuickSight, and then choose Security and
Permissions.
2. Choose IP Restrictions.
3. For IP address, enter the CIDR address that defines the IP range that you want to add to an allow list
for QuickSight access.
4. (Optional) For Description, enter a description of the CIDR address. Doing this can help you
differentiate your IP rules.
5. Choose Add.
6. Choose Save changes in the box that appears to apply the rule.
You can also change existing IP rules. You can update IP rules only from the AWS Region where your
account is.
1026
Amazon QuickSight User Guide
Customizing access to the QuickSight console
1. On the Amazon QuickSight start page, choose Manage QuickSight, and then choose Security and
Permissions.
2. Choose IP restrictions.
3. Choose the edit icon to the right of the rule that you want to change.
4. Make your changes and choose Update.
5. Choose Save changes in the box that appears to apply the rule.
To delete an IP rule
1. On the Amazon QuickSight start page, choose Manage QuickSight, and then choose Security and
Permissions.
2. Choose IP restrictions.
3. Make your changes and choose Update. A rule marked for deletion appears with a strike through it.
4. Choose Save changes in the box that appears to apply the rule.
When your IP rules are turned off, traffic is allowed from all IP addresses. If a user is accessing the
Amazon QuickSight account from a restricted IP address when you turn on IP restrictions, they lose
access to the account.
Account holders can audit users who make changes to the IP restrictions table by using AWS CloudTrail.
For more information, see the AWS CloudTrail User Guide.
In Enterprise edition, you can select the functionality that people can access in the Amazon QuickSight
console. Amazon QuickSight custom permissions are applied through IAM policies. They override the
permissions that are typically granted by assigning QuickSight users to one of the default security
cohorts in QuickSight (admin, author, reader).
• For custom permissions to work, you need to be using AWS Identity and Access Management (IAM)
federated users.
1027
Amazon QuickSight User Guide
Customizing access to the QuickSight console
• You can't grant permissions that are above someone's default security cohort. For example, you can't
grant access to edit dashboards to someone who has reader access.
• To customize permissions, you need to be a QuickSight administrator with permissions to use
"quicksight:*CustomPermissions".
IAM policies and QuickSight permissions are separate from each other. A user can be granted access
permissions and assigned a role with an IAM policy, but IAM policies don't control what users can do
within QuickSight. QuickSight resources have their own set of permissions that are used to customize
access to QuickSight-specific features. These permissions are handled at the resource level outside of
IAM.
By using custom permissions profiles, you can restrict access to any combination of the following
operations.
Share dataset
Share
Reports Create
Update
Note
Items added to folders are shared regardless of custom permissions. This applies to dashboards,
analyses, and datasets.
1. Open your profile menu at upper right, and choose Manage QuickSight. You need to be an Amazon
QuickSight administrator to complete this process.
2. Choose Manage users at left to open the Manage users screen.
3. Choose Manage permissions. The Manage custom permissions screen appears.
4. Choose one of the following options:
• To view or edit an existing custom permissions profile, choose View/Edit from the ellipsis (…)
menu at right.
• To create a new custom permissions profile, choose Create at the lower part of the screen.
1028
Amazon QuickSight User Guide
Customizing access to the QuickSight console
5. Whether you are creating or updating, make selections for the following items:
Any option that is not selected is allowed. For example, if you don't want users to create or update
data sources, but you're okay with them doing anything else, select Creating or updating all data
sources only. Leave the remaining options unselected.
6. Choose Create or Update to confirm your choices. Choose Back at upper left to exit without
making any changes. To see an example policy, see IAM identity-based policies for Amazon
QuickSight (p. 983).
7. After you are satisfied with your changes, record the name of the custom permissions profile.
Provide this to whoever is to use the API to add the permissions for a new or existing user.
You use the API to add or change the permissions assigned to a user.
Before you begin, you need to set up and configure the AWS CLI. For more information, see Installing the
AWS CLI and Configuring the AWS CLI in AWS Command Line Interface User Guide. In addition, you need
permissions to use the QuickSight API. For more information, see .
• For a new user – Add a new user with a permissions profile by using a command like the following
example:
• For an existing user – Associate an existing user with a permissions profile by using a command
like the following example:
3. (Optional) Remove an existing user from a permissions profile by using a command like the
following example:
1029
Amazon QuickSight User Guide
Incident response, logging, and monitoring
Amazon QuickSight is integrated with AWS CloudTrail, which creates a record of calls from the Amazon
QuickSight console and code calls to Amazon QuickSight API operations. For more information, see
Logging operations with AWS CloudTrail (p. 1030).
Amazon QuickSight doesn’t natively support alerting with Amazon CloudWatch or other external
systems. However, it's possible to develop a custom solution to process CloudTrail logs.
Amazon QuickSight service status can be viewed on the Service Health Dashboard.
Topics
• Logging operations with AWS CloudTrail (p. 1030)
Amazon QuickSight is integrated with AWS CloudTrail. This service provides a record of actions taken
by a user, role, or an AWS service in Amazon QuickSight. CloudTrail captures all API calls for Amazon
QuickSight as events. The calls captured include some calls from the Amazon QuickSight console and all
code calls to Amazon QuickSight API operations. If you create a trail, you can enable continuous delivery
of CloudTrail events to an Amazon S3 bucket, including events for Amazon QuickSight. If you don't
configure a trail, you can still view the most recent events in the CloudTrail console in Event history.
Using the information collected by CloudTrail, you can determine the request that was made to Amazon
QuickSight, the IP address from which the request was made, who made the request, when it was made,
and additional details.
By default, the log files delivered by CloudTrail to your bucket are encrypted by Amazon server-side
encryption with Amazon S3-managed encryption keys (SSE-S3). To provide a security layer that is
directly manageable, you can instead use server-side encryption with AWS KMS–managed keys (SSE-
KMS) for your CloudTrail log files. Enabling server-side encryption encrypts the log files but not the
digest files with SSE-KMS. Digest files are encrypted with Amazon S3-managed encryption keys (SSE-S3).
To learn more about CloudTrail, including how to configure and enable it, see the AWS CloudTrail User
Guide.
Topics
• Amazon QuickSight Information in CloudTrail (p. 1030)
• Tracking non-API events by using CloudTrail logs (p. 1032)
• Example: Amazon QuickSight log file entries (p. 1034)
1030
Amazon QuickSight User Guide
Logging operations with AWS CloudTrail
CloudTrail is enabled on your AWS account when you create the account. When supported event activity
occurs in Amazon QuickSight, that activity is recorded in a CloudTrail event along with other AWS service
events in Event history. You can view, search, and download recent events in your AWS account. For
more information, see Viewing Events with CloudTrail Event History.
For an ongoing record of events in your AWS account, including events for Amazon QuickSight, create a
trail. A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create
a trail in the console, the trail applies to all AWS Regions. The trail logs events from all Regions in the
AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can
configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs.
For more information, see the following:
Amazon QuickSight supports logging the following actions as events in CloudTrail log files:
• Whether the request was made with root or AWS Identity and Access Management (IAM) user
credentials
• Whether the request was made with temporary security credentials for an IAM role or federated user
• Whether the request was made by another AWS service
For more information on user identity, see the CloudTrail userIdentity Element.
By default, each Amazon QuickSight log entry contains the following information:
• eventId – Event Id
Note
CloudTrail displays users as unknown if they were provisioned by Amazon QuickSight. This
display is because these users aren't a known IAM identity type.
1031
Amazon QuickSight User Guide
Logging operations with AWS CloudTrail
User management
Subscription
Dashboard
Analysis
1032
Amazon QuickSight User Guide
Logging operations with AWS CloudTrail
Data source
• External – External
• S3 – S3
• Presto – Presto
• RDS – RDS
Data set
The following example shows a CloudTrail log entry that demonstrates the BatchCreateUser action.
{
"eventVersion":"1.05",
"userIdentity":
{
"type":"Root",
"principalId":"123456789012",
"arn":"arn:aws:iam::123456789012:root",
"accountId":"123456789012",
"userName":"test-username"
},
"eventTime":"2017-04-19T03:16:13Z",
"eventSource":"quicksight.amazonaws.com",
"eventName":"BatchCreateUser",
"awsRegion":"us-west-2",
"requestParameters":null,
"responseElements":null,
"eventID":"e7d2382e-70a0-3fb7-9d41-a7a913422240",
"readOnly":false,
"eventType":"AwsServiceEvent",
"recipientAccountId":"123456789012",
"serviceEventDetails":
{
"eventRequestDetails":
{
"users":
{
"test-user-11":
{
"role":"USER"
},
"test-user-22":
{
"role":"ADMIN"
}
}
},
"eventResponseDetails":
{
"validUsers":[
],
"InvalidUsers":[
"test-user-11",
"test-user-22"
]
}
}
}
1034
Amazon QuickSight User Guide
Compliance validation
For information about this service and ISO 27001, a security management standard that specifies
security management best practices, see ISO 27001 Overview.
For the most current list of AWS services in scope of specific compliance programs, see AWS services in
scope by compliance program. For general information, see AWS compliance programs.
You can download third-party audit reports using AWS Artifact. For more information, see Downloading
reports in AWS Artifact.
Your compliance responsibility when using Amazon QuickSight is determined by the sensitivity of your
data, your company's compliance objectives, and applicable laws and regulations. AWS provides the
following resources to help with compliance:
• Security and compliance quick start guides – These deployment guides discuss architectural
considerations and provide steps for deploying security- and compliance-focused baseline
environments on AWS.
• Architecting for HIPAA security and compliance paper – This paper describes how companies can use
AWS to create HIPAA-compliant applications.
This is a HIPAA Eligible Service. For more information about AWS, U.S. Health Insurance Portability and
Accountability Act of 1996 (HIPAA), and using AWS services to process, store, and transmit protected
health information (PHI), see HIPAA Overview.
• AWS compliance resources – This collection of workbooks and guides might apply to your industry and
location.
• AWS Config – This AWS service assesses how well your resource configurations comply with internal
practices, industry guidelines, and regulations.
• AWS Security Hub – This AWS service provides a comprehensive view of your security state within AWS
that helps you check your compliance with security industry standards and best practices.
The AWS global infrastructure is built around AWS Regions and Availability Zones. AWS Regions provide
multiple physically separated and isolated Availability Zones, which are connected with low-latency,
high-throughput, and highly redundant networking. With Availability Zones, you can design and operate
applications and databases that automatically fail over between Availability Zones without interruption.
Availability Zones are more highly available, fault tolerant, and scalable than traditional single or
multiple data center infrastructures.
Because Amazon QuickSight is an AWS-managed application, all patches and updates are applied by
AWS as needed.
For more information about AWS Regions and Availability Zones, see AWS global infrastructure.
1035
Amazon QuickSight User Guide
Infrastructure security
Amazon QuickSight is delivered as a web application, hosted on dedicated Amazon EC2 hosts, separate
from AWS virtual private clouds (VPCs). Instead of deploying QuickSight on your own hosts, you access
the QuickSight service through regional public endpoints. QuickSight accesses data sources over a
secured internet connection from regional endpoints. To access data sources that are located inside a
corporate network, configure the network to allow access from one of the QuickSight public IP address
blocks. We recommend that you consider using a VPC (a virtual network dedicated to your AWS account).
• Global Infrastructure: The Most Extensive, Reliable, and Secure Global Cloud Infrastructure
• AWS Regions, websites, IP address ranges, and endpoints (p. 915)
• Connecting to a VPC with Amazon QuickSight (p. 1040)
As a managed service, Amazon QuickSight is protected by the AWS global network security procedures
that are described in the Amazon Web Services: Overview of Security Processes paper.
If you use AWS published API calls to access QuickSight through the network, clients must support
Transport Layer Security (TLS) 1.0 or later. We recommend TLS 1.2 or later. Clients must also support
cipher suites with perfect forward secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve
Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7 and later support these modes.
Additionally, requests must be signed by using an access key ID and a secret access key that is associated
with an AWS Identity and Access Management (IAM) principal. Or you can use the AWS Security Token
Service (AWS STS) to generate temporary security credentials to sign requests.
You can call these API operations from any network location, but QuickSight does support resource-
based access policies, which can include restrictions based on the source IP address. You can also
use QuickSight policies to control access from specific Amazon Virtual Private Cloud (Amazon VPC)
endpoints or specific VPCs. Effectively, this isolates network access to a given QuickSight resource from
only the specific VPC within the AWS network. For more information on using QuickSight in a VPC, see
Connecting to a VPC with Amazon QuickSight (p. 1040).
Topics
• Network and database configuration requirements (p. 1036)
• Connecting to a VPC with Amazon QuickSight (p. 1040)
1036
Amazon QuickSight User Guide
Network and database configuration requirements
For you to use your database server from QuickSight, your server must be accessible from the internet. It
must also allow inbound traffic from QuickSight servers.
If the database is on AWS and in the same AWS Region as your QuickSight account, you can auto-
discover the instance to make connecting to it easier. To do this, you must grant QuickSight permissions
to access it. For more information, see Accessing data sources (p. 944).
• Authorizing connections from Amazon QuickSight to Amazon RDS DB instances (p. 947)
• Authorizing connections from Amazon QuickSight to Amazon Redshift clusters (p. 950)
• Authorizing connections from Amazon QuickSight to Amazon EC2 instances (p. 956)
• An internet gateway.
• A public subnet.
• A route in the route table between the internet gateway and the AWS instance.
• Network access control lists (ACLs) in your VPC that allow traffic between the cluster or instance and
QuickSight servers. These ACLs must do the following:
• Allow inbound traffic from the appropriate QuickSight IP address range and all ports to the IP
address and port that the database is listening on.
• Allow outbound traffic from the database’s IP address and port to the appropriate QuickSight IP
address range and all ports.
For more information about QuickSight IP address ranges, see IP address ranges for
QuickSight (p. 1039) following.
For more information about configuring VPC ACLs, see Network ACLs.
• Security group rules that allow traffic between the cluster or instance and QuickSight servers. For
further details on how to create appropriate security group rules, see Authorizing connections to AWS
data stores (p. 946).
For more information about configuring a VPC in the Amazon VPC service, see Networking in Your VPC.
1037
Amazon QuickSight User Guide
Network and database configuration requirements
For more information on Amazon VPC, see Amazon VPC and Amazon VPC Documentation.
• Authorizing connections from Amazon QuickSight to Amazon RDS DB instances (p. 947)
• Authorizing connections from Amazon QuickSight to Amazon Redshift clusters (p. 950)
• Authorizing connections from Amazon QuickSight to Amazon EC2 instances (p. 956)
If your database is on a non-AWS server, you must change that server's firewall configuration to accept
traffic from the appropriate QuickSight IP address range. For more information about QuickSight IP
address ranges, see IP address ranges for QuickSight (p. 1039). For any other steps that you need to take
to enable internet connectivity, see your operating system documentation.
Following is a list of accepted public certificate authorities. If you are using a non-AWS database
instance, your certificate must be on this list, or it won't work.
1038
Amazon QuickSight User Guide
Network and database configuration requirements
For more information on the IP address ranges for QuickSight in supported regions, see AWS Regions,
websites, IP address ranges, and endpoints (p. 915).
• It must be accessible from the internet. To enable internet connectivity, see your database
management system documentation.
• It must be configured to accept connections and authenticate access using the user credentials that
you provide as part of creating the data set.
• If you are connecting to MySQL or PostgreSQL, the database engine must be accessible from your host
or IP range. This optional security limitation is specified in MySQL or PostgreSQL connection settings.
1039
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
If this limitation is in place, any attempt to connect from a nonspecified host or IP address is rejected,
even if you have the correct user name and password.
• In MySQL, the server accepts the connection only if the user and host are verified in the user table. For
more information, see Access Control, Stage 1: Connection Verification in the MySQL documentation.
• In PostgreSQL, you control client authentication by using the pg_hba.conf file in the database
cluster's data directory. However, this file might be named and located differently on your system. For
more information, see Client Authentication in the PostgreSQL documentation.
Amazon QuickSight Enterprise edition is fully integrated with the Amazon VPC service. A VPC based on
this service closely resembles a traditional network that you operate in your own data center. It enables
you to secure and isolate traffic between resources. You define and control the network elements to suit
your requirements, while still getting the benefit of cloud networking and the scalable infrastructure of
AWS.
By creating a VPC connection in QuickSight, you're adding an elastic network interface in your VPC. This
network interface allows QuickSight to exchange network traffic with a network instance within your
VPC. You can provide all of the standard security controls for this network traffic, as you do with other
traffic in your VPC. Route tables, network access control lists (ACLs), subnets, and security groups settings
all apply to network traffic to and from QuickSight in the same way that they apply to traffic between
other instances in your VPC.
When you register a VPC connection with QuickSight, you can securely connect to data that's available
only in your VPC, for example:
This works if you set up connectivity between the VPC and your on-premises network. For example,
you might set up connectivity with AWS Direct Connect, a virtual private network (VPN), or a proxy.
After you connect to the data, you can use it to create data analyses and publish secure data dashboards.
To further increase security, consider logging data access operations with AWS CloudTrail, as described in
Logging operations with AWS CloudTrail (p. 1030). You can even create a dashboard to help you analyze
your CloudTrail logs. By combining QuickSight logs with logs from your other AWS services, you can get
a fuller view of how your data is being used.
You don't need to be an networking expert to connect and use a VPC with QuickSight, because
QuickSight provides a user interface for adding your network information. However, the person who
gathers the information that you need for setup should have some understanding of networking
concepts and using VPCs. This person also needs read-only access to the services. If network changes are
required, we recommend that you don't make changes to your networking configuration without expert
assistance.
1040
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
To use a command line interface to access your VPC, you can use the AWS Command Line Interface (AWS
CLI). For more information on using the AWS CLI, see the AWS CLI User Guide.
If you're a system administrator – we recommend that you focus on Setting up a VPC to use with
Amazon QuickSight (p. 1042) and Finding information to connect to a VPC (p. 1049). The sections after
that deal with setting up the connections in QuickSight and testing them.
If you're a QuickSight administrator – if you have the information that you need to configure a VPC
connection in the QuickSight console, focus on Configuring the VPC connection in the QuickSight
console (p. 1052) and Testing the connection to your VPC data source (p. 1054).
Topics
• VPC terminology (p. 1041)
• Supported VPC data sources (p. 1042)
• Setting up a VPC to use with Amazon QuickSight (p. 1042)
• Finding information to connect to a VPC (p. 1049)
• Configuring the VPC connection in the QuickSight console (p. 1052)
• Testing the connection to your VPC data source (p. 1054)
VPC terminology
The following terminology can be useful when you work with a VPC and Amazon QuickSight.
A VPC is a virtual private cloud, which works like a private network to isolate the resources within it. The
solution described in these topics uses an AWS service called Amazon VPC.
A route table contains a set of rules, called routes, that are used to determine where network traffic is
directed. You can view the route table in the Amazon VPC console at https://console.aws.amazon.com/
vpc/. The VPC details display the route table that the VPC is using. You can also see Route tables listed
in the Amazon VPC console.
A subnet is a defined set of network IP addresses that are used to increase the security and efficiency
of network communications. You can think of them like postal codes, used for routing packages from
one location to another. The Subnets list in the Amazon VPC console displays subnet IDs and also their
associated VPC IDs, route tables, and network ACLs.
A network interface represents a virtual network card. The network interface automatically created by
QuickSight is called a QuickSight network interface. You can view your QuickSight network interface in
the Amazon EC2 console at https://console.aws.amazon.com/ec2/. The network interface displays its
network interface ID, subnet ID, VPC ID, security group, and the Availability Zone that it exists in. You
can click on the security group name to see its group ID and its inbound and outbound rules. The term
network interface in the following sections always means elastic network interface.
A security group is a set of rules that controls the network access to the resources it is associated with.
Access is permitted only to and from the components defined in the security group's inbound and
outbound rules. If no rules are defined, the security group prevents all access. You can view security
groups from several different consoles, depending on which resource that a particular security group
applies to. You can see all the security groups and their settings in one place in the VPC console. For the
QuickSight VPC connection, create a new security group.
1041
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
• The traffic source to allow for inbound rules, or the traffic destination to allow for outbound rules.
When you work with a VPC and QuickSight, you specify the security group ID to use.
• An optional description. We recommend that you add the word QuickSight to the description for
QuickSight VPC rules.
An internet gateway is a VPC component that allows communication between instances in your VPC and
the internet. You don't need an internet gateway to use QuickSight VPC connections.
A VPC endpoint enables you to privately connect your VPC to supported AWS services without using
public IP addresses. You don't need to set up a VPC endpoint to use QuickSight VPC connections.
For a VPC data source to be accessed from QuickSight, the following statements must be true of your
configuration:
1. The Domain Name System (DNS) name of the VPC data source can be resolved from outside of your
VPC.
2. The connection returns the private IP address of your instance. Databases hosted by Amazon Redshift,
Amazon RDS, and Aurora automatically meet this requirement.
3. There is a clearly defined network path from the data source to QuickSight.
4. You registered the VPC with QuickSight by creating or using a VPC connection with the QuickSight
console.
To set up a VPC to use with Amazon QuickSight Enterprise edition, you need access to Amazon VPC and
Amazon EC2. You also need access to each AWS database service that you plan to add to QuickSight. You
can use the console, or you can use the AWS Command Line Interface (AWS CLI). For more information
1042
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
about the CLI, see the AWS Command Line Interface User Guide. To work with the CLI, go to https://
aws.amazon.com/cli/.
Before you begin to set up your VPC connection in QuickSight, make sure that you understand the
components of a VPC deployment. As part of that, familiarize yourself with the VPC's subnets and
security groups in relation to the destinations (databases) that you want to reach from QuickSight. To
set up a successful VPC connection, make sure that the following components work together to allow
network traffic to pass between QuickSight and your data source:
In the following topics, you can find the network components that are involved. You can also find
descriptions of their roles in the network configuration of your VPC and your QuickSight VPC connection.
The network interface for QuickSight that is automatically created during setup is called the QuickSight
network interface (QNI).
If your VPC is already completely configured, skip to the next section, Finding information to connect to
a VPC (p. 1049).
Topics
• VPC (p. 1043)
• Subnets (p. 1044)
• Security groups: inbound and outbound rules (p. 1045)
• Sample rules (p. 1046)
• Route table (p. 1048)
• QuickSight elastic network interface (p. 1048)
• Inbound endpoints for Amazon Route 53 Resolver (p. 1049)
VPC
A virtual private cloud (VPC) is a virtual network dedicated to your AWS account. The Amazon VPC service
that provides it is a networking layer for your AWS resources. Using Amazon VPC, you can define a virtual
network in your own logically isolated area within the AWS Cloud. A VPC closely resembles a traditional
network that you might operate in your own data center, with the benefits of using the AWS scalable
infrastructure. Amazon VPC for Amazon EC2 virtual computing environments, known as instances, can be
used for a variety of AWS resources.
VPCs offer options that allow for flexibility in a secure environment, for example:
• To configure your VPC, you can set its IP address range, create subnets, configure route tables, network
gateways, network interfaces, and security settings.
• To make the AWS Cloud an extension of your data center, you can connect your VPC to your own
corporate data center.
1043
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
• You can connect your instances in the VPC to the internet, or keep your instances isolated on a private
network.
• To protect the resources in each subnet, you can use multiple layers of security, including security
groups and network access control lists (ACLs).
If you have a default VPC and don't specify a subnet when you launch an instance, the instance is
launched into your default VPC. You can launch instances into your default VPC without needing to know
anything about Amazon VPC.
If you don't already have a VPC or want to use a new one, you can create one by following the
instructions in Getting started with Amazon VPC in the Amazon VPC User Guide. This section offers
guidance on how to set up your VPC. The guidance includes options for public and private subnets and
for AWS Site-to-Site VPN access for your corporate network (known as on-premises access). You can also
use VPC peering or AWS Direct Connect to reach an on-premises database instance.
You can start to set up a VPC by using the create-vpc command. To learn details about VPC settings
for the AWS CLI, see Examples for VPC in the Amazon VPC User Guide.
To view your VPC or create a new one, sign in to the AWS Management Console and open the Amazon
VPC console at https://console.aws.amazon.com/vpc/. To create a new VPC, choose Launch VPC Wizard
and follow the instructions. Take note of your new VPC ID. To view VPCs, choose Your VPCs at left.
For step-by-step instructions for setting up a VPC, see the following topics (choose the ones that relate
to your scenario):
If you want to migrate data source instances into the same VPC, see the following AWS Support articles:
For troubleshooting information, see How do I troubleshoot issues with VPC route tables?, an article with
video created by AWS Support.
Subnets
A subnet is a range of IP addresses in your VPC. You can attach AWS resources, such as EC2 instances
and RDS DB instances, to subnets. You can create subnets to group instances together according to your
security and operational needs.
1044
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
For Amazon QuickSight to connect to your database, the network needs to route traffic to the data
sources that you want to reach from the subnet used by the QuickSight network interface. If the data
sources are on different subnets, make sure that there is a route from the QuickSight network interface
to your database instance. By default, each subnet in a VPC is associated with one main route table
and can reach the other subnets. For more information, see VPC and Subnets and Network ACLs in the
Amazon VPC User Guide.
If you use Amazon RDS, DB instances are associated with a subnet group that you can view either in the
Amazon RDS console (https://console.aws.amazon.com/rds/) or in the VPC console. For troubleshooting
connectivity to Amazon RDS, see the AWS Support article How can I troubleshoot connectivity to an
Amazon RDS instance that uses a public or private subnet of a VPC?
For your VPC connection, create a new security group with the description QuickSight-VPC. This
security group must allow all inbound TCP traffic from the security groups of the data destinations that
you want to reach. The following example creates a new security group in the VPC and returns the ID of
the new security group.
Important
Network configuration is sufficiently complex that we strongly recommend that you create a
new security group for use with QuickSight. It also makes it easier for AWS Support to help
you if you need to contact them. Creating a new group isn't absolutely required. However, the
following topics are based on the assumption that you follow this recommendation.
To enable Amazon QuickSight to successfully connect to an instance in your VPC, configure your security
group rules to allow traffic between the QuickSight network interface and the instance that contains
your data. To do this, configure the security group attached to your database's instance inbound rules to
allow the following traffic:
or
• The private IP address of the QuickSight network interface
For more information, see Security groups for your VPC and VPCs and subnets in the Amazon VPC User
Guide.
Inbound rules
When you create a security group, it has no inbound rules. No inbound traffic originating from another
host to your instance is allowed until you add inbound rules to the security group.
The security group attached to the QuickSight network interface behaves differently than most security
groups, because it isn't stateful. Other security groups are usually stateful. This means that, after they
1045
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
establish an outbound connection to a resource's security group, they automatically allow return traffic.
In contrast, the QuickSight network interface security group doesn't automatically allow return traffic.
Because of this, adding an egress rule to the QuickSight network interface security group doesn't work.
To make it work for the QuickSight network interface security group, make sure to add an inbound rule
that explicitly authorizes the return traffic from the database host.
The inbound rule in your security group must allow traffic on all ports. It needs to do this because the
destination port number of any inbound return packets is set to a randomly allocated port number.
To restrict QuickSight to connect only to certain instances, you can specify the security group ID
(recommended) or private IP address of the instances that you want to allow. In either case, your security
group inbound rule still needs to allow traffic on all ports (0–65535).
To allow QuickSight to connect to any instance in the VPC, you can configure the QuickSight network
interface security group. In this case, give it an inbound rule to allow traffic on 0.0.0.0/0 on all ports
(0–65535). The security group used by the QuickSight network interface should be different than the
security groups used for your databases. We recommend that you use separate security groups for VPC
connection.
Important
If you are using a long-standing Amazon RDS DB instance, check your configuration to see if
you're using a DB security group. DB security groups are used with DB instances that are not in a
VPC and are on the EC2-Classic platform.
If this is your configuration, and you aren't moving your DB instance into the VPC for use with
QuickSight, make sure to update your DB security group's inbound rules. Update them to
allow inbound traffic from the VPC security group that you're using for QuickSight. For more
information, see Controlling Access with Security Groups in the Amazon RDS User Guide.
Outbound rules
By default, a security group includes an outbound rule that allows all outbound traffic. We recommend
that you remove this default rule and add outbound rules that allow specific outbound traffic only.
Warning
Do not configure the security group on the QuickSight network interface with an outbound
rule to allow traffic on all ports. For information on key considerations and recommendations
for managing network egress traffic from VPCs, see Security best practices for your VPC in the
Amazon VPC User Guide.
The security group attached to QuickSight network interface should have outbound rules that allow
traffic to each of the database instances in your VPC that you want QuickSight to connect to. To restrict
QuickSight to connect only to certain instances, specify the security group ID (recommended) or the
private IP address of the instances to allow. You set this up, along with the appropriate port numbers for
your instances (the port that the instances are listening on), in the outbound rule.
The VPC security group must also allow outbound traffic to the security groups of the data destinations,
specifically on the port or ports that the database is listening on.
Sample rules
Following, you can find some example configurations of inbound and outbound rules for Amazon RDS
and Amazon Redshift.
The following tables show rule settings for connecting QuickSight to Amazon RDS for MySQL.
1046
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
Protocol TCP
Source sg-RDS11111111
Type MYSQL/Aurora
Protocol TCP
Source sg-RDS11111111
Type MYSQL/Aurora
Protocol TCP
Source sg-ENI3333333
Protocol TCP
Source sg-RedSh222222
Protocol TCP
Source sg-RedSh222222
1047
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
Protocol TCP
Source sg-ENI3333333
Route table
To use VPC peering or AWS Direct Connect to reach an on-premises database instance, update the route
table that's associated with the VPC you're using with QuickSight. For more information on route tables,
see Route tables in the Amazon VPC User Guide.
To learn more about VPC peering and view sample scenarios and configurations, see What is VPC
peering? in the Amazon VPC Peering Guide. For an example configuration, see Example: Services using
AWS PrivateLink and VPC peering in the Amazon VPC User Guide.
Then you can use the create-route command to create a route. For more information and examples,
see create-route in the AWS CLI Command Reference.
For the following examples to work, make sure that you have a subnet in the VPC associated with the
route table. The first example describes the route table with the specified VPC ID. The second one
describes the route table with the specified route table ID.
The following example describes the specified associations between a specific VPC and your local
gateway route tables.
1048
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
Then you add the VPC connection to each QuickSight data source you create. The QuickSight network
interface alone doesn't give QuickSight direct access to your databases. The VPC connection works only
for the QuickSight data sources that are configured to use it.
When you use the QuickSight data source to query a database or other instance within your VPC, all
the network traffic from QuickSight originates from this QuickSight network interface. Because the
QuickSight network interface exists inside your VPC, traffic originating from it can reach destinations
within your VPC by using their private IP addresses. Each QuickSight network interface gets its own
private IP address that comes from the subnet you configure. The private IP address is unique for each
AWS account, unlike the public IP range.
There is only one QuickSight network interface for each VPC. It is created on the subnet that you set up
in the QuickSight VPC connection.
QuickSight can't directly use Route 53 Resolver to query private DNS servers. However, you can set up
Route 53 Resolver inbound endpoints to make these queries indirectly. For more information about
inbound endpoints, see Forwarding inbound DNS queries to your VPCs in the Route 53 Resolver Developer
Guide. To use inbound endpoints in QuickSight, provide the IP addresses of the endpoints for DNS
resolver endpoints when you create a VPC connection.
To gather the information to have ready when you create a VPC connection in Amazon QuickSight
Enterprise edition, take the steps listed following.
Steps
• Identify the data sources to use (p. 1049)
• Identify the AWS Region to use (p. 1050)
• Identify the VPC ID to use (p. 1050)
• Identify the subnet ID to use (p. 1050)
• Identify the security group to use (p. 1051)
1049
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
You can't use QuickSight in one AWS Region and expect to connect to a VPC in a different AWS Region.
If your team is already using QuickSight, you can see your current AWS Region displayed at the upper
right of the QuickSight home screen. You can change the AWS Region you're using in QuickSight by
changing the Region at the upper right of the QuickSight home screen. All the people who plan to use
the data in the VPC must be using the same AWS Region in QuickSight.
Note
The AWS Region that displays in the QuickSight console doesn't have to match your AWS CLI
configuration. Take care not to mistake your current QuickSight console settings with the
settings that apply in any AWS CLI commands that you run or the settings in other consoles.
Changing the current AWS Region in any console doesn't change the Region anywhere except
for that page.
For example, let's say you have three tabs open in one browser window. You can have the
QuickSight console open in one AWS Region, the Amazon VPC console open in a second Region,
the Amazon RDS console open in a third Region, and the AWS CLI running in a fourth Region.
The following describe-vpcs example retrieves details for all of your VPCs.
The following describe-vpcs example retrieves details for the specified VPC.
In the VPC console (https://console.aws.amazon.com/vpc/), choose Your VPCs at left. Choose the VPC-
ID that you want to use. The correct one has Availability Zones in your AWS Region and also meets the
requirements described in Setting up a VPC to use with Amazon QuickSight (p. 1042). Also note the ID of
Main Route Table, because you need this to identify related subnets.
Tip
In the Amazon VPC console, you can filter by VPC. This option is located at the top left of the
console. If you filter by your VPC ID, all the other menus display only the network elements that
are in your selected VPC.
Your database instances can reside in different subnets. However, make sure you can trace the route from
this subnet to any data destinations that you want to reach.
1050
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
The following describe-subnets example uses a filter to retrieve details for the subnets of the
specified VPC.
In the VPC console (https://console.aws.amazon.com/vpc/), choose Subnets at left, and find the correct
Subnet ID. Any subnet is correct if your database subnet has a route to the subnet that you choose at
this point. In most cases, if you haven't configured the VPC network yourself, all subnets are connected.
When you locate the correct security group, copy its Group ID value.
The following example displays the security groups in a specific AWS Region. It displays only the group
ID, name, and description. It filters the result to display only groups for a specific VPC ID that also have a
description of "QuickSight-VPC".
The following example displays information about the security group with the ID sg-903004f8. Note
that you can't reference a security group for EC2-VPC by name.
The following example queries the results to describe VPC the inbound and outbound rules of a security
group with a specific ID (sg-903004f8), in a specific AWS Region (us-west-2).
1051
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
The following example uses filters to describe VPC security groups that have a specific rule that allows
SQL Server traffic (port 1433). The example also has a rule that allows traffic from all addresses
(0.0.0.0/0). The output is filtered to display only the group IDs, names, and descriptions of the security
groups. Security groups must match all filters to be returned in the results. However, a single rule doesn't
have to match all filters. (EC2-VPC only)
In the VPC console (https://console.aws.amazon.com/vpc/), choose Security groups at left, and find
the correct group ID. The correct one has your VPC ID on it. It should also have a tag or description that
includes the word "QuickSight".
To create a secure private connection to the Amazon VPC service from Amazon QuickSight Enterprise
edition, use the following procedure.
Prerequisites
• Sign in to QuickSight as an QuickSight admin to set up a VPC connection in QuickSight. To verify that
you're an QuickSight administrator, choose your profile image at upper right. If your profile menu
contains the option Manage QuickSight, then you're an QuickSight administrator.
• Before you begin, make sure that you have the following information available to copy and paste
into the VPC Connection screen. For more information, see Finding information to connect to a
VPC (p. 1049).
• AWS Region – The AWS Region where you plan to create a connection to your data source.
• VPC ID – The ID of the VPC that contains the data, the subnets, and the security groups that you
plan to use.
• Subnet ID – The ID of the subnet that the QuickSight network interface is using.
• Security group ID – The ID of the security group.
To create a secure private connection to the Amazon VPC service from Amazon QuickSight
Enterprise edition
1. In QuickSight, choose your profile icon at the upper right of the screen, then choose Manage
QuickSight.
Only QuickSight administrators can view the Manage QuickSight option. If you don't see this option
on your profile menu, you're not an administrator. In this case, contact your QuickSight account
administrators for assistance.
1052
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
2. On the menu at left, choose Manage VPC connections. Choose one of the following three options:
To change a VPC connection, you must delete it and then recreate it. You can reuse the same VPC
connection name, to avoid having to reconnect your data sources.
3. Delete a VPC connection
If your database host IP address must be resolved through private DNS servers in your AWS account,
enter IP addresses for Route 53 Resolver inbound endpoints (one per line).
Make sure that you are entering an endpoint, rather than a database address like the one you plan
to use in QuickSight. Most AWS-hosted databases don't need to resolve DNS queries between VPCs
and a customer's network. For more information, see Resolving DNS queries between VPCs and
your network in the Amazon Route 53 Developer Guide. You only need this if you can't resolve the IP
address that connects to your database by using the public DNS server system.
6. Review your choices, then choose Create.
7. Verify that QuickSight has created an QuickSight elastic network interface in your AWS account. To
do this, check that the network interface has Status in-use and Attachment Status attached. To
locate the correct network interface, use the following steps:
To use the AWS CLI, use the following command to view QuickSight network interface
information.
Note
When you create a new QuickSight VPC connection, QuickSight assumes an
implicit IAM role with permissions to the following QuickSight and EC2 actions:
quicksight:CreateVPCConnection and ec2:CreateNetworkInterface. However,
these permissions aren't directly assigned to the person who configures the QuickSight VPC
connection.
1053
Amazon QuickSight User Guide
Connecting to a VPC with QuickSight
To test whether you can connect to your data source through an existing Amazon QuickSight VPC
connection, use the following procedure.
Before you begin, collect the information you need to connect. If you plan to copy and paste settings
from a file, make sure that it doesn't contain any of the following: formatting (list bullets or numbers),
blank space (spaces, tabs), or invisible "gremlin" (non-ASCII, null (ASCII 0), or control) characters.
Your data source instance must use the same VPC that you used to create the VPC connection. Also,
the associated security group must be properly configured. For more information, see Setting up a
VPC to use with Amazon QuickSight (p. 1042).
4. Enter the connection information for the data source. The fields for the data source are sometimes
displayed in different order depending on which data source you choose. For more information, see
Creating a data source (p. 127).
• For Data source name, enter a descriptive name for the new data source. This name appears
beside the data source logo on a tile on the Create a data set page. For testing purposes, name it
"VPC test-" followed by the database name or location, whichever is unique.
• For Connection Type, choose the name of the VPC connection that has a route to your data
source. If the correct VPC is missing from the list, ask a QuickSight administrator to verify that the
VPC connection is correct in QuickSight. If it looks correct, ask a system administrator to verify
that the data source and VPC are set up for this purpose.
• The name or other identifier for the server or instance to connect to. The descriptors vary
depending on which one you're connecting to, but it's usually one or more of the following:
hostname, IP address, cluster ID, instance ID, connector, or site based URL.
• Database name shows the default database for the Instance ID cluster or instance. If you want to
use a different database on that cluster or instance, enter its name.
• The name of the collection of data that you want to use.
The descriptor varies depending on the provider, but it's usually one of the following: database,
warehouse, or catalog. In this topic, we use the word "database" as a generic term.
• For Credentials, enter a user name and password to use for everyone who connects from
QuickSight using this data source. The user name must have permissions to do the following:
• Access the target database.
• Read (perform a SELECT statement on) all of the tables that you want to use in that database.
5. Choose Validate connection to verify your connection information is correct. If your connection
doesn't validate, correct the connection information and try again. If the information looks correct
but doesn't validate, do one or all of the following:
1054
Amazon QuickSight User Guide
Best practices
• Contact your QuickSight administrator to verify the settings in the QuickSight VPC connection.
• Contact your AWS administrator to verify that the VPC is correctly configured for use with
QuickSight.
6. After the connection validates, choose Create data source to save the connection profile. Or, choose
Cancel if you don't need to save it (recommended) after testing is complete.
Firewall – To allow users to access Amazon QuickSight, allow access to HTTPS and WebSockets Secure
(wss://) protocol. To allow Amazon QuickSight to reach a database that is on a non-AWS server, change
that server's firewall configuration to accept traffic from the appropriate Amazon QuickSight IP address
range.
SSL – Use SSL to connect to your databases, especially if you are using public networks. Using SSL with
Amazon QuickSight requires the use of certificates signed by a publicly-recognized certificate authority
(CA).
Enhanced security – Use Amazon QuickSightEnterprise edition to make use of its enhanced security
capabilities, including the following.
VPC – (Enterprise Edition) Use a virtual private cloud (VPC), for data in AWS data sources and for data
in on-premises servers without public connectivity. For AWS sources, VPC access for Amazon QuickSight
uses an elastic network interface for secure, private communication with data sources in a VPC. For
your local data, VPC allows you to use AWS Direct Connect to create a secure, private link with your on-
premises resources.
To add permissions to users, groups, and roles, it is easier to use AWS managed policies than to write
policies yourself. It takes time and expertise to create IAM customer managed policies that provide your
team with only the permissions they need. To get started quickly, you can use our AWS managed policies.
These policies cover common use cases and are available in your AWS account. For more information
about AWS managed policies, see AWS managed policies in the IAM User Guide.
AWS services maintain and update AWS managed policies. You can't change the permissions in AWS
managed policies. Services occasionally add additional permissions to an AWS managed policy to
support new features. This type of update affects all identities (users, groups, and roles) where the policy
is attached. Services are most likely to update an AWS managed policy when a new feature is launched
or when new operations become available. Services do not remove permissions from an AWS managed
policy, so policy updates won't break your existing permissions.
1055
Amazon QuickSight User Guide
AWSQuickSightElasticsearchPolicy
Additionally, AWS supports managed policies for job functions that span multiple services. For example,
the ReadOnlyAccess AWS managed policy provides read-only access to all AWS services and resources.
When a service launches a new feature, AWS adds read-only permissions for new operations and
resources. For a list and descriptions of job function policies, see AWS managed policies for job functions
in the IAM User Guide.
Wherever you are using AWSQuickSightElasticsearchPolicy, you can update to the new
AWS managed policy that's called AWSQuickSightOpenSearchPolicy. You can attach the policy
to your IAM entities. Amazon QuickSight also attaches the policy to a service role that allows
Amazon QuickSight to perform actions on your behalf. AWSQuickSightElasticsearchPolicy
is still available and as of August 31, 2021, had the same permissions as the new policy. However,
AWSQuickSightElasticsearchPolicy is no longer kept up-to-date with latest changes.
This policy grants read-only permissions that allow access to OpenSearch (previously known as
Elasticsearch) resources from Amazon QuickSight.
Permissions details
For information on the contents of this IAM policy, see AWSQuickSightElasticsearchPolicy in the IAM
console.
1056
Amazon QuickSight User Guide
Policy updates
You can attach AWSQuickSightOpenSearchPolicy to your IAM entities. Amazon QuickSight also
attaches this policy to a service role that allows Amazon QuickSight to perform actions on your behalf.
This policy grants read-only permissions that allow access to OpenSearch resources from Amazon
QuickSight.
Permissions details
• es – Allows principals to use es:ESHttpGet to access your OpenSearch domains, cluster settings, and
indices. This is required to use Amazon OpenSearch Service from QuickSight.
• es – Allows principals to use es:ListDomainNames to list your OpenSearch domains. This is required
to initiate access of Amazon OpenSearch Service from QuickSight.
• es – Allows principals to use es:DescribeElasticsearchDomain and es:DescribeDomain
to search your OpenSearch domains. This is required to use Amazon OpenSearch Service from
QuickSight.
• es – Allows principals to use es:ESHttpPost and es:ESHttpGet with your OpenSearch domains.
This is required to use a SQL plugin with read-only access to Amazon OpenSearch Service domains
from QuickSight.
For information on the contents of this IAM policy, see AWSQuickSightOpenSearchPolicy in the IAM
console.
1057
Amazon QuickSight User Guide
AWS glossary
For the latest AWS terminology, see the AWS glossary in the AWS General Reference.
1058
Amazon QuickSight User Guide
To find out what's new in Amazon QuickSight, see What's New with Analytics. To find out about changes
to the Amazon QuickSight service, sign up for the Amazon QuickSight newsletter.
New Amazon QuickSight releases appear in different AWS Regions over a period of time, beginning with
the first Region on the initial release date. Documentation is released in coordination with this process. If
you have questions, contact AWS Support or your technical account manager.
Note
The following table describes important changes in each Amazon QuickSight User Guide release
since March 4, 2019.
Visual Embedding (p. 1059) You can now embed visuals August 25, 2022
using a 1-click embed code or
with the Amazon QuickSight
API. For more information, see
Embedding visuals with the
Amazon QuickSight API.
Undo and redo changes in Q You can now undo or redo any August 22, 2022
answers (p. 1059) changes you make to a Q answer
by choosing the undo or redo
arrows in the Q search bar. For
more information, see step six in
Asking questions with Q.
Bookmarks (p. 1059) You can now bookmark views July 21, 2022
of a dashboard. For more
information, see Bookmarking
views of a dashboard.
Base Maps (p. 1059) When creating map visuals in July 21, 2022
QuickSight, you can now change
map base. For more information,
see Changing base maps.
Q updates (p. 1059) You can now try QuickSight Q July 7, 2022
out for free before getting the Q
add-on. For more information,
see Trying Amazon QuickSight
Q.
1059
Amazon QuickSight User Guide
Rolling dates in filters and You can now set a rolling date July 5, 2022
parameters (p. 1059) on date range fiters and relative
date parameters in analyses. For
more information, see Creating
range date filters in analyses and
Setting up parameters.
Calculations update (p. 1059) You can now create level-aware July 5, 2022
calculations in QuickSight. You
can specify at what level to
group computations using level-
aware calculation - aggregation
(LAC-A) functions. You can also
specify the window or partition
to compute a calculation
using level-aware calculation
- window (LAC-W) functions
(previously known as level-
aware aggregations). For more
information, see Using level-
aware calculations.
Allowed domains (p. 1059) Developers can now add a July 5, 2022
domain at run-time to an allow
list with the AllowedDomains
parameter of a
GenerateEmbedUrlForAnonymousUser
or a
GenerateEmbedUrlForRegisteredUser
API call. For more information,
see Allow listing domains at run-
time with the QuickSight API.
Account provisioning (p. 1059) You can now sign up for an July 5, 2022
Amazon QuickSight account
with the Amazon QuickSight
API. For more information, see
CreateAccountSubscription.
Monitoring data with Amazon You can now monitor metrics for June 22, 2022
CloudWatch (p. 1059) Amazon QuickSight dashboards,
visuals, and dataset ingestions
on Amazon CloudWatch to
provide your readers with a
consistent, high-performing,
and uninterrupted experience on
Amazon QuickSight. For more
information, see Monitoring data
in Amazon QuickSight.
Forecast boundaries (p. 1059) Authors can now set a minimum June 16, 2022
and maximum for forecasted
values. For more information,
see Forecasting and creating
what-if scenarios .
1060
Amazon QuickSight User Guide
Table and pivot table Authors and Readers can now June 14, 2022
enhancements (p. 1059) resize rows and columns in a
table or pivot table visual. For
more information, see Resizing
rows and columns in tables and
pivot tables.
Hiding fields in pivot You can now hide fields in June 14, 2022
tables (p. 1059) pivot table visuals. For more
information, see Showing and
hiding pivot table columns.
ML insights and forecasting for Readers can now see key data June 2, 2022
Q (p. 1059) insights and add forecasts to Q
answers. For more information,
see Asking questions with
Amazon QuickSight Q.
Line chart updates (p. 1059) QuickSight now supports 10,000 May 22, 2022
data points for line charts. For
more information, see Using line
charts.
1-click public You can now embed dashboards May 18, 2022
embedding (p. 1059) for anyone on the internet in
your public applications with a
1-click static embed code. For
more information, see Enabling
public access to dashboards with
a 1-click embed code.
Creating and managing You can now create and manage March 21, 2022
groups (p. 1059) groups in the QuickSight
console. For more information,
see Creating and managing
groups in Amazon QuickSight.
Updating files in a You can now update files in January 27, 2022
dataset (p. 1059) a dataset to get the latest
version of those files. For more
information, see Updating files
in a dataset.
1061
Amazon QuickSight User Guide
Rich text formatting for titles QuickSight now offers rich January 27, 2022
and subtitles (p. 1059) text formatting for titles and
subtitles, and the ability to add
hyperlinks and parameters in
titles. For more information, see
Formatting a visual title and
subtitle.
Sharing dashboards (p. 1059) You now have the option to November 23, 2021
grant everyone in your Amazon
QuickSight account access to a
dashboard. You can also share
a link to the dashboard with
anyone who has access to it. For
more information, see Sharing
dashboards.
Customizing email report You can now customize how November 23, 2021
templates (p. 1059) dashboard email reports appear
and behave for QuickSight
account users. For more
information, see Customizing
email report templates.
1-click enterprise You can now embed dashboards November 23, 2021
embedding (p. 1059) for registered users in your
internal applications with a
1-click static embed code.
For more information, see
Embedding dashboards for
registered users with a 1-Click
embed code.
New data source (p. 1059) QuickSight now supports November 22, 2021
connecting to an Exasol data
source. For more information,
see Supported data sources.
Dataset versioning (p. 1059) QuickSight now supports November 22, 2021
dataset versioning. For more
information, see Reverting
datasets back to previous
published versions.
Adding datasets with RLS to Q QuickSight Q topics now support November 19, 2021
topics (p. 1059) datasets with row-level security
(RLS). For more information, see
Adding datasets with RLS to a Q
topic.
1062
Amazon QuickSight User Guide
Sheet change performance QuickSight now only refreshes November 12, 2021
operations (p. 1059) visuals when switching sheets if
required. For more information,
see Refreshing visuals.
Embedding the Q search You can now embed the Q October 22, 2021
bar (p. 1059) search bar in your application for
registered users of QuickSight.
For more information, see
Embedding the QuickSight Q
search bar for registered users.
Email syncing for federated In Enterprise Edition, QuickSight October 22, 2021
users (p. 1059) administrators can now
restrict new users from using
personal email addresses
when provisioning through
their identity provider (IdP)
to QuickSight. For more
information, see Configuring
email syncing for federated
users.
Adding RLS tags to a You can now add tag-based October 19, 2021
dataset (p. 1059) rules to a dataset in QuickSight
when applying row-level security
(RLS). For more information,
see Using row-level security
(RLS) with tag-based rules to
restrict access to a dataset when
embedding dashboards for
anonymous users.
IP restrictions (p. 1059) You can now limit access to October 18, 2021
your organization's QuickSight
account to a predefined list of
Internet Protocol (IP) ranges.
For more information, see
Turning on Internet Protocol
(IP) restrictions in Amazon
QuickSight.
New table and pivot table You can now customize the October 12, 2021
styling options (p. 1059) look of tables and pivots tables.
For more information, see
Formatting tables and pivot
tables.
1063
Amazon QuickSight User Guide
New SPICE quota for imported In QuickSight Enterprise edition, October 12, 2021
data (p. 1059) you can now import up to
500 million rows into a SPICE
dataset. For more information,
see Data source quotas.
Links and images in You can now add links to tables. October 12, 2021
tables (p. 1059) You can also render links as
images in tables. For more
information, see Field styling.
Custom date formats (p. 1059) You can now customize how October 8, 2021
dates are formatted in your
filter and parameter controls.
For more information, see
Customizing date formats.
QuickSight q (p. 1059) You can now ask questions September 24, 2021
about your data in the Q bar
and get answers in the form of
visuals. For more information,
see Working with QuickSight q.
New geospatial region (p. 1059) QuickSight now supports September 22, 2021
creating geospatial charts for
India. For more information
about creating geospatial charts,
see Using geospatial charts
(maps).
Free-form layouts (p. 1059) You can now place visuals September 22, 2021
anywhere in your dashboard
using precise coordinates.
For more information, see
Customizing dashboards and
visuals.
Passing IAM roles to You can now pass IAM roles September 15, 2021
QuickSight (p. 1059) to QuickSight. For more
information, see Using Amazon
QuickSight with IAM.
Create datasets from existing You can now create datasets September 15, 2021
datasets (p. 1059) from existing datasets. For
more information, see Creating
a dataset using an existing
dataset.
1064
Amazon QuickSight User Guide
Share your view of a You can now share your view August 20, 2021
dashboard (p. 1059) of a dashboard. For more
information, see Sharing
dashboards.
Hide the data zoom on a You can now choose to show August 16, 2021
chart (p. 1059) or hide the data zoom for your
charts in Amazon QuickSight.
For more information, see
Formatting axes and Grid lines.
Row-level security with You can now use row-level July 29, 2021
tags (p. 1059) security (RLS) with tags to
specify which data your
(unauthenticated) users
can see in an embedded
Amazon QuickSight dashboard
depending on who they are. For
more information, see Using
RLS with tags to restrict access
to a dataset when embedding
dashboards for anonymous
users.
New embedding API Amazon QuickSight has the July 29, 2021
operations (p. 1059) following new API operations
for embedding analytics:
GenerateEmbedUrlForAnonymousUser
and
GenerateEmbedUrlForRegisteredUser.
You can still use the
GetDashboardEmbedUrl and
GetSessionEmbedUrl API
operations to embed dashboards
and the QuickSight console, but
they don't contain the latest
embedding capabilities. For
more information about using
the new API operations, see
Embedding overview. For more
information on using the old
API operations, see Embedding
analytics using the old API
operations.
Customizing charts (p. 1059) You can now hide the sort icon July 16, 2021
and the axis or field title in
charts in Amazon QuickSight.
For more information, see
Formatting axes and Grid lines.
1065
Amazon QuickSight User Guide
New chart type: Custom visual You can now embed webpages June 29, 2021
content (p. 1059) and online videos, forms, and
images in your QuickSight
dashboards using the custom
visual content chart type. For
more information, see Using
custom visual content in Amazon
QuickSight.
Feature improvements (p. 1059) You can now show totals for June 29, 2021
stacked bar charts. For more
information, see Using bar
charts.
Threshold alert Dataset owners can now set June 17, 2021
updates (p. 1059) a threshold alert evaluation
schedule for a dataset in
Amazon QuickSight. For more
information, see Working with
threshold alerts.
Duplicating analyses (p. 1059) You can now duplicate an June 17, 2021
analysis in Amazon QuickSight.
For more information, see
Duplicating an analysis.
Threshold alert You can now choose how often May 25, 2021
updates (p. 1059) you want to receive threshold
alerts in Amazon QuickSight. For
more information, see Working
with threshold alerts.
1066
Amazon QuickSight User Guide
Service control policies (p. 1059) Amazon QuickSight now April 26, 2021
supports using service control
policies (SCPs) to restrict
how individuals in your
organization can sign up for
Amazon QuickSight. For more
information, see Using service
control policies to restrict
Amazon QuickSight signup
options.
Seconds support for date Amazon QuickSight now March 30, 2021
fields (p. 1059) supports aggregating date fields
at the second level. For more
information, see Changing date
field granularity.
New feature (p. 1059) Amazon QuickSight now March 16, 2021
supports customizing tooltips in
visuals. For more information,
see Customizing tooltips in a
visual.
1067
Amazon QuickSight User Guide
Feature improvements (p. 1059) In Enterprise edition, Amazon March 16, 2021
QuickSight now supports
computing anomalies for a
time and measure field only,
and computing the exact
combination of fields in the
Category field well. For more
information, see Adding an ML
insight to detect outliers and key
drivers.
1068
Amazon QuickSight User Guide
New region: South America (São Amazon QuickSight is now December 23, 2020
Paulo) (p. 1059) available in South America (São
Paulo) (sa-east-1). For more
information, see AWS Regions,
websites, IP address ranges, and
endpoints.
New list items sheet control Amazon QuickSight now December 18, 2020
type (p. 1059) supports single and multi-select
list control on dashboards.
For more information, see
Parameter controls.
New formatting options for In Amazon QuickSight, you can December 17, 2020
tables (p. 1059) now reorder columns in table
charts. For more information,
see Using tables as visuals.
1069
Amazon QuickSight User Guide
Dynamic queries, plus dataset Amazon QuickSight now enables December 6, 2020
editor improvements (p. 1059) you to improve performance
for visuals based on direct
queries by specifying unique
keys for joined tables. There
are also multiple interface
improvements, such as settings
for optional autopreviews, zoom
in and out of data diagrams, join
recommendations, and more. For
more information, see Joining
data.
Developer portal for The QuickSight dev portal November 30, 2020
embedding (p. 1059) helps you learn how to use
embedding by example in your
web site or application. For more
information, see Using the dev
portal.
New data source: Amazon Amazon QuickSight now November 25, 2020
OpenSearch (p. 1059) supports connecting to
Amazon OpenSearch. For more
information, see Using Amazon
OpenSearch with Amazon
QuickSight.
New formatting options for In Amazon QuickSight, you can November 24, 2020
tables (p. 1059) now vertically align and wrap
the text for headers in table
charts. For more information,
see Using tables as visuals.
1070
Amazon QuickSight User Guide
New chart type: Box Amazon QuickSight now November 24, 2020
plots (p. 1059) supports using box plots so you
can visualize how your data is
distributed across an axis or over
time. For more information, see
Box plots.
Filled maps (p. 1059) Amazon QuickSight now November 24, 2020
supports filled maps so you
can visualize your data over a
geographical area. For more
information, see Filled maps.
Favorite folders (p. 1059) In Amazon QuickSight, you November 24, 2020
can now favorite your folders
for easy access. For more
information, see Organizing
assets into folders.
Null rendering (p. 1059) Amazon QuickSight now allows November 9, 2020
null values to be updated to
a custom string. For more
information, see Changing a
field format.
1071
Amazon QuickSight User Guide
New chart type: Funnel Amazon QuickSight now October 29, 2020
charts (p. 1059) supports using funnel charts
so you can display your data
in a linear process. For more
information, see Funnel charts.
Custom sorting (p. 1059) Amazon QuickSight now enables October 29, 2020
you to apply sort options on
fields outside the field wells.
This feature is available for all
charts that support sorting.
For more information, see
Describing data.
New region: AWS GovCloud (US- Amazon QuickSight is now October 28, 2020
West) (p. 1059) available in AWS GovCloud
(US-West) (gov-west-1). For
more information, see Amazon
QuickSight - AWS GovCloud
(US).
Filter across datasets (p. 1059) In Amazon QuickSight, you can October 23, 2020
now create filters that apply to
multiple datasets in an analysis.
For more information, see
Filtering data.
1072
Amazon QuickSight User Guide
Export to excel (p. 1059) Amazon QuickSight now September 14, 2020
supports exporting data from
pivot tables and table charts to
Microsoft Excel (.xslx) format.
For more information, see
Exporting data.
Duplicate sheets (p. 1059) Amazon QuickSight now September 14, 2020
supports duplicating sheets. For
more information, see Working
with multiple sheets in an
Amazon QuickSight analysis.
Customize labels of totals and In Amazon QuickSight, you can September 14, 2020
subtotals (p. 1059) now add custom text to display
beside totals and subtotals for
pivot tables and table charts. For
more information, see Displaying
totals and subtotals.
Skipped row details (p. 1059) When you import data into September 12, 2020
Amazon QuickSight, you now
get better error messages and
row-by-row information on
what caused rows to be skipped
during ingestion into SPICE.
For more information, see
Troubleshooting skipped rows.
New configuration option for Amazon QuickSight now September 11, 2020
multivalue lists (p. 1059) supports a configuration option
for multivalue lists to start
with no values selected. For
more information, see Setting
up parameters in Amazon
QuickSight.
1073
Amazon QuickSight User Guide
New table calculations (p. 1059) Amazon QuickSight now August 25, 2020
supports using window functions
firstValue and lastValue in
analyses. For more information,
see Table calculations.
Join SQL queries, tables, and Amazon QuickSight now August 25, 2020
files (p. 1059) supports using custom SQL
queries in joins with other
queries, tables, and files. For
more information, see Joining
data.
Embed the Amazon QuickSight In Amazon QuickSight Enterprise July 23, 2020
console (p. 1059) edition, you can now provide
the full dashboard authoring
experience of the QuickSight
console in your own custom-
branded authoring portal.
For more information, see
Embedding the Amazon
QuickSight console.
1074
Amazon QuickSight User Guide
Customize the console (p. 1059) In Amazon QuickSight Enterprise July 23, 2020
edition, you can now choose
whether to show or hide
QuickSight startup samples and
videos. You can also create and
specify a default theme to add
branding to your experience
of the QuickSight console.
For more information, see
Customizing the Amazon
QuickSight console.
Amazon QuickSight support for In Enterprise edition, QuickSight July 23, 2020
multitenancy (p. 1059) now offers an additional
layer of security to support
multitenancy. By creating users
and groups in a QuickSight
namespace, you can isolate
them from users and groups
in other namespaces. For more
information, see Supporting
multitenancy with isolated
namespaces.
Larger SPICE datasets (p. 1059) Amazon QuickSight Enterprise July 9, 2020
edition now supports SPICE
datasets with up to 250 million
(250,000,000) rows or 500 GB.
For more information, see Data
source limits.
Display width settings (p. 1059) In Amazon QuickSight, you can July 9, 2020
now choose between responsive
and fixed layouts for your
analyses and dashboards. You
can also temporarily change
your current view from the menu
bar. For more information, see
Display settings.
1075
Amazon QuickSight User Guide
Color settings for heat maps and You can now customize July 9, 2020
tree maps (p. 1059) gradient colors for your
heat maps and tree maps in
Amazon QuickSight. For more
information, see Changing
colors on heat maps and tree
maps.
Font choice (p. 1059) You can now customize your July 8, 2020
theme with a font. Choose from
a selection of fonts supported
by Amazon QuickSight. For more
information, see Using themes in
Amazon QuickSight.
AWS Lake Formation (p. 1059) If you use Amazon QuickSight June 29, 2020
Enterprise edition to query
Amazon Athena, you
can simplify data access
management by using AWS
Lake Formation to control
permissions to Athena. For more
information, see Authorizing
connections through AWS Lake
Formation.
New chart type (p. 1059) Amazon QuickSight now June 12, 2020
supports using histograms so
you can display the distribution
of values in your data. For more
information, see Histogram
charts.
Gauge chart update (p. 1059) You can now add conditional June 12, 2020
formatting to gauge charts
in Amazon QuickSight. For
more information, see Adding
conditional formatting to
visuals.
Five new languages (p. 1059) Amazon QuickSight now June 12, 2020
supports Danish, Dutch, Finnish,
Norwegian, and Swedish. These
languages expand upon the
existing 15 languages already
available in Amazon QuickSight.
For more information, see
Choosing a language in Amazon
QuickSight.
1076
Amazon QuickSight User Guide
New region: Mumbai (p. 1059) Amazon QuickSight is now June 3, 2020
available in Asia Pacific
(Mumbai) (ap-south-1). For more
information, see AWS Regions,
websites, IP address ranges, and
endpoints.
New SQL editor (p. 1059) Amazon QuickSight enhanced May 20, 2020
the SQL editor that you use
to create datasets from SQL
queries. The new SQL editor
supports syntax highlighting,
basic autocomplete, autoindent,
and line numbering. Also, you
can use the new schema explorer
to interactively explore schemas,
tables, fields, and data types. For
more information, see Using a
SQL query.
Update to presto data You can now use May 18, 2020
sources (p. 1059) nonauthenticated private Presto
as a data source. For more
information, see Creating a data
source using presto.
1077
Amazon QuickSight User Guide
Use logarithmic scale with You can now format visuals May 1, 2020
Amazon QuickSight (p. 1059) using log scale. For more
information, see Changing the
visual scale.
Severity levels for Amazon You can now choose the level April 17, 2020
QuickSight anomaly detection of severity for anomalies that
insights (p. 1059) display in your insight widgets.
For more information, see Using
anomaly detection.
Improvements to visual controls The on-visual menu can now April 17, 2020
in Amazon QuickSight (p. 1059) float at the upper-right corner
of the visual, moving inside or
outside the border of the visual.
Plus, you can make your visuals
smaller and have more of them,
as many as 36 across. For smaller
visuals, the new visual controls
have more viewing area for
charts and insights. To see the
new menu, choose one of your
visuals. For more information,
see Working with visuals.
Amazon QuickSight adds a new The new visual type, stacked April 17, 2020
visual type (p. 1059) area line charts, is similar to area
charts except that the stacked
values indicate the relationship
that each value contributes
to the whole. Using stacked
area charts, you can display
cumulative totals over time
while displaying the breakdown
by the chosen category. For
more information, see Line
charts.
Amazon QuickSight adds You can now create cascading April 2, 2020
cascading filters (p. 1059) filters by adding them to custom
actions in your analyses and
dashboards. Each custom
filter action can target one
or more visuals in the same
sheet, creating a cascading filter
effect. For more information, see
Custom actions in QuickSight.
1078
Amazon QuickSight User Guide
Modulo operation available in You can now use modulo March 8, 2020
Amazon QuickSight (p. 1059) operation to find the remainder
after dividing one number into
another. For more information,
see mod.
Images in Amazon QuickSight You can now insert images from March 8, 2020
narratives (p. 1059) URLs to be rendered as part of a
narrative. Images can be resized,
conditionally shown within an
IF block, and also hyperlinked
with the URL feature. For more
information, see Expression
editor screen and menus.
Amazon QuickSight adds You can now use minimum and March 8, 2020
minimum and maximum maximum date aggregations in
dates (p. 1059) tables and pivot tables. For more
information, see max and min.
Now you can customize Now you can control the February 4, 2020
minimum delta values to minimum delta value that
enhance Amazon QuickSight Amazon QuickSight uses to
ML-powered anomaly detect anomalies (also known
detection (p. 1059) as outliers). You can change this
setting when you are configuring
or exploring anomalies. For
more information, see Detecting
outliers with ML-powered
anomaly detection.
1079
Amazon QuickSight User Guide
Private VPC support for presto in Now Presto can use a December 10, 2019
Amazon QuickSight (p. 1059) VPC connection. For more
information, see Supported data
sources for VPC.
New LAA functions in Amazon Now you can use rank, December 10, 2019
QuickSight (p. 1059) denseRank, and
percentileRank for level-
aware aggregations. For more
information, see Using level-
aware aggregations.
1080
Amazon QuickSight User Guide
New Amazon QuickSight API Amazon QuickSight launches November 22, 2019
operations (p. 1059) new API operations to
programmatically manage
your data, dashboards, and
fine-grained access control
capabilities linked with AWS
Identity and Access Management
(IAM). With new data API
operations, you can create,
update, and delete Amazon
QuickSight data sources and
datasets programmatically. You
can also manage data refreshes
on your SPICE datasets with API
operations. Amazon QuickSight
also introduces templates, which
store the visual configuration
and data schemas required for
a dashboard. You can transfer
templates across accounts
or use them to instantiate
dashboards with the same
visual presentation but different
data. For more information,
see the Amazon QuickSight API
reference.
Amazon QuickSight supports the For more information, see now. November 22, 2019
now function in SPICE (p. 1059)
1081
Amazon QuickSight User Guide
Amazon QuickSight now Seconds are now supported November 22, 2019
supports seconds in in SPICE datasets. Datetime
SPICE (p. 1059) fields are no longer truncated
to minutes. Now you can use
the SS option for the period
parameter in date functions
including addDateTime,
dateDiff, extract, and
truncDate. For more
information, see Date functions.
Amazon QuickSight now has You can now create a collection November 22, 2019
themes (p. 1059) of themes, and apply a
theme to an analysis and
all its dashboards. For more
information, see Using themes in
Amazon QuickSight.
Amazon QuickSight now For tables and pivot tables, November 18, 2019
supports conditional formatting you can set multiple conditions
for tables, pivot tables, and key for fields or supported
performance indicators (KPIs). aggregations, along with format
(p. 1059) options to apply to a target
cell. For KPIs, you can format
the primary value based on
conditions that are applied to
any dimension in the dataset.
The conditional formatting
options now supported are
text color, background color,
and placement of supported
icons. You can use icons from
the provided set, or you can
use Unicode icons instead. For
more information, see Adding
conditional formatting to
visuals.
View history for SPICE ingestion You can now view the ingestion November 7, 2019
on your Amazon QuickSight history for SPICE datasets
datasets (p. 1059) in Amazon QuickSight. See
information like when the latest
ingestion started, how long it
took, and what its status is. For
more information, see View
SPICE ingestion history.
Add your own functionality to Amazon QuickSight enables you November 7, 2019
visuals with Amazon QuickSight to add to the basic functionality
actions (p. 1059) for visuals by creating your own
custom actions for filtering
or opening URLs. For more
information, see Custom actions
in Amazon QuickSight.
1082
Amazon QuickSight User Guide
Amazon QuickSight now You can now use parameters in November 6, 2019
supports dynamic sheet sheet titles to make the context
titles (p. 1059) of a dashboard clearer to the
reader. For more information,
see Formatting a visual.
Amazon QuickSight mobile Get access to insights from your November 5, 2019
iOS update and a new Android data on the fly. Download the
app (p. 1059) updated iOS app or the new
Android app. You can browse,
favorite, and interact with
your dashboards and explore
your data with drilldowns and
filters. You can stay ahead of
the curve by using forecasting.
You can get email alerts when
unexpected changes happen in
your data, and you can share
those insights with colleagues.
For more information, see
Amazon QuickSight mobile.
Amazon QuickSight supports Now you can print a dashboard October 17, 2019
printing (p. 1059) or an analysis. For more
information, see Printing.
Amazon QuickSight now Now, any formatting you apply October 17, 2019
supports visual-level from the field wells is applied
formatting (p. 1059) only to the selected visual.
For more information, see
Formatting a visual.
Transpose tables (p. 1059) In table visuals, you can now October 10, 2019
transpose columns and rows. For
more information, see Tables.
Shared data sources (p. 1059) Share data sources with other October 10, 2019
users and groups. For more
information, see Shared data
sources.
1083
Amazon QuickSight User Guide
SPICE enhancements (p. 1059) SPICE dashboards now October 10, 2019
support new wildcard filters
on dimensions. You can now
filter your data using any of
the available wildcard filters:
'contains', 'starts with', 'end with',
'equals'. Additionally, SPICE
dashboards now support new
string functions (toString and
parseDecimal) and two new
date functions (parseDate
and formatDate). For more
information, see Calculated
fields.
New publishing options for Control your user experience October 10, 2019
dashboards (p. 1059) with more publishing options
for your dashboards. These
options include ability to toggle
the filter pane, tooltips, drill
up/down, and more. For more
information, see Publish a
dashboard.
New median function (p. 1059) Amazon QuickSight supports October 10, 2019
median as a new aggregation.
For more information, see
median.
New aggregations for You can now use Nth percentile, October 10, 2019
fields (p. 1059) median, standard deviation,
and variance in field wells,
filters, and ML Insights. For
more information, see Field
aggregations.
Filter for context (p. 1059) You can now filter text using the October 10, 2019
following wildcard comparison
types: contains, does not
contain, begins with, and ends
with. For more information, see
Text filters.
1084
Amazon QuickSight User Guide
Use the power operator (^) in Amazon QuickSight now September 11, 2019
SPICE (p. 1059) supports using the power
operator (^) on SPICE datasets.
You can use the power operator
with any numeric field, with any
valid exponent. For example,
"revenue ^ 0.5" computes
the square root of the revenue
field. For more information,
see Arithmetic and comparison
operators.
Use string functions in Now you can use string functions September 11, 2019
SPICE (p. 1059) for calculated fields in your
analyses based on SPICE
datasets. For more information,
see Functions by category.
Sort your anomalies (p. 1059) Now you can choose how to September 11, 2019
sort anomalies on the insight
widget and in the anomaly
exploration page. Choosing how
to prioritize anomalies can help
you identify the anomalies that
are the most important to you.
For more information, see Using
ML-powered anomaly detection.
Put 100 million rows into a We changed the SPICE dataset September 11, 2019
SPICE dataset (p. 1059) limit from 25GB to 100 million
rows for Enterprise edition (and
25 million rows for Standard
edition). For more information,
see SPICE data source limits.
1085
Amazon QuickSight User Guide
Filter out the last n time Amazon QuickSight lets you September 5, 2019
periods (p. 1059) exclude a specific number and
type of time periods from a time
range (after) filter. For more
information, see Adding a date
filter.
Amazon QuickSight new feature Mark your favorite dashboards September 5, 2019
to mark favorites (p. 1059) and analyses so you can come
back to them quickly. For more
information, see Using the
Amazon QuickSight start page.
1086
Amazon QuickSight User Guide
Amazon QuickSight adds custom With the Amazon QuickSight August 1, 2019
colors for charts. (p. 1059) enhanced color picker, you can
choose custom colors for charts
where color customization is
supported. The enhanced color
picker also retains the eight
most recently used custom
colors for easy selection across
multiple charts. For more
information, see Changing visual
colors.
Granular access control for using In Amazon QuickSight Enterprise June 14, 2019
AWS services from Amazon edition, you can scope down
QuickSight (p. 1059) your security policies to allow
specific people access to specific
AWS resources. You can attach
and detach IAM policies in the
Amazon QuickSight interface,
simplifying finer control over
who can access your AWS data
sources. For more information,
see Controlling access to AWS
resources.
Tabs for dashboards and Amazon QuickSight now June 11, 2019
analyses (p. 1059) supports multiple sheets inside
of analyses and dashboards.
You can add multiple tabs to
your dashboards, utilize URL
actions and on-screen controls
to simplify navigation, and filter
across all of your sheets. For
more information, see Multiple
sheets.
New visual types (p. 1059) You can now use Amazon June 11, 2019
QuickSight to chart your data on
a customizable gauge and donut
charts. For more information,
see Visual types.
1087
Amazon QuickSight User Guide
New functions (p. 1059) Amazon QuickSight now June 11, 2019
supports functions Variance
and Standard Deviations as
both aggregation and table
calculation. You can create
Sample and Population variants
for both the functions. You
can create these calculations
through the calculations editor
in analysis mode. Functions by
category
Conditional string functions on We added support for ifelse June 11, 2019
SPICE (p. 1059) in analyses that use SPICE. For
more information, see ifelse
Choose period granularity for We added an optional parameter June 11, 2019
date differences (p. 1059) to dateDiff so you can show
differences between dates in
the period you choose (years,
months, and so on). For more
information, see dateDiff.
Duplicate visuals (p. 1059) In Amazon QuickSight, you can May 21, 2019
now duplicate visuals. For more
information, see Duplicating a
visual.
Angled data labels (p. 1059) In Amazon QuickSight, data May 21, 2019
labels that are too long are now
angled by default on vertical bar,
combo, and line charts. For more
information, see Customizing
data labels.
New languages added (p. 1059) Amazon QuickSight is now April 8, 2019
available in 10 languages:
English, German, Spanish,
French, Portuguese, Italian,
Japanese, Korean, Simplified
Chinese, and Traditional Chinese.
For more information, see
Choosing a language in Amazon
QuickSight.
1088
Amazon QuickSight User Guide
Customize how many data You can now format your visuals April 8, 2019
points to display (p. 1059) to display a custom number of
data points or groups before
showing the "other" category.
This feature is available for bar
charts, combo charts, line charts,
pie charts, heat maps, and tree
maps. For more information, see
Customizing a visual.
1089
Amazon QuickSight User Guide
Previous updates
Automatic narratives (p. 1059) Automatic narratives provide key March 14, 2019
insights in everyday language,
embedded contextually in your
dashboard, saving hours on
manual analysis. With automatic
narratives, Amazon QuickSight
interprets the charts and tables
in your dashboard and provides
a number of suggested insights
in natural language. Depending
on the shape and form of your
data, you might get different
suggestions. For example, you
might see what the day-over-
day changes look like, what was
the highest sales date, or what
the growth rate is. Or you might
see what the forecast looks like
for the next seven days. As the
author of the dashboard, you
can customize the computations
and business language for your
needs. You can use automatic
narratives to effectively tell
the story of your data in plain
language. For more information,
see Narrative insights.
Previous updates
The following table describes the important changes in each release of the Amazon QuickSight User
Guide before March 4, 2019.
New features Using custom window functions, you can calculate March 4, 2019
any aggregation for a defined window at the point of
selection. You can define the window interval before
and after any point in time. You can also do calculations
for that window using the sum, average, minimum,
maximum, and count functions. Doing this enables a
moving window aggregation as you progress through
your data points. For more information, see Table
calculation functions (p. 255).
1090
Amazon QuickSight User Guide
Previous updates
New features There are new table calculations available: February 7, 2019
New features Amazon QuickSight supports emailing reports that January 22, 2019
use row-level security, using controls with unbounded
cardinality, and creating datetime parameters with no
default values. For more information, see the following:
New feature We enhanced the join editor to increase usability and January 3, 2019
functionality. You can now add tables from one or more
schemas on the same data source, or add the same table
twice.
New SDK You can embed dashboards and manage users or November 27, 2018
groups by using the Amazon QuickSight SDKs. For
more information, see Developing with Amazon
QuickSight (p. 773).
1091
Amazon QuickSight User Guide
Previous updates
New features You can use groups with row-level security (RLS), and November 20, 2018
you can add cascading controls for parameters. For more
information, see the following:
Function renamed We renamed the percentile function to make it more November 12, 2018
intuitive. Its new name is percentileRank. For more
information, see percentileRank (p. 298).
New features Use a top and bottom filter to show the top or bottom November 1, 2018
n for the field you choose, based on values in another
field. For example, you could choose to show the top five
sales people based on revenue. For more information, see
Adding text filters (p. 332).
New feature Use JSON native data types with parseJson. For more October 30, 2018
information see, parseJson (p. 207).
New features Use date functions to find out what quarter a date is in: September 10, 2018
New features You can sort strings in SPICE datasets. For more August 20, 2018
information on these features, see Sorting visual data in
Amazon QuickSight (p. 571)
New features You can schedule emailed reports, and add data labels to August 15, 2018
your visuals.
1092
Amazon QuickSight User Guide
Previous updates
New features You can create table calculations, using aggregated August 8, 2018
measures to discover how dimensions influence measures
or each other. Also, you can visualize time data at
granularities as low as one minute.
New features You can replace datasets, customize labels, and format June 21, 2018
dimensions that are aggregated with count and count
distinct. Also, new visuals start out smaller in size.
1093
Amazon QuickSight User Guide
Previous updates
New features and a You can upgrade your Amazon QuickSight subscription May 30, 2018
new AWS Region from Standard edition to Enterprise edition. In Enterprise
edition, Amazon QuickSight supports usage-based pricing
for users in the reader role, sharing dashboards with all
users in the reader role, and hourly refresh of datasets.
Amazon QuickSight also supports private connections to
data in a VPC with a private subnet in Enterprise edition.
New feature Amazon QuickSight supports quick sorting from axis May 25, 2018
labels, duplicating datasets, and showing or hiding totals
on tabular reports. Also, you can add custom SQL to
a dataset earlier in the creation workflow. For more
information on these features, see the following sections:
1094
Amazon QuickSight User Guide
Previous updates
New features You can use Amazon QuickSight to connect to Software April 9, 2018
as a Service (SaaS) providers. For more information, see
Software as a service (SaaS) data (p. 68).
New feature You can use Amazon QuickSight with Amazon S3 November 20, 2017
files that are in a different AWS account. For more
information, see Datasets using S3 files in another AWS
account (p. 81).
New visual types You can create visuals using maps. You can also view November 20, 2017
tabular data in a visual. For more information on
preparing geospatial data for use in a visual, see Adding
geospatial data (p. 358). For more information on
creating a geospatial visual, see Creating maps and
geospatial charts (p. 433). For more information on using
tabular reports, see Using tables as visuals (p. 488).
New features Amazon QuickSight can support 1000 columns in November 20, 2017
a dataset. For more information, see Data source
quotas (p. 68). Calculated fields are supported in SPICE
datasets. For more information, see Adding calculated
fields (p. 161). Also, high cardinality values, which
often display as a long tail on a visual, are placed into a
category called other. For more information, see Visual
types in Amazon QuickSight (p. 387).
New feature In Enterprise edition, you can restrict access to a dataset October 20, 2017
by adding row-level security. To learn more, see Using
row-level security (RLS) with user-based rules to restrict
access to a dataset (p. 109).
New visual type You can create visuals using combo charts. To learn more October 20, 2017
about combo charts, see Using combo charts (p. 400).
New features Amazon QuickSight supports creating custom September 25, 2017
aggregations for calculated fields in analyses, custom
date formats, and copies of dashboards. For more
information on aggregating calculated fields, see
Aggregate functions (p. 217). For more information on
using unsupported dates by creating a custom date
format, see Using unsupported or custom dates (p. 367).
For more information on duplicating dashboards, see
Copying an Amazon QuickSight dashboard (p. 739).
New feature You can combine multiple filters using the And/Or August 31, 2017
operators. To learn more about filter groups, see
Adding filter conditions (group filters) with AND and OR
operators (p. 340).
New data source Amazon QuickSight supports Amazon S3 Analytics. August 31, 2017
1095
Amazon QuickSight User Guide
Previous updates
New Features Amazon QuickSight supports importing ZIP files from August 31, 2017
Amazon S3. There is also a new search feature, to simplify
finding analyses, datasets, and dashboards. For more
information on the search feature, see Using the Amazon
QuickSight console (p. 56).
New AWS Regions Amazon QuickSight is now available in Asia Pacific August 8, 2017
(Singapore) and Asia Pacific (Sydney).
New feature Amazon QuickSight supports Snowflake cloud data July 31, 2017
warehouse.
New feature Amazon QuickSight added a new aggregation: July 19, 2017
Count Distinct. To learn more, see Changing field
aggregation (p. 555).
New feature Amazon QuickSight supports Federated Single Sign- May 25, 2017
On (SSO) in Enterprise Edition. To learn more, see Using
identity federation and single sign-on (SSO) with Amazon
QuickSight (p. 992).
New feature Amazon QuickSight supports Amazon Redshift Spectrum. May 25, 2017
To learn more, see Enabling access to Amazon Redshift
Spectrum (p. 955).
New feature Amazon QuickSight supports Federated Single Sign- May 25, 2017
On (SSO) in Standard Edition. To learn more, see Using
identity federation and single sign-on (SSO) with Amazon
QuickSight (p. 992).
New feature Amazon QuickSight supports direct connections to May 25, 2017
Teradata 14.0 and later.
New feature Amazon QuickSight added relative date filters for May 25, 2017
datasets and visuals. To learn more, see Adding date
filters (p. 336).
New feature Amazon QuickSight supports connecting to Apache Spark May 3, 2017
and Presto. To learn more, see Creating a data source
using Apache Spark (p. 87) and Creating a data source
using Presto (p. 88).
New feature Amazon QuickSight supports operational logging with April 28, 2017
AWS CloudTrail. To learn more, see Logging operations
with AWS CloudTrail (p. 1030).
1096
Amazon QuickSight User Guide
Previous updates
New feature Amazon QuickSight is available in US East (Ohio). To learn April 11, 2017
more about AWS Regions, see AWS Regions, websites, IP
address ranges, and endpoints (p. 915).
New feature • You can use the AD Connector with Amazon April 6, 2017
QuickSight. To learn more about managing Enterprise
users, see Managing user access inside Amazon
QuickSight (p. 1010).
• You can add key performance indicators (KPIs) to your
visualizations. To learn more, see Using KPIs (p. 421).
• You can import .xlsx files with headers and footers,
comments, formatting, filter header, sort, frozen
panel/header, hidden columns, groups, and formulas /
references. You can also limit your import to a specific
range. To learn more about importing ranges, see
Choosing file upload settings (p. 148).
New feature You can now export to a comma-separated value (CSV) March 21, 2017
format file using Amazon QuickSight. To learn more, see
Exporting data from visuals (p. 546).
New feature You can now schedule data refreshes for SPICE datasets. February 14, 2017
To learn more, see Refreshing SPICE data (p. 133).
New feature You can now connect to Amazon Athena databases and December 22, 2016
use them as data sources in Amazon QuickSight. To
learn more, see Creating a dataset using Amazon Athena
data (p. 76).
New edition Amazon QuickSight now offers an Enterprise edition as December 15, 2016
well as a Standard edition. Both editions offer a full set
of features for creating and sharing data visualizations,
and Enterprise edition additionally offers encryption at
rest and Active Directory integration. When you choose
to use Enterprise edition, you select a Microsoft Active
Directory directory in AWS Directory Service and use that
active directory to identify and manage your Amazon
QuickSight users and administrators. To learn more, see
Different editions of Amazon QuickSight (p. 913).
New guide This is the first release of Amazon QuickSight User Guide. November 15, 2016
1097
Amazon QuickSight User Guide
Attributions
Following, you can find out about attributions and third-party licenses for material used in Amazon
QuickSight documentation.
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES.
DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP.
CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS
MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS
DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and
Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of
an original work of authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing
to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and
without fear of later claims of infringement build upon, modify, incorporate in other works, reuse
and redistribute as freely as possible in any form whatsoever and for any purposes, including without
limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a
free culture and the further production of creative, cultural and scientific works, or to gain reputation or
greater distribution for their Work in part through the use and efforts of others.
For these and/or other purposes and motivations, and without any expectation of additional
consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent
that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0
to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and
Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and
related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but
are not limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in
paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data in a Work;
1098
Amazon QuickSight User Guide
vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the
Council of 11 March 1996 on the legal protection of databases, and under any national implementation
thereof, including any amended or successor version of such directive); and
vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or
treaty, and any national implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer
hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders
all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now
known or unknown (including existing as well as future claims and causes of action), in the Work (i) in
all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including
future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for
any purpose whatsoever, including without limitation commercial, advertising or promotional purposes
(the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to
the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject
to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the
quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or
ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted
taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non
sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by
applicable law or treaty (including future time extensions), (iii) in any current or future medium and for
any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial,
advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date
CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally
invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate
the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise
any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims
and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of
Purpose.
a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or
otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning
the Work, express, implied, statutory or otherwise, including without limitation warranties of title,
merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other
defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest
extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or
any use thereof, including without limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other
rights required for any use of the Work.
d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and
has no duty or obligation with respect to this CC0 or use of the Work.
-----
1099
Amazon QuickSight User Guide
This map database contains open data from government and other sources. Consider including the
following copyright statements when using the data.
Europe
Estonia © Maaamet
Finland © Maanmittauslaitos
1100
Amazon QuickSight User Guide
Romania © CNGCFT (National Center of Geodesie, Cartography, Fotogrametry and Remote Sensing)
Sweden © Lantmäteriet
United Kingdom: Contains Ordnance Survey data © Crown copyright and database right [2012]
Netherlands: Kadaster
Switzerland: swisstopo
Americas
Canada: © Department of Natural Resources Canada. All rights reserved., Statistics Canada, and BC Stats
Brazil: IBGE
Mexico: INEGI
Chile: Global Map of Chile © International Steering Committee for Global Mapping / Instituto Geografico
Militar de Chile
Asia
1101
Amazon QuickSight User Guide
South Africa: Global Map of the Republic of South Africa © ISCGM/State Copyright, Department of Rural
Development and Land Reform, Chief Directorate of National Geo-spatial Information, Website: http://
www.ngi.gov.za/
Ordnance Survey
Contains Royal Mail data © Royal Mail copyright and Database right 2016
Contains National Statistics data © Crown copyright and database right 2016
Attribution 2.0
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES.
DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE
COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO
WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES
RESULTING FROM ITS USE.
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS
PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER
APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR
COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND
BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN
CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which
the Work in its entirety in unmodified form, along with a number of other contributions, constituting
separate and independent works in themselves, are assembled into a collective whole. A work that
constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the
purposes of this License.
b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works,
such as a translation, musical arrangement, dramatization, fictionalization, motion picture version,
sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may
be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be
considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work
is a musical composition or sound recording, the synchronization of the Work in timed-relation with a
moving image ("synching") will be considered a Derivative Work for the purpose of this License.
c. "Licensor" means the individual or entity that offers the Work under the terms of this License.
d. "Original Author" means the individual or entity who created the Work.
e. "Work" means the copyrightable work of authorship offered under the terms of this License.
1102
Amazon QuickSight User Guide
f. "You" means an individual or entity exercising rights under this License who has not previously violated
the terms of this License with respect to the Work, or who has received express permission from the
Licensor to exercise rights under this License despite a previous violation.
2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from
fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law
or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a
worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to
exercise the rights in the Work as stated below:
a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce
the Work as incorporated in the Collective Works;
c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by
means of a digital audio transmission the Work including as incorporated in Collective Works;
d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by
means of a digital audio transmission Derivative Works.
i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether
individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public
performance or public digital performance (e.g. webcast) of the Work.
ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether
individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any
phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license
created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound
recording, Licensor waives the exclusive right to collect, whether individually or via a performance-
rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the
Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the
equivalent in other jurisdictions).
The above rights may be exercised in all media and formats whether now known or hereafter devised.
The above rights include the right to make such modifications as are technically necessary to exercise the
rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.
4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the
following restrictions:
a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only
under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier
for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly
perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or
restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not
sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of
warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the
Work with any technological measures that control access or use of the Work in a manner inconsistent
with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective
Work, but this does not require the Collective Work apart from the Work itself to be made subject to
the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to
the extent practicable, remove from the Collective Work any reference to such Licensor or the Original
Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the
1103
Amazon QuickSight User Guide
extent practicable, remove from the Derivative Work any reference to such Licensor or the Original
Author, as requested.
b. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any
Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and
give the Original Author credit reasonable to the medium or means You are utilizing by conveying the
name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied;
to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies
to be associated with the Work, unless such URI does not refer to the copyright notice or licensing
information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work
in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on
original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided,
however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear
where any other comparable authorship credit appears and in a manner at least as prominent as such
other comparable authorship credit.
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE
WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING
THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT,
OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF
ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
7. Termination
a. This License and the rights granted hereunder will terminate automatically upon any breach by You of
the terms of this License. Individuals or entities who have received Derivative Works or Collective Works
from You under this License, however, will not have their licenses terminated provided such individuals
or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any
termination of this License.
b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of
the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release
the Work under different license terms or to stop distributing the Work at any time; provided, however
that any such election will not serve to withdraw this License (or any other license that has been, or is
required to be, granted under the terms of this License), and this License will continue in full force and
effect unless terminated as stated above.
8. Miscellaneous
a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor
offers to the recipient a license to the Work on the same terms and conditions as the license granted to
You under this License.
b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the
recipient a license to the original Work on the same terms and conditions as the license granted to You
under this License.
c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the
validity or enforceability of the remainder of the terms of this License, and without further action by the
parties to this agreement, such provision shall be reformed to the minimum extent necessary to make
such provision valid and enforceable.
1104
Amazon QuickSight User Guide
d. No term or provision of this License shall be deemed waived and no breach consented to unless such
waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
e. This License constitutes the entire agreement between the parties with respect to the Work licensed
here. There are no understandings, agreements or representations with respect to the Work not specified
here. Licensor shall not be bound by any additional provisions that may appear in any communication
from You. This License may not be modified without the mutual written agreement of the Licensor and
You.
-----
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS
PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER
APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR
COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND
BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A
CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR
ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such
as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or
artistic work, or phonogram or performance and includes cinematographic adaptations or any other
form in which the Work may be recast, transformed, or adapted including in any form recognizably
derived from the original, except that a work that constitutes a Collection will not be considered an
Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical
work, performance or phonogram, the synchronization of the Work in timed-relation with a moving
image ("synching") will be considered an Adaptation for the purpose of this License.
"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or
performances, phonograms or broadcasts, or other works or subject matter other than works listed
in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute
intellectual creations, in which the Work is included in its entirety in unmodified form along with
one or more other contributions, each constituting separate and independent works in themselves,
which together are assembled into a collective whole. A work that constitutes a Collection will not be
considered an Adaptation (as defined above) for the purposes of this License.
"Distribute" means to make available to the public the original and copies of the Work or Adaptation, as
appropriate, through sale or other transfer of ownership.
"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of
this License.
1105
Amazon QuickSight User Guide
"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity
or entities who created the Work or if no individual or entity can be identified, the publisher; and in
addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who
act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions
of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes
the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that
transmits the broadcast.
"Work" means the literary and/or artistic work offered under the terms of this License including
without limitation any production in the literary, scientific and artistic domain, whatever may be the
mode or form of its expression including digital form, such as a book, pamphlet and other writing;
a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work;
a choreographic work or entertainment in dumb show; a musical composition with or without
words; a cinematographic work to which are assimilated works expressed by a process analogous to
cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a
photographic work to which are assimilated works expressed by a process analogous to photography; a
work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography,
topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to
the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer
to the extent it is not otherwise considered a literary or artistic work.
"You" means an individual or entity exercising rights under this License who has not previously violated
the terms of this License with respect to the Work, or who has received express permission from the
Licensor to exercise rights under this License despite a previous violation.
"Publicly Perform" means to perform public recitations of the Work and to communicate to the public
those public recitations, by any means or process, including by wire or wireless means or public digital
performances; to make available to the public Works in such a way that members of the public may
access these Works from a place and at a place individually chosen by them; to perform the Work to the
public by any means or process and the communication to the public of the performances of the Work,
including by public digital performance; to broadcast and rebroadcast the Work by any means including
signs, sounds or images.
"Reproduce" means to make copies of the Work by any means including without limitation by sound or
visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a
protected performance or phonogram in digital form or other electronic medium.
2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from
copyright or rights arising from limitations or exceptions that are provided for in connection with the
copyright protection under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a
worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to
exercise the rights in the Work as stated below:
to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the
Work as incorporated in the Collections;
to create and Reproduce Adaptations provided that any such Adaptation, including any translation in
any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were
made to the original Work. For example, a translation could be marked "The original work was translated
from English to Spanish," or a modification could indicate "The original work has been modified.";
to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
1106
Amazon QuickSight User Guide
Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties
through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the
exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties
through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive
right to collect such royalties for any exercise by You of the rights granted under this License; and,
Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or,
in the event that the Licensor is a member of a collecting society that administers voluntary licensing
schemes, via that society, from any exercise by You of the rights granted under this License.
The above rights may be exercised in all media and formats whether now known or hereafter devised.
The above rights include the right to make such modifications as are technically necessary to exercise the
rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are
hereby reserved.
4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the
following restrictions:
You may Distribute or Publicly Perform the Work only under the terms of this License. You must include
a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You
Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the
terms of this License or the ability of the recipient of the Work to exercise the rights granted to that
recipient under the terms of the License. You may not sublicense the Work. You must keep intact all
notices that refer to this License and to the disclaimer of warranties with every copy of the Work You
Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose
any effective technological measures on the Work that restrict the ability of a recipient of the Work from
You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a)
applies to the Work as incorporated in a Collection, but this does not require the Collection apart from
the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice
from any Licensor You must, to the extent practicable, remove from the Collection any credit as required
by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to
the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested.
If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a
request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and
provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or
pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another
party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties")
in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or
parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that
Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice
or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation,
a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by
Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this
Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a
Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of
the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent
as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit
required by this Section for the purpose of attribution in the manner set out above and, by exercising
Your rights under this License, You may not implicitly or explicitly assert or imply any connection with,
sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate,
1107
Amazon QuickSight User Guide
of You or Your use of the Work, without the separate, express prior written permission of the Original
Author, Licensor and/or Attribution Parties.
Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable
law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any
Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in
relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor
agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section
3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation,
modification or other derogatory action prejudicial to the Original Author's honor and reputation, the
Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the
applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License
(right to make Adaptations) but not otherwise.
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE
WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING
THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT,
OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF
ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
7. Termination
This License and the rights granted hereunder will terminate automatically upon any breach by You of
the terms of this License. Individuals or entities who have received Adaptations or Collections from You
under this License, however, will not have their licenses terminated provided such individuals or entities
remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of
this License.
Subject to the above terms and conditions, the license granted here is perpetual (for the duration of
the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release
the Work under different license terms or to stop distributing the Work at any time; provided, however
that any such election will not serve to withdraw this License (or any other license that has been, or is
required to be, granted under the terms of this License), and this License will continue in full force and
effect unless terminated as stated above.
8. Miscellaneous
Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient
a license to the Work on the same terms and conditions as the license granted to You under this License.
Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to
the original Work on the same terms and conditions as the license granted to You under this License.
If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the
validity or enforceability of the remainder of the terms of this License, and without further action by the
1108
Amazon QuickSight User Guide
parties to this agreement, such provision shall be reformed to the minimum extent necessary to make
such provision valid and enforceable.
No term or provision of this License shall be deemed waived and no breach consented to unless such
waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
This License constitutes the entire agreement between the parties with respect to the Work licensed
here. There are no understandings, agreements or representations with respect to the Work not specified
here. Licensor shall not be bound by any additional provisions that may appear in any communication
from You. This License may not be modified without the mutual written agreement of the Licensor and
You.
The rights granted under, and the subject matter referenced, in this License were drafted utilizing the
terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended
on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the
WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as
revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in
which the License terms are sought to be enforced according to the corresponding provisions of the
implementation of those treaty provisions in the applicable national law. If the standard suite of rights
granted under applicable copyright law includes additional rights not granted under this License, such
additional rights are deemed to be included in the License; this License is not intended to restrict the
license of any rights under applicable law.
-----
This work is licensed under a Creative Commons Attribution 4.0 License, see http://
creativecommons.org/licenses/by/4.0/
The Data is provided "as is" without warranty or any representation of accuracy, timeliness or
completeness.
The basic source data is from US TIGER/Line Census Data which is public domain (Q10). This site also
makes use of data scraped from the flickr api.
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and
conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To
the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in
consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights
in consideration of benefits the Licensor receives from making the Licensed Material available under
these terms and conditions.
Section 1 – Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or
based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged,
transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar
Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical
work, performance, or sound recording, Adapted Material is always produced where the Licensed
Material is synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your
contributions to Adapted Material in accordance with the terms and conditions of this Public License.
1109
Amazon QuickSight User Guide
c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright
including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights,
without regard to how the rights are labeled or categorized. For purposes of this Public License, the
rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. Effective Technological Measures means those measures that, in the absence of proper authority, may
not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty
adopted on December 20, 1996, and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to
Copyright and Similar Rights that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor
applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public
License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed
Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
i. Share means to provide material to the public by any means or process that requires permission under
the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination,
communication, or importation, and to make material available to the public including in ways that
members of the public may access the material from a place and at a time individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of
the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as
amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a
corresponding meaning.
Section 2 – Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide,
royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the
Licensed Material to:
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply
to Your use, this Public License does not apply, and You do not need to comply with its terms and
conditions.
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the
Licensed Rights in all media and formats whether now known or hereafter created, and to make
technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications necessary to exercise the Licensed Rights,
including technical modifications necessary to circumvent Effective Technological Measures. For purposes
of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces
Adapted Material.
5. Downstream recipients.
1110
Amazon QuickSight User Guide
A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this
Public License.
B. No downstream restrictions. You may not offer or impose any additional or different terms or
conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so
restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/
or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You
to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of
the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable
statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to
collect such royalties.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive
attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications;
and
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI
or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium,
means, and context in which You Share the Licensed Material. For example, it may be reasonable
to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to
the extent reasonably practicable.
1111
Amazon QuickSight User Guide
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent
recipients of the Adapted Material from complying with this Public License.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed
Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share
all or a substantial portion of the contents of the database;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui
Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its
individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the
contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this
Public License where the Licensed Rights include other Copyright and Similar Rights.
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers
the Licensed Material as-is and as-available, and makes no representations or warranties of any kind
concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without
limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement,
absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known
or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not
apply to You.
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including,
without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential,
punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use
of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs,
expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may
not apply to You.
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner
that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However,
if You fail to comply with this Public License, then Your rights under this Public License terminate
automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery
of the violation; or
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek
remedies for Your violations of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or
conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate
this Public License.
1112
Amazon QuickSight User Guide
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by
You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein
are separate from and independent of the terms and conditions of this Public License.
Section 8 – Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit,
restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without
permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be
automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot
be reformed, it shall be severed from this Public License without affecting the enforceability of the
remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless
expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any
privileges and immunities that apply to the Licensor or You, including from the legal processes of any
jurisdiction or authority.
-----
MIT License.
The above copyright notice and this permission notice shall be included in
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1113
Amazon QuickSight User Guide
THE SOFTWARE.
-----
This license governs use of the accompanying software. If you use the software, you accept this license. If
you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here
as under U.S. copyright law.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or
any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
in the software or derivative works of the contribution in the software.
1114
Amazon QuickSight User Guide
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or
trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the
software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and
attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this
license by including a complete copy of this license with your distribution. If you distribute any portion of
the software in compiled or object code form, you may only do so under a license that complies with this
license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express
warranties, guarantees or conditions. You may have additional consumer rights under your local laws
which this license cannot change. To the extent permitted under your local laws, the contributors exclude
the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
-----
We hereby release all of these files into the Public Domain, with no
with the web site or company hold no liability for anything that
happens when you use the data, including (but not limited to) computer
-----
Made with Natural Earth. Free vector and raster map data @ naturalearthdata.com.
All versions of Natural Earth raster + vector map data found on this
website are in the public domain. You may use the maps in any manner,
1115
Amazon QuickSight User Guide
and offset printing. The primary authors, Tom Patterson and Nathaniel
Vaughn Kelso, and all other contributors renounce all financial claim
to the maps and invites you to use them for personal, educational, and
commercial purposes.
unnecessary.
1116