- QuickSight has dataset having fields - product, country, membercode, year, brand, invoicedate
- Create a calculated field, rankProduct = rank([distinct_count(membercode) DESC], [brand, year]) —> to filter Top N product
- Create a Vertical bar chart with x-axis=product, value=distinct_count(membercode), group/color=year, small multiples=brand
Vertical bar chart got error “Adding totals to distinct count aggregations is currently unsupported.” by either of these 2 actions:
a) x-axis; sort by membercode
b) filter using rankProduct less than or equal paramTopN
Expected result is: Top N products for distinct count of membercode in descending order
