FACET CASES ... AS broken my dashboard when apply filter

I have a dashboard for my project with multi teams. So, I’m trying to use FACET CASES to create conditions to apply filters on entire dashboard.

My query is:

 SELECT count(groupedRequestUrl) FROM AjaxRequest
   WHERE appName = 'my-app' AND requestUrl LIKE '%mydomain.com%'
   SINCE 3 hour ago
   FACET CASES(
      WHERE groupedRequestUrl RLIKE r'.*conditionA*' AS 'Team A',
      WHERE groupedRequestUrl RLIKE r'.*conditionB*' AS 'Team B')
   OR groupedRequestUrl

And I’ve marked Filter current dashboard. This query show me a table like that:

Cases Total
Team A 1
Team B 2
  1. When I click on table row to apply filter, it broken my dashboard and shows Ops! Something wrong!. It’s a bug?
  2. If I put an AS 'groupedRequestUrl' at the end of FACET CASES, the applied filter is groupedRequestUrl = 'Team A', but no results.
  3. If I remove AS 'Team A' on CASE, the applied filter is groupedRequestUrl = 'groupedRequestUrl RLIKE ...', but no results.
  4. If I remove AS 'groupedRequestUrl' in the end of FACET, it broken my dashboard again.

How can I group urls and filter like I want?

– EDIT

The problem is on OR requestGroupUrl after FACET CASES.

Hi @renato.holanda ,

would it be possible for you to share a permalink to this dashboard / chart. So that one of our Dashboard experts can dig a little deeper into this for you.

Only an NR Admin will be able to access it, so it is perfectly safe to share this in the community.

Sorry for the delay. I was on vacation!

Here the dashboard link: https://onenr.io/0qwL26PWOj5

Hi @renato.holanda

Welcome back from vacation, I hope you had a great time.

I will go ahead and loop in the engineer to let them know you have followed up with the link to the dashboard in question.

Please note they will reply here via this post.

Should you have any new updates or questions please let us know! We are here to help.

Hi @renato.holanda

It doesn’t look like there is a way to accomplish this in a scalable way, when you click a filter it applies it as a simple where condition to all the widgets. Your facet case is taking a substring of groupRequestUrl and turning it into a new field for the team label, but that label doesn’t actually exist in the underlying data so you can’t really filter against is inside the query. You could wrap the whole thing like

select * from (SELECT count(groupedRequestUrl) FROM AjaxRequest WHERE appName = 'my-app' AND requestUrl LIKE '%mydomain.com%' SINCE 3 hour ago FACET CASES( WHERE groupedRequestUrl RLIKE r'.*conditionA*' AS 'Team A', WHERE groupedRequestUrl RLIKE r'.*conditionB*' AS 'Team B') OR groupedRequestUrl)

and that would fix the immediate problem but only for just the one widget and that adds some extra timestamp columns and nonsense that are going to make any other widget that much harder to build.

You could potentially, add extra tabs to the dashboard and pre filter them to achieve the groupings you are looking for.