{
# column names, if using metrics then best
# to use metricname() to get correct name for locale
# otherwise it won't translate to other languages
names {
metricname(
Duration,
Time_Moving,
Time_Moving, #how do I creat a custom metricname ?
Distance,
Activities,
Work,
W'_Work,
Elevation_Gain
);
}
# column units, if using metrics then best
# to use metricunit() function to get correct string
# for locale and metric/imperial
units {
metricunit(
Duration,
Time_Moving,
Duration,
Distance,
Activities,
Work,
W'_Work,
Elevation_Gain
);
}
# values to display as doubles or strings
# if using metrics always best to use asstring()
# to convert correctly with dp, metric/imperial
# or specific formats eg. rowing pace xx/500m
values {
c(
asaggstring(
Duration,
Time_Moving),
Duration - Time_Moving ,
asaggstring(
Distance,
Activities,
Work,
W'_Work,
Elevation_Gain)
);
}
}
Hi allI am modifying a summary dashboard to show the difference between Duration and "Time Moving" the calculation is working but not the formatting.Any tips on formatting the new field as a time and labelling the new field correctly ?
{
# column names, if using metrics then best
# to use metricname() to get correct name for locale
# otherwise it won't translate to other languages
names {
c(
metricname(
Duration,
Time_Moving),
(
"Time_Stopped"),
metricname(
Distance,
Activities,
Work,
W'_Work,
Elevation_Gain)
);
}
# column units, if using metrics then best
# to use metricunit() function to get correct string
# for locale and metric/imperial
units {
metricunit(
Duration,
Time_Moving,
Duration,
Distance,
Activities,
Work,
W'_Work,
Elevation_Gain
);
}
# values to display as doubles or strings
# if using metrics always best to use asstring()
# to convert correctly with dp, metric/imperial
# or specific formats eg. rowing pace xx/500m
values {
stoptime <- aggmetrics(Duration) - aggmetrics(Time_Moving);
c(
asaggstring(
Duration,
Time_Moving),
timestring(
stoptime) ,
asaggstring(
Distance,
Activities,
Work,
W'_Work,
Elevation_Gain)
);
}
}