forked from looker-open-source/block-cortex-sap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manifest.lkml
52 lines (40 loc) · 1.31 KB
/
manifest.lkml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
constant: CONNECTION_NAME {
value: "Cnn-PoC-MasOrange-SAP-Cortex-Integration"
export: override_required
}
constant: GCP_PROJECT {
value: "gcp-bigquery-433810"
export: override_required
}
constant: REPORTING_DATASET {
value: "REPORTING"
export: override_required
}
constant: CLIENT {
value: "100"
export: override_required
}
# Revenue is generally displayed in general ledger as a negative number, which indicates a credit.
# By setting Sign Change value to 'yes', it's displayed as a positive number in income statement reports.
constant: SIGN_CHANGE {
value: "yes"
export: override_required
}
#############################
# Additional Constants used for formatting and other logic
#{
# to show negative values in red, at this constant to the html: parameter
# For example:
# measure: profit {
# type: number
# sql: ${total_sales} - ${total_cost} ;;
# html: @{negative_format} ;;
# }
constant: negative_format {
value: "{% if value < 0 %}<p style='color:red;'>{{rendered_value}}</p>{% else %} {{rendered_value}} {% endif %}"
}
constant: sign_change_multiplier {
value: "{% assign choice = '@{SIGN_CHANGE}' | downcase %}
{% if choice == 'yes' %}{% assign multiplier = -1 %}{% else %}{% assign multiplier = 1 %}{% endif %}"
}
#} end additional constants