# View: dt_project_moments_som_cluster_groups

**View Name:** dt_project_moments_som_cluster_groups
**Table Source:** `Derived from: Dev_Engineering, Dev_Engineering.Eimpara, Eimpara.Moments_Clusters_Table_Apr_Sept_22_Negative_Sign_V4, Eimpara.Moments_Clusters_Table_Apr_Sept_22_Positive_Sign_V4`
**File Path:** `dt_project_moments_som_cluster_groups.view.lkml`

## Overview

- **File Size:** 3443 bytes
- **Lines of Code:** 115
- **Dimensions:** 7
- **Measures:** 1
- **Dimension Groups:** 0
- **Filters:** 0

## Dimensions

| Name | Type |
|------|------|
| `isrc` | string |
| `pred_type` | string |
| `nrmse` | number |
| `sum_forecast_errors` | number |
| `sign` | string |
| `som_cluster_label` | string |
| `trending_group` | string |

## Measures

| Name | Type |
|------|------|
| `count_isrc` | count_distinct |

## Derived Table

```sql
sql:
    select
*,
case
    when som_cluster = 'SOM Cluster 1' then 'A'
    when som_cluster = 'SOM Cluster 2' then 'B'
    when som_cluster = 'SOM Cluster 3' then 'C'
    when som_cluster = 'SOM Cluster 4' then 'D'
    when som_cluster = 'SOM Cluster 5' then 'E'
    when som_cluster = 'SOM Cluster 6' then 'F'
    when som_cluster = 'SOM Cluster 7' then 'G'
    when som_cluster = 'SOM Cluster 8' then 'H'
else null
end as Trending_Group
from DEV_ENGINEERING.EIMPARA.MOMENTS_CLUSTERS_TABLE_APR_SEPT_22_POSITIVE_SIGN_V4

union all

select
*,
case
    when som_cluster = 'SOM Cluster 2' then 'I'
    when som_cluster = 'SOM Cluster 3' then 'J'
    when som_cluster = 'SOM Cluster 4' then 'K'
    when som_cluster = 'SOM Cluster 5' then 'L'
    when som_cluster = 'SOM Cluster 6' then 'M'
    when som_cluster = 'SOM Cluster 7' then 'N'
    when som_cluster = 'SOM Cluster 8' then 'O'
    when som_cluster = 'SOM Cluster 9' then 'P'
    when som_cluster = 'SOM Cluster 10' then 'Q'
    when som_cluster = 'SOM Cluster 11' then 'R'
    when som_cluster = 'SOM Cluster 12' then 'S'
    when som_cluster = 'SOM Cluster 13' then 'T'
    when som_cluster = 'SOM Cluster 14' then 'U'
    when som_cluster = 'SOM Cluster 15' then 'V'
    when som_cluster = 'SOM Cluster 16' then 'W'

else null
end as Trending_Group
from DEV_ENGINEERING.EIMPARA.MOMENTS_CLUSTERS_TABLE_APR_SEPT_22_NEGATIVE_SIGN_V4;;
```

