This is the exact technique you want to review with this.
See below - It’s called the Events In Progress technique
Follow the technique here exactly and you’ll see how you can calculated both of these.
The key is to understand how the USERELATIONSHIP function works. This is a key function that has some very useful usages. So a great one to review in-depth.