Hi everyone
Once again I would need your expertise.
What I want to achieve: a table showing multiple Date-ToPeriod and Period-Over-Period metrics. Something like this:
Metric | Today | DoD | Week-To-Date | WoW | Month-To-Date | DoD | Quarter-To-Date | QoQ | Year-To-Date | YoY |
---|---|---|---|---|---|---|---|---|---|---|
Revenues | €100 | -50% | €600 | +10% | €1,300 | -5% | €4,500 | +2% | €15,000 | +10% |
Deposits | €200 | -30% | €800 | +12% | €1,200 | -5% | €5,200 | +12% | €12,000 | +15% |
Registrations | 10 | +4% | 60 | +3% | 150 | +2% | 500 | -5% | 800 | -2% |
Conversions | 5% | +1% | 4% | +1% | 8% | -1% | 12% | +8% | 11% | +7% |
I started working with PeriodToDate and PeriodOverPeriod functions, but it seems like it is not possible to achieve what I am looking for: first of all I would’ve to create 10 calculated fields for each metric, which means around one hundred of calculated fields in total just for this particular table, and second I do not think there is a way that I can create a table similar to the above. In my experiments I’d get one row for each calculated field.
I modeled my data so that it’d be something like this:
User | Created | Registration | Product | Deposits Amount | Orders Amount | Orders Count |
---|---|---|---|---|---|---|
001 | 2022-12-23 00:01 | 1 | NULL | NULL | NULL | NULL |
002 | 2022-12-24 01:18 | 1 | NULL | NULL | NULL | NULL |
001 | 2022-12-24 10:00 | NULL | NULL | €100 | NULL | NULL |
001 | 2022-12-24 11:00 | NULL | A | NULL | €50 | 1 |
001 | 2022-12-24 12:00 | NULL | B | NULL | €150 | 3 |
There are more fields but it gives an idea.
I used some SQL to have one column for each transaction type instead of having them in rows based on a type ID.
Some of my metrics are calculated fields,e.g.: conversion rate, while most are simple sums.
Is there any way to use the functions above to aggregate the data as above?
I am pretty sure that there is, I cannot believe that I would really need to write down one hundred functions for it just replacing one or two fields in each, but the issue with QuickSight is that there is not a huge body of knowledge out there, and even with extensive Google, I cannot find anything really pertinent (the way the period functions is straightforward but it doesn’t help me much here, I believe).
Thanks everyone