In my cube, I have several measures at the day grain that I'd like to sum at the day grain but average (or take latest) at the month grain or year grain.
Example: We have a Fact table with Date and number of active subscribers in that day (aka PMC). This is snapshotted per day.
dt | SubscriberCnt |
---|---|
1/1/22 | 50 |
1/2/22 | 55 |
This works great at the day level. At the month level, we don't want to sum these two values (count = 105) because it doesn't make sense and not accurate.
when someone is looking at month grain, it should look like this - take the latest for the month. (we may change this to do an average instead, management is still deciding)
option 1 - Take latest
Month-Dt | Subscribers |
---|---|
Jan-2022 | 55 |
Feb-2022 | - |
option 2 - Take aveage
Month-Dt | Subscribers |
---|---|
Jan-2022 | 52 |
Feb-2022 | - |
I've not been able to find the right search terms for this but this seems like a common problem.