Hi @niketnilay ,
It worked, Thank you for help ! and Thanks for providing logic.
I have made some small changes in Step 3 query to match the color code. I am posting the Changed code for other people reference below.
Changes :
1. To check Null values function used - isnull().
2. Additional condition added.
Step 3 : With Changes:
| transpose 0 header_field="Header" column_name="Header"
| foreach "group*_group_row_no1"
[| eval "<<FIELD>>"=case(isnull(<<FIELD>>) AND isnull(group<<MATCHSTR>>_group_row_no2) AND isnull(group<<MATCHSTR>>_group_row_no3) ," |White",
isnotnull(<<FIELD>>) AND isnull(group<<MATCHSTR>>_group_row_no2) AND isnull(group<<MATCHSTR>>_group_row_no3) ,<<FIELD>>."|Yellow",
isnotnull(<<FIELD>>) AND isnotnull(group<<MATCHSTR>>_group_row_no2) AND isnotnull(group<<MATCHSTR>>_group_row_no3) ,<<FIELD>>."|Green",
true(),<<FIELD>>)]
| foreach "group*_group_row_no2"
[| eval "<<FIELD>>"=case(isnull(group<<MATCHSTR>>_group_row_no2) and match(group<<MATCHSTR>>_group_row_no1,"dummy|Yellow")," |Yellow",
isnull(group<<MATCHSTR>>_group_row_no2) and match(group<<MATCHSTR>>_group_row_no1,"dummy|White")," |White",
match(group<<MATCHSTR>>_group_row_no1,"dummy|Green"),<<FIELD>>."|Green",
match(group<<MATCHSTR>>_group_row_no1,"dummy|Yellow"),<<FIELD>>."|Yellow",
match("group<<MATCHSTR>>_group_row_no1","|White"),<<FIELD>>."|White",
true(),<<FIELD>>)]
| foreach "group*_group_row_no3"
[| eval "<<FIELD>>"=case(isnull(group<<MATCHSTR>>_group_row_no3) and match(group<<MATCHSTR>>_group_row_no1,"dummy|Yellow")," |Yellow",
isnull(group<<MATCHSTR>>_group_row_no3) and match(group<<MATCHSTR>>_group_row_no1,"dummy|White")," |White",
match(group<<MATCHSTR>>_group_row_no1,"dummy|Green"),<<FIELD>>."|Blue",
match(group<<MATCHSTR>>_group_row_no1,"dummy|Yellow"),<<FIELD>>."|Yellow",
match(group<<MATCHSTR>>_group_row_no1,"|White"),<<FIELD>>."|White",
true(),<<FIELD>>)]
Thanks to @kamlesh_vaghela for CSS and JS.
Also Please refer below link for CSS and JS which will be used to color code the cell -
https://answers.splunk.com/answers/661894/how-to-color-cell-contents-with-css-and-js.html
... View more