Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Relic Solution: Need a Multi-faceted Search?

facet
nrql
filter
insights

#1

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.


Useful Insights NRQL queries library