We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

how to add variable filter in dashboard

nawalkishos
Tera Guru

Hi Experts,

 

I have a requirements to create a variable filter in report or dashboard  and based on that we can filter the RITM.

I checked few logic from my side-  I have created PA dashboard where i'm showing the specific catalog item RITM  from (table- sc_req_item) and created variable filter using (table- question_choice) where i can able to show the variables, but when I tried to filter based on that it's not working. 

 

Please let me now if that is possible or not, if possible let me  know the approach and solutions

Looking forward with your inputs!!

 

Thank you!!

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@nawalkishos 

share your config screenshots.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

BhavaniYamsani
Giga Contributor

Hi @nawalkishos ,

 

1) Use Variable Conditions in the Report

Like just go to reports -> Create New -> Select the Table -> Build the report normally -> Scroll to Conditions -> Click Add Condition -> Select the Variables -> Choose your Catalog Item -> Select the Variable Name -> define the conditions -> Save the report

Now report filters RITMs based on catalog variables
You can then : -

Add the report to a Dashboard

Enable Interactive Filter

 

2) Create an Interactive Filter for Dashboard

Like if you want the dashboard user to dynamically filter by variable use this method

Go to Performance Anlytics -> Interactive Filters -> Click New

Configure 
Name - Variable filter

Give Type, Table

Add filter condition using something like - variables.<variable_name>

Save it. After that Go to Dashboard -> add Content -> Select Interactive Filter(chosse the one which you have created)

 

3) You can even create Database View by joining sc_req_item, sc_item_option_mtom, sc_item_option

 

join condition will be something like (please Recheck once again if you use this)

sc_req_item.sys_id = sc_item_option_mtom.request_item
sc_item_option_mtom.sc_item_option = sc_item_option.sys_id

So this shows variables as fields so they can be used easily in Reports, Dashboards , performance Analytics

 

As a best practice you can use Variable conditions in Report + Dashboard Interactive Filters

 

Please mark as helpful, if this answer meets your ASK

 

Thanks

Yamsani Bhavani