[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Filter by email address\n\nReports 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.\"\n\nEmail filter examples\n---------------------\n\nThese examples use a data source that is based on Google Sheets to show how email filtering works.\n\n### Example 1\n\nIn this example, the data source is not filtered. All the data appears in the Looker Studio report.\n\n### Example 2\n\nIn 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.\n\n### Example 3\n\nWhen Michelle signs in and views the same report, she sees only her data, as shown in example 3.\n\n### Example 4\n\nIn this final example, Bob signs in and views the report. There is no data for his email address (bob@example-pet-store.com), so the Looker Studio chart is empty.\n\nFor viewers\n-----------\n\nWhen 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.\n| **Warning:** You must be signed in to a Google Account to view a report that uses email filtering.\n\n### If you consent\n\nAll 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.\n\n### If you don't consent\n\nAll 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.\n\nFor editors\n-----------\n\nFiltering 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.\n\nTo 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.\n\nFor 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.\n\nCreate an email filter\n----------------------\n\n1. [Edit your data source](/looker/docs/studio/edit-a-data-source).\n2. Click **FILTER BY EMAIL**.\n3. Check the **Filter data by viewer email** checkbox.\n4. Select the field in your data source that contains viewer email addresses.\n5. To return to the data source editor, click **ALL FIELDS**.\n\nStop filtering by email\n-----------------------\n\n1. [Edit your data source](/looker/docs/studio/edit-a-data-source).\n2. Click **FILTER BY EMAIL**.\n3. Clear the **Filter data by viewer email** checkbox.\n\nFilter by email in BigQuery\n---------------------------\n\nIn a BigQuery data source, you can filter by email address using the `@DS_USER_EMAIL` parameter in a custom query. For example:\n\n`Select * from Sales WHERE sales-rep-email =``@DS_USER_EMAIL``;`\n\nThis provides additional flexibility in your filters. Learn more about [BigQuery parameters](/looker/docs/studio/connect-to-google-bigquery).\n\nFilter by email in scheduled report delivery\n--------------------------------------------\n\nYou 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.\n\nLearn more about [scheduled automatic report delivery](/looker/docs/studio/schedule-automatic-report-delivery).\n\nRevoke access to your email\n---------------------------\n\nTo stop providing your email address to reports that request it, you can revoke your consent by following these steps:\n\n1. [Sign in to Looker Studio.](https://lookerstudio.google.com)\n2. In the upper right, click **Settings** .\n3. On the left, select **Revoke Consent** . Next, under **Revoke user email,** click **Revoke all**.\n\nAfter you revoke your consent, you'll need to grant it again before you can see personalized data in reports.\n\nLimits of filter by email\n-------------------------\n\n- Your underlying dataset must contain the full email address of the viewers who will be accessing your report.\n- 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 \"Bob@example-pet-store.com\" but your data contains \"bob@example-pet-store.com\", the filter won't match (and Bob won't see his data).\n- Viewers must sign in to view a report with email filtering applied, even if the report is shared publicly.\n- Viewers must consent to providing their email address.\n\nRelated resources\n-----------------\n\n[Use data blending to filter by multiple email addresses per row](/looker/docs/studio/filter-by-multiple-email-addresses-per-row)."]]