What I’m trying to do
I have to deal with several clients on a weekly basis.
I’m tracking down all progress and work in tags, on an hourly basis.
And I’ve written a few dataview queries to extract what happened each week.
```dataview
TABLE dummy as "LAST WEEK"
FROM "0 Inbox/Calendar/Daily"
WHERE dummy != null
AND file.day.year = number(substring(string(this.file.name), 0, 4))
AND file.day.weekyear = number(substring(string(this.file.name), 6, 8)) - 1
SORT file.day
```
```dataview
TABLE dummy as "THIS WEEK"
FROM "0 Inbox/Calendar/Daily"
WHERE dummy != null
AND file.day.year = number(substring(string(this.file.name), 0, 4))
AND file.day.weekyear = number(substring(string(this.file.name), 6, 8))
SORT file.day
```
I thought of enhancing it, by grouping instead of by day by the customer (ABC, XYZ, etc) and adding an additional column at the end with the date when this happened.
The intent is then to have something similar to this:
But that instead of grouping by Date, shows a group with all ABC entries, and another with all WYZ entries, with an additional column at the end showing the this entry was made.
Things I have tried
I leveraged Brian Jenkins weekly note review for these queries, and then did some changes to them, to group them by date and sort them I followed several posts in this forum, but I can’t figure out a way to use Split and then group by the output of the split.
```dataview
TABLE rows.work.split(field, "-") as WORK, date as ENTRY
FROM "0 Inbox/Calendar/Daily"
WHERE work != null
AND file.day.year = number(substring(string(this.file.name), 0, 4))
AND file.day.weekyear = number(substring(string(this.file.name), 6, 8))
GROUP BY rows.work[0] AS Customer
SORT Customer ASC
```
Because then I get that I cannot use array as a function:
Any hints on how to accomplish it?
PS: I’ll probably be using a different split character rather than “-”, which could be very common, but this was for the sake of asking the question.