Things I have tried
Hi,
I’m trying to create a view of my workouts per week.
I’ve managed to create a table of the workouts grouped by week, with some high-level information:
TABLE
"3-4x week" as target,
length(rows.workout) as "number of workouts",
join(rows.file.link) as "workout dates",
choice(length(rows.workout) >= 3, "✅", "❌") as "target met"
FROM "journals"
WHERE workout
GROUP BY dateformat(file.ctime, "yyyy-WW") AS week
SORT week ASC
week | target | number of workouts | workout dates | target met |
---|---|---|---|---|
2022-40 | 3-4x week | 1 | 2022_10_05 | ![]() |
2022-42 | 3-4x week | 2 | 2022_10_19, 2022_10_20 | ![]() |
What I’m trying to do
Now I would like to add additional columns with the days from Monday to Sunday and mark with a the days I worked out.
I thought of doing so by adding e.g.
choice(any(dateformat(rows.file.ctime, "c"), (x) => x = 3), "✅", "-") as "Wed"
That however doesn’t seem to work, as the “any” function always returns “false”.
Thank you in advance!