Merged PR 4528: Adds number format

# Description

Adds number format for display purposes

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Adds number format

Related work items: #27609
This commit is contained in:
Oriol Roqué Paniagua 2025-02-27 13:18:03 +00:00
parent 42701b4d2c
commit cfc17a5d3a
4 changed files with 45 additions and 0 deletions

View file

@ -2010,6 +2010,19 @@ models:
data_tests:
- not_null
- name: number_format
data_type: string
description: |
Number format to display the metric in the report.
data_tests:
- not_null
- accepted_values:
values:
- INTEGER
- PERCENTAGE_2_DECIMALS
- CURRENCY_GBP_INTEGER
- CURRENCY_GBP_1_DECIMAL
- name: is_latest_date
data_type: integer
description: |

View file

@ -38,6 +38,7 @@ select
m.dimension_value as dimension_value,
m.id_metric as id_metric,
m.metric_name as metric_name,
m.number_format as number_format,
m.current_month_mtd as current_month_mtd,
m.previous_month_eom as previous_month_eom,
m.previous_year_mtd as previous_year_mtd,