-
Notifications
You must be signed in to change notification settings - Fork 0
/
html_text_styler_solution_code.txt
44 lines (32 loc) · 1.87 KB
/
html_text_styler_solution_code.txt
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
Moving Text Format Design Code:
SELECTED Direction = MIN(Direction[ID])
Speed Value = SELECTEDVALUE('Speed'[Speed], 20)
HTML Text_Styler:
Moving text (Supply Loaded & Adherence) =
VAR var_country1_change = [Margin Delivered (Country_1)]
VAR var_country1 = "[Supply Loaded & Adherence: Current Season] ----> Country_1: "&
FORMAT([Total Units Loaded Present Season (Country_1)],"0,0.00")&" "&
IF(var_country1_change >= 0,
"<span style=color:green;>▲ "&FORMAT(var_country1_change,"0.00%")&"</span>",
"<span style=color:red;>▼ "&FORMAT(var_country1_change,"0.00%")&"</span>")
VAR var_country2_change = [Margin Delivered (Country_2)]
VAR var_country2 = "Country_2: "&
FORMAT([Total Units Loaded Present Season (Country_2)],"0,0.00")&" "&
IF(var_country2_change >= 0,
"<span style=color:green;>▲ "&FORMAT(var_country2_change,"0.00%")&"</span>",
"<span style=color:red;>▼ "&FORMAT(var_country2_change,"0.00%")&"</span>")
VAR var_country3_change = [Margin Delivered (Country_3)]
VAR var_country3 = "Country_3: "&
FORMAT([Total Units Loaded Present Season (Country_3)],"0,0.00")&" "&
IF(var_country3_change >= 0,
"<span style=color:green;>▲ "&FORMAT(var_country3_change,"0.00%")&"</span>",
"<span style=color:red;>▼ "&FORMAT(var_country3_change,"0.00%")&"</span>")
VAR var_country4_change = [Margin Delivered (Country_4)]
VAR var_country4 = "Country_4: "&
FORMAT([Total Units Loaded Present Season (Country_4)],"0,0.00")&" "&
IF(var_country4_change >= 0,
"<span style=color:green;>▲ "&FORMAT(var_country4_change,"0.00%")&"</span>",
"<span style=color:red;>▼ "&FORMAT(var_country4_change,"0.00%")&"</span>")
RETURN
"<marquee behavior='scroll' direction='"&Direction[SELECTED Direction]&"' scrollamount='"&Speed[Speed Value]/3&"'>"&
var_country1 & " " & var_country2 & " " & var_country3 & " " & var_country4