Reports can request permission to access a report viewer's email address in order to personalize the data shown to that viewer. When users consent to sharing their email address with that report, the underlying data source can use that to return only the data associated with that email address. This is known as "row-level data security."
In this article:Email filter examples
These examples use a data source that is based on Google Sheets to show how email filtering works.
Example 1
In this example, the data source is not filtered. All the data appears in the Looker Studio report.
Example 2
In this example, the data source has an email filter. Rick is signed in, so only his data appears when he views a report that is based on the filtered data source.
Example 3
When Michelle signs in and views the same report, she sees only her data, as shown in example 3.
Example 4
In this final example, Bob signs in and views the report. There is no data for his email address ([email protected]), so the Looker Studio chart is empty.
For viewers
When you view a report that includes a data source that uses row-level data security, all components that are based on that data source will ask you to allow them to use your email address.
You must be signed in to a Google account to view a report that uses email filtering.
If you consent
All components in the report that are based on the data source that is requesting your email address will be able to show data that is relevant to you. You can revoke your consent at any time.
If you don't consent
All components in the report that are based on the data source that is requesting your email address will show only the consent request. They won't show any data.
For editors
Filtering by email is available for any kind of data source. If your data is in BigQuery, you can also use the email parameter in a custom query to filter by email address.
To use filtering by email address, your underlying data must contain a field that stores the email address for your report viewers. You can then create an email filter in the data source that uses that field. Looker Studio can then return the rows of data that contain the email address of the signed-in user.
For example, say you have a spreadsheet that records the performance of your company's sales representatives. Each row in the spreadsheet contains an email address for one of the sales reps. You can turn on email filtering in the data source that is connected to that spreadsheet. When a signed-in viewer views a report that is based on that data source for the first time, they'll be prompted to give their consent to let that report access their email address. The data source can then query for records that contain that address. Only matching records are shown, ensuring that the viewer only sees the data they're meant to see.
Create an email filter
- Edit your data source.
- In the upper left, click FILTER BY EMAIL.
- Turn on Filter data by viewer email.
- Select the field in your data source that contains viewer email addresses.
- To return to the data source editor, click ALL FIELDS.
Stop filtering by email
- Edit your data source.
- In the upper left, click FILTER BY EMAIL.
- Turn off Filter data by viewer email.
Filter by email in BigQuery
In a BigQuery data source, you can filter by email address using the @DS_USER_EMAIL
parameter in a custom query. For example:
Select * from Sales WHERE sales-rep-email = @DS_USER_EMAIL;
This provides additional flexibility in your filters. Learn more about BigQuery parameters.
Filter by email in scheduled report delivery
You can include email address filters in reports that get delivered by scheduled email and Google Chat. When one or more of the data sources in that report have email filtering enabled, you'll see the Filter the delivered report data by recipient’s email address option when you're creating or editing your schedule.
Learn more about scheduled automatic report delivery.
Revoke access to your email
To stop providing your email address to reports that request it, you can revoke your consent by following these steps:
- Sign in to Looker Studio.
- In the upper right, click Settings .
- On the left, select Revoke Consent. Next, under Revoke user email, click Revoke all.
After you revoke your consent, you'll need to grant it again before you can see personalized data in reports.
Limits of filter by email
- Your underlying data set must contain the full email address of the viewers who will be accessing your report.
- The case of the email addresses in your data must match the case in the users' accounts. For example, if a user's account belongs to "[email protected]" but your data contains "[email protected]", the filter won't match (and Bob won't see his data).
- Viewers must sign in to view a report with email filtering applied, even if the report is shared publicly.
- Viewers must consent to providing their email address.
Related resources
Use data blending to filter by multiple email addresses per row.