# View: label_country_level_contribution_to_change

**View Name:** label_country_level_contribution_to_change
**Table Source:** `Derived Table (Custom SQL)`
**File Path:** `views/label_contribution_to_change/label_country_level_contribution_to_change.view.lkml`

## Overview

- **File Size:** 6618 bytes
- **Lines of Code:** 199
- **Dimensions:** 9
- **Measures:** 3
- **Dimension Groups:** 0
- **Filters:** 3

## Dimensions

| Name | Type |
|------|------|
| `primary_key` | string |
| `label_id` | number |
| `label_name` | string |
| `country` | string |
| `period_one` | string |
| `period_two` | string |
| `total_change` | number |
| `percent_change` | number |
| `contribution_rank` | number |

## Measures

| Name | Type |
|------|------|
| `period_one_streams` | sum |
| `period_two_streams` | sum |
| `contribution_to_change` | sum |

## Filters

- `artist`
- `release_name`
- `track_name`

## Derived Table

```sql
sql:
    with country_level_change as (
    select distinct
      label_id,
      label_name,
      country,
      period_one,
      period_two,
      sum(period_one_streams) as period_one_streams,
      sum(period_two_streams) as period_two_streams,
      sum(period_two_streams) - sum(period_one_streams) as total_change,
      div0((sum(period_two_streams) - sum(period_one_streams)),sum(period_one_streams)) as percent_change
    from {% if period._parameter_value == "'year'" %
```

