Dashboards & Visualizations

How to remove the null values from below fields?

ramkyreddy
Explorer


I want to remove the null values, which are in empty cells, there is no data present I tried multiple ways not able to remove them,

index="gitxapixation" platform !=null provision_type IN (*) site_location IN (*)
| eval end_time=strftime(end_time, "%m/%d/%y %H:%M:%S")
| eval WW=strftime(start_time, "%V.%w")
| eval _time = start_time
| eval WW=strftime(_time, "%V.%w")
| eval scenario_name=cas(provision_type="BIOS",mvindex(split(context,"."),1),provision_type="IFWI",mvindex(split(context,"."),1),provision_type="OS",mvindex(split(context,"."),1))
| eval scenario_name=coalesce(scenario_name,name)
| rename scenario_name as Testcase_id
| stats count(eval(status="FAIL")) as fail_count, count(eval(status="PASS")) as pass_count, count(eval(like(status,"BLOCKED%"))) as not_run_count by WW,kit,provision_type,platform,subproject
| eval scenario_status=case(fail_count>0, "FAIL", not_run_count>0, "NOT RUN", fail_count=0 AND not_run_count=0, "PASS")
| eval IFWI=case(provision_type="IFWI",scenario_status)
| eval OS=case(provision_type="OS",scenario_status)
| eval BIOS=case(provision_type="BIOS",scenario_status)
| rename platform as Platform subproject as AutomationType
| table WW,Platform,kit,AutomationType,IFWI,BIOS,OS
ramkyreddy_0-1686741386188.png

I will appreciate on this, please help me out

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Each row represents an event from your results. Each column represents the fields for those events and their values.

If you want something in those fields to represent the fact that no value is available for the field for that event, you can use the fillnull command, for example:

| fillnull value="N/A"

 

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Each row represents an event from your results. Each column represents the fields for those events and their values.

If you want something in those fields to represent the fact that no value is available for the field for that event, you can use the fillnull command, for example:

| fillnull value="N/A"

 

0 Karma

ramkyreddy
Explorer

Is there any logic can we hide or delete, all 3cloums having N/A values, because there is no data present.
ramkyreddy_0-1686752597293.png

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Unless you have create the fields with null for all events, there is likely to be at least one event with a non-null value, although it may not be on that page of the table, therefore the column remains.

If this isn't the case, you would need to share your search so we might be able to find a reason for the "empty" columns

0 Karma

ramkyreddy
Explorer

You're asking  about this search query right

index="gitxapixation" platform !=null provision_type IN (*) site_location IN (*)

| eval end_time=strftime(end_time, "%m/%d/%y %H:%M:%S")
| eval WW=strftime(start_time, "%V.%w")
| eval _time = start_time
| eval WW=strftime(_time, "%V.%w")
| eval scenario_name=cas(provision_type="BIOS",mvindex(split(context,"."),1),provision_type="IFWI",mvindex(split(context,"."),1),provision_type="OS",mvindex(split(context,"."),1))
| eval scenario_name=coalesce(scenario_name,name)
| rename scenario_name as Testcase_id
| stats count(eval(status="FAIL")) as fail_count, count(eval(status="PASS")) as pass_count, count(eval(like(status,"BLOCKED%"))) as not_run_count by WW,kit,provision_type,platform,subproject
| eval scenario_status=case(fail_count>0, "FAIL", not_run_count>0, "NOT RUN", fail_count=0 AND not_run_count=0, "PASS")
| eval IFWI=case(provision_type="IFWI",scenario_status)
| eval OS=case(provision_type="OS",scenario_status)
| eval BIOS=case(provision_type="BIOS",scenario_status)
| rename platform as Platform subproject as AutomationType
| table WW,Platform,kit,AutomationType,IFWI,BIOS,OS

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Because you specifically listed the fields in the table command, they will appear in the table.

You could try it this way

| stats count(eval(status="FAIL")) as fail_count, count(eval(status="PASS")) as pass_count, count(eval(like(status,"BLOCKED%"))) as not_run_count by WW,kit,provision_type,platform,subproject
| eval scenario_status=case(fail_count>0, "FAIL", not_run_count>0, "NOT RUN", fail_count=0 AND not_run_count=0, "PASS")
| eval IFWI=case(provision_type="IFWI",scenario_status)
| eval OS=case(provision_type="OS",scenario_status)
| eval BIOS=case(provision_type="BIOS",scenario_status)
| rename platform as Platform subproject as AutomationType
| fields - failed_count pass_count not_run_count scenario_status provision_type
| table WW,Platform,kit,AutomationType,*
0 Karma

ramkyreddy
Explorer

Great Thanks, @ITWhisperer Its working fine but 
ramkyreddy_0-1686832537381.png

Is there any chance actually i want like this 

ramkyreddy_1-1686832780615.png

 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Seems unlikely given that your stats are by WW Platform Kit and AutomationType. You could either fill in the blanks (use fillnull as previously mentioned) or exclude all lines where any of them are null.

What do you think a table like you showed would represent?

0 Karma

ramkyreddy
Explorer

the output actually I need in the 2 Fig.

Thanks a lot, @ITWhisperer for helping me out with this query its working fine

0 Karma
Get Updates on the Splunk Community!

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...

Uncovering Multi-Account Fraud with Splunk Banking Analytics

Last month, I met with a Senior Fraud Analyst at a nationally recognized bank to discuss their recent success ...

Secure Your Future: A Deep Dive into the Compliance and Security Enhancements for the ...

What has been announced?  In the blog, “Preparing your Splunk Environment for OpensSSL3,”we announced the ...