Filtering on 'Top 10' when using two metrics
I'm looking to create a graph which dynamically shows the last 4 weeks sales trend by customer, filtered on the top 10 customers (by sales revenue). However, when I add 'week' and 'customer', it filters on the top 10 rows (i.e sales revenue by customer per week) and not specifically the top 10 customers. Is there a way to create this?
I could filter on 10 customer names, but as this will likely change each week, it will not be dynamic.
Hi Sam Greenwood
What version are you on? This looks like a perfect application of our inline subquery feature, which came out in 5.2. With inline subquery you can do this (using quotes just to delimit the fields, don't use in search bar)
sales 'sales group' week 'last 4 weeks' 'sales group' in ('sales group' sales 'top 10')
This does a query inside a query. The "inside" query:
'sales group' in ('sales group' sales 'top 10')
should get you the top 10 sales groups, putting the result in 'sales group'. Then the outside query:
sales 'sales group' week 'last 4 weeks'
should give you the sales of those top 10 sales groups.