Consider the following data:
I have a dataset that includes city, store, date, and product_id. I created a calculated field called Available_product, which is defined as: distinct_count({product_id})
Now, I need to compute the average of available products at different levels:
- First Level: Calculate the distinct count of
product_idat thecity,store, anddatelevel. - Second Level: Compute the average of the above distinct count at the
cityanddatelevel. - Third Level: Compute the average of the second level values at the
citylevel.
I want to display this in a table or pivot table visualization in Quick Sight which would have city and average available products.
Question:
Is there a way to create a calculated field that achieves this aggregation hierarchy in Quick Sight? What would be the best approach to implement this?
