When making a barchart or similar insight, is it p...
# gd-beginners
d
When making a barchart or similar insight, is it possible to filter the chart so that only the top N bars are shown? Currently I'm achieving this only by showing every bar in the insight, waiting for it to load, then using the zoom feature to zoom in on the top few.
f
Hi Daniel, it is possible to do this on the metric itself, by using the TOP ranking filter. For example, if you build the Bar chart with a metric that uses this filter, say:
Copy code
SELECT COUNT ({label.customer_id}) WHERE TOP(5) IN {metric.Revenue}
It will only display 5 bars, which will be the Top 5 in Revenue. I hope this helps!
🙌 1
j
d
Thanks guys, this is the stuff I was looking for!