Hello guys!
I have a table with the following structure:
account_id | event_date | event_name | event_quantity | active_day | inactive_day | pilot_day
ABC1 | 2023-10-01 | monitor | 4 | 1 | 0 | 0
ABC1 | 2023-10-01 | action | 2 | 1 | 0 | 0
ABC1 | 2023-10-01 | transaction | 1 | 1 | 0 | 0
HGB4 | 2023-10-01 | monitor | 0 | 0 | 1 | 0
HGB4 | 2023-10-01 | transaction | 0 | 0 | 1 | 0
HGB4 | 2023-10-01 | action | 0 | 0 | 1 | 0
We have 3 different account status(active, inactive, pilot) based on the amount of active, inactive and pilot days each account has.
I need to create a graph where I show the accounts per status per period.
The status should be calculated dinamically depending on the date range selected by the user and the period breakdown. For example, someone could select October 2023 as the date range, but "Week" as the period breakdown so he should see 4 bars with the quantity of accounts that were active, inactive and pilot for each respective week.
I've tried to create this with 2 questions, but didn't work as expected. Does someone know how to create something like this?
Thank you!