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

Feature Idea: Variables in Dashboard Queries

feature-request
dashboard
nrql
insights
feature-idea
rfb

#1

It would be really useful if we could use variables in NRQL queries on insights dashboards, that could then be set in the dashboard to modify all of the queries used on that dashboard. For example, a query could look something like this

select * from Table where someField = $variableA

And then have a text field on the dashboard where $variableA can be defined. Similar to the filter feature in dashboards, except something that can be used for more than just blanket filtering.


New Relic Edit

  • I want this too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


#2

Hey @James.Brumond - that sounds like a great idea :smiley: I’ll get this added on our side and I’ll add a poll here too for others to have their say.


#3

This would be a huge win for my organization. We create dashes for customer health monitoring based on their org hash. I sometimes have 20 charts for an org dashboard and I currently dupe a dash and then go in and manually edit each chart with the new orgID to make it work for another customer.

Please add a variable option!!! That would be stellar!


#4

Thanks for your input @cary.fehlinger - I’ll get your use case added to our feature request internally :smiley:


#5

Any update on this? This will be great for creating dynamic dashboards.


#6

@gaurav.verma2 -

No update right now - I’ll get your +1 added here though


#7

Hi @RyanVeitch, any update on this? We have same kind of query in multiple dashboards differed by only one where condition value. It will be super useful if we get it.


#8

I don’t have an update right now, but I’ll get your +1 added for this feature :slight_smile:


#9

+1 on this, would be really useful!


#10

Thanks @aidan3 - your +1 has been added


#11

Hi @RyanVeitch, any update on this feature or when it is likely to be developed? Would be really useful when copying dashboards across different environments!


#12

No update at the moment @mark.lee - I’m not sure if this is on the roadmap either, I don’t have visibility into that. I can get your thoughts forwarded on to the right product managers though. I’ll do that now.


#14

Hey there my fellow Data Nerds!

As a consultant for all things in and around the New Relic ecosystem (and much more), I recommend the following solution for this use case that’s really easy to use.

Basically, you’re just trying to do a two-part filter. This is natively supported from within the NR1 dashboarding UI already. To do it, you just need to have two queries on the same dashboard that facet by types of data in the same NR data namespace.

Steps to solve:

  1. Create dashboard widget 1 with query:

FROM dataTable SELECT * FACET dataTypeA

  1. Create dashboard widget 2 with query:

FROM dataTable SELECT * FACET dataTypeB

  1. Set both widgets to filter the current dashboard
  2. Filter by a primary field in widget 1
  3. Filter by a secondary field in widget 2

In the above example, dataTypeB becomes the $variableA in the original ask:

select * from Table where someField = $variableA

Example data set:

Example with the filters on:


(note that the screenshot number values don’t relate bc I took the screenshots at different times.)

Going beyond that, you can (and should) add an additional dimension for the data which is: time. I typically default many of my queries to include the time clause of “SINCE this month” to understand the current month’s performance. You can add another tab in NR1 where all of the same widgets are included, but on a different timeline so for example “SINCE last month UNTIL this month”. Then using the same filters, you can toggle back in forth to get a more complete understanding of what’s actually going on. Additionally, the time interval can be changed between week/month/quarter/year for maximal data representation options.

For those with additional questions, please feel free to reach out to me directly for additional support. Always happy to help fellow NR enthusiasts and data nerds. :nerd_face: :v:t3:

Best Regards,
Jonathan Love
Principal Consultant, Digital Performance Management
Kinect Consulting


#15

Nice solution @jlove - Looks like you posted the same post twice, from an alternate account so I got one of those removed :smiley:

As a heads up, you may want to redact your email address to avoid getting spammed since this community page is publicly accessible.


#16

Thanks @RyanVeitch - Updated the email to just point to the 'ol LinkedIn.

Problem with having used NR for a few years, is that I’ve got a couple of accounts from different companies… :laughing: