I am using inputcsv and outputcsv. if you run below search that contains field town has same value. | makeresults
| eval state="AndhraPradesh,Karnataka,Tamilnadu"
| makemv state delim=","
| mvexpand state
| table state
| eval city=case(state="AndhraPradesh","Nellore,Vijayawada,Vizag",state="Karnataka","Bengaluru,Mysore",state="Tamilnadu","chennai")
| makemv city delim=","
| mvexpand city
| eval town="certain value" and I have written these results to csv to make use of them in search which is used in fields command. The subsearch will take fields which have different values. | makeresults
| eval state="AndhraPradesh,Karnataka,Tamilnadu"
| makemv state delim=","
| mvexpand state
| table state
| eval city=case(state="AndhraPradesh","Nellore,Vijayawada,Vizag",state="Karnataka","Bengaluru,Mysore",state="Tamilnadu","chennai")
| makemv city delim=","
| mvexpand city
| eval town="certain value"
| outputcsv test.csv
| fields [| inputcsv test.csv | stats dc(*) as * | transpose | where 'row 1' > 1 | table column | stats values(column) as search delim="," | table search]
... View more