Splunk Search

How to achieve dashboard filter on a tabular panel without the visibility of that filter column?

Vish
Explorer

So I have a tabular chart as below with component, basket and ageing for 1 to 10 days.

So basically i am finding out the ageing of each component and also a basket filter to filter out the component based on different basket.

But i don't want the basket column to be in my tabular chart like if u can see the last 2 rows are of same component but different basket now i want a single row of each component and i will add a filter using the basket column and it has to filter out according but my below tabular chart should be change to a tabular chart having only component column and age column (and only one row for each component).

Vish_0-1682421585367.png

So is it possible to do it. If yes, please help out.

 

Labels (1)
0 Karma

seemanshu
Path Finder

Hi @Vish ,
Thanks for the update.
As per the recent requirement, if the rows with similar COMPONENT are required to be combined in a single row, then one of the following options could be used,

  • if the BASKET is required in the final result, then use the following search,

 

index=<index_name> sourcetype=<sourcetype_name>
| table COMPONENT, BASKET, AGE
| search BASKET=$tok_basket$
| stats values(AGE) as AGE, values(BASKET) as BAKSET by COMPONENT 
  • if BASKET is NOT required in the final results, then use the following search,
index=<index_name> sourcetype=<sourcetype_name>
| table COMPONENT, BASKET, AGE
| search BASKET=$tok_basket$
| stats values(AGE) as AGE by COMPONENT 

Here, the filter $tok_basket$ passes the BASKET number as the user selects and filters out the results.

Kindly support the answer if found helpful.

0 Karma

Vish
Explorer

The solution gave a partial answer, my components got combined but in my ageing column data is missing

this output should be these combination

Vish_1-1682568385665.png

 



but i have got this

Vish_0-1682568323595.png

few values are reversed also like the values of age of basket 3 is exhanged with basket 4

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@Vish - Your query would be something like this to achieve it.

..... <your original search> ....
| search BASKET=$tok_basket$
| stats values(AGE) as AGE by COMPONENT

 

  • Here in this query, $tok_basket$ is filtering the results as you asked.
  • And then | stats ... by COMPONENT as you asked to get only one line instead of multiple lines.

 

Kindly upvote if you found it helpful!!!

0 Karma

seemanshu
Path Finder

Hi @Vish ,
As per the requested query,
the following search could be used,

index=<index_name> sourcetype=<sourcetype_name>
| table COMPONENT, BASKET, AGE
| search BASKET=$tok_basket$
| fields - BASKET

Here, the filter $tok_basket$ passes the BASKET number as the user selects and filters out the results.

Kindly support the answer if found helpful.

0 Karma

Vish
Explorer

@seemanshu  This is valid if the Basket has to be removed from output but i want the rows to be combined as a single row, like the last 2 rows of my below picture as to be a single row

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...