# Google Analytics Data V1beta API - Class Google::Analytics::Data::V1beta::FilterExpression (v0.4.3)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.4.3 (latest)](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpression)
- [0.4.2](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/0.4.2/Google-Analytics-Data-V1beta-FilterExpression)
Reference documentation and code samples for the Google Analytics Data V1beta API class Google::Analytics::Data::V1beta::FilterExpression.

To express dimension or metric filters.
The fields in the same FilterExpression need to be either all dimensions or
all metrics.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #and_group

    def and_group() -> ::Google::Analytics::Data::V1beta::FilterExpressionList

**Returns**

- ([::Google::Analytics::Data::V1beta::FilterExpressionList](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpressionList)) --- The FilterExpressions in and_group have an AND relationship.

### #and_group=

    def and_group=(value) -> ::Google::Analytics::Data::V1beta::FilterExpressionList

**Parameter**

- **value** ([::Google::Analytics::Data::V1beta::FilterExpressionList](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpressionList)) --- The FilterExpressions in and_group have an AND relationship.
**Returns**

- ([::Google::Analytics::Data::V1beta::FilterExpressionList](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpressionList)) --- The FilterExpressions in and_group have an AND relationship.

### #filter

    def filter() -> ::Google::Analytics::Data::V1beta::Filter

**Returns**

- ([::Google::Analytics::Data::V1beta::Filter](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-Filter)) --- A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.

### #filter=

    def filter=(value) -> ::Google::Analytics::Data::V1beta::Filter

**Parameter**

- **value** ([::Google::Analytics::Data::V1beta::Filter](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-Filter)) --- A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
**Returns**

- ([::Google::Analytics::Data::V1beta::Filter](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-Filter)) --- A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.

### #not_expression

    def not_expression() -> ::Google::Analytics::Data::V1beta::FilterExpression

**Returns**

- ([::Google::Analytics::Data::V1beta::FilterExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpression)) --- The FilterExpression is NOT of not_expression.

### #not_expression=

    def not_expression=(value) -> ::Google::Analytics::Data::V1beta::FilterExpression

**Parameter**

- **value** ([::Google::Analytics::Data::V1beta::FilterExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpression)) --- The FilterExpression is NOT of not_expression.
**Returns**

- ([::Google::Analytics::Data::V1beta::FilterExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpression)) --- The FilterExpression is NOT of not_expression.

### #or_group

    def or_group() -> ::Google::Analytics::Data::V1beta::FilterExpressionList

**Returns**

- ([::Google::Analytics::Data::V1beta::FilterExpressionList](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpressionList)) --- The FilterExpressions in or_group have an OR relationship.

### #or_group=

    def or_group=(value) -> ::Google::Analytics::Data::V1beta::FilterExpressionList

**Parameter**

- **value** ([::Google::Analytics::Data::V1beta::FilterExpressionList](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpressionList)) --- The FilterExpressions in or_group have an OR relationship.
**Returns**

- ([::Google::Analytics::Data::V1beta::FilterExpressionList](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-FilterExpressionList)) --- The FilterExpressions in or_group have an OR relationship.