Set custom dimensions in Google Data Studio

1. Create a dimension based on auto-exclusive groups of data and set the conditions.

For example, you could visualize visits from paid and non-paid traffic. Based on this example, your conditions are the paid channels in Google Analytics: Display Paid Search Affiliates Paid Social (custom). Non-paid channels are the rest.

2. In the main menu, go to Resource > Manage added data sources > Edit > + Add a Field to make the dimension to be available throughout the dataset.

If you need the dimension only at the table or graph level, then click + Create New Field at the end of the Fields picker. Or, in the selected dimension area, click + Add dimension.

3. Use the function CASE to define it based on logic.

For the example of paid and non-paid ads, this can be written in at least two ways, with or without regular expressions: CASE WHEN Default Channel Grouping in ('Paid Social','Paid Search','Display','Affiliates') THEN 'Paid' ELSE 'Not Paid' END OR CASE WHEN REGEXP_MATCH (Default Channel Grouping,  '(Paid Social|Paid Search|Display|Affiliates)') THEN 'Paid' ELSE 'Not Paid' END

4. Use your new Paid & Non-Paid Traffic dimension to create filters, tables, and segments.