I have a data table like the one below and I’m trying to create single KPI card visuals that would be the average of the first_period for event_type = purchase_transaction and I’m at a loss on how to do that.
I created these calculations which make me think I’m on the right track as I get the value I want but I don’t know how to extract it just as a scalar for a kpi visual.
First Event = minOver(min({days_since_subscription_start}),[{customer_id},{event_type}])
Average First Event Period = avgOver({First Event})
| customer_id | event_type | event | first_period |
|---|---|---|---|
| cus_F3rX42mDPfiy2e | purchase_transaction | Export | 1 |
| cus_F3rX42mDPfiy2e | feature_usage | login | 1 |
| cus_F3rX42mDPfiy2e | feature_usage | Created List | 1 |
| cus_F3rX42mDPfiy2e | feature_usage | Added to List | 2 |
| cus_F3rX42mDPfiy2e | feature_usage | Viewed Profile | 9 |
| cus_F3reCIEU12nM3x | purchase_transaction | Document Image | 1 |
| cus_F3reCIEU12nM3x | feature_usage | Viewed Profile | 1 |
| cus_F3reCIEU12nM3x | feature_usage | login | 1 |
| cus_F3rlTVpRk2N2fl | purchase_transaction | Document Image | 1 |
| cus_F3rlTVpRk2N2fl | feature_usage | login | 1 |
| cus_F3rlTVpRk2N2fl | feature_usage | Viewed Profile | 1 |
| cus_F3rlTVpRk2N2fl | feature_usage | Printed Report | 18 |
| cus_F3rlTVpRk2N2fl | purchase_transaction | Criteria Bot | 29 |
