Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions gcp_billing_export.view.lkml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,18 @@ view: gcp_billing_export {
type: sum
sql: ${TABLE}.cost ;;
value_format_name: decimal_2
html: {% if currency._value == 'GBP' %}
html: {% case currency._value %}
{% when 'GBP' %}
<a href="{{ link }}"> £{{ rendered_value }}</a>
{% elsif currency == 'USD' %}
{% when 'USD' %}
<a href="{{ link }}"> ${{ rendered_value }}</a>
{% elsif currency == 'EUR' %}
{% when 'EUR' %}
<a href="{{ link }}"> €{{ rendered_value }}</a>
{% when 'JPY' %}
<a href="{{ link }}"> ¥{{ rendered_value }}</a>
{% else %}
<a href="{{ link }}"> {{ rendered_value }} {{ currency._value }}</a>
{% endif %} ;;
{% endcase %} ;;
drill_fields: [gcp_billing_export_project.name, gcp_billing_export_service.description, sku_category, gcp_billing_export_sku.description, gcp_billing_export_usage.unit, gcp_billing_export_usage.total_usage, total_cost]
}

Expand All @@ -82,15 +85,18 @@ view: gcp_billing_export {
type: sum
sql: ${gcp_billing_export_credits.credit_amount} ;;
value_format_name: decimal_2
html: {% if currency._value == 'GBP' %}
html: {% case currency._value %}
{% when 'GBP' %}
<a href="{{ link }}"> £{{ rendered_value }}</a>
{% elsif currency == 'USD' %}
{% when 'USD' %}
<a href="{{ link }}"> ${{ rendered_value }}</a>
{% elsif currency == 'EUR' %}
{% when 'EUR' %}
<a href="{{ link }}"> €{{ rendered_value }}</a>
{% when 'JPY' %}
<a href="{{ link }}"> ¥{{ rendered_value }}</a>
{% else %}
<a href="{{ link }}"> {{ rendered_value }} {{ currency._value }}</a>
{% endif %} ;;
{% endcase %} ;;
drill_fields: [gcp_billing_export_credits.credit_name,gcp_billing_export_credits.credit_amount]
}

Expand Down