Relic Solution: Need a Multi-faceted Search?

It’s time to level up with Insights!

The filter() function is a great workaround for when you need a multi-faceted search. Use filter() to limit the results for one of the aggregator functions in your SELECT statement. You can apply this to any case where you’ve got a set of “known” conditions against which you’d like to apply a facet. For example, maybe you want to be able to see the number of PageViews by city across different browser types. While you can’t facet by two different attributes, you can make a list of known browsers. Here’s the NRQL:

and here are the results:

Pro Tip: filter() has similar syntax to percentage().

A tip of the Nerd-Relic cap to Henry Shapiro, Insights Product Manager, for sharing this tip.