Hi
I have the query which yields the results i want, but i would like to know if there's a cleaner way to achieve my goal.
I have the following table
Source ------------------------- Item3Count
Item1 ----------------------------- 1
Item2 ----------------------------- 1
Item3 ----------------------------- 22
Item4 ----------------------------- 1
I would like to modify the above table to look like this (should show count value for item3 only)
Source ------------------------- Item3Count
Item1 ----------------------------- 0
Item2 ----------------------------- 0
Item3 ----------------------------- 22
Item4 ----------------------------- 0
Currently my query looks like this ... It works but i feel like its too many lines of query to make small modification. Please let me know if there's a better way to write the same query
| chart values(Item3Count) by Source
| eval Item3Count=if(match(source,"item1"),0,Item3Count)
| eval Item3Count=if(match(source,"item2"),0,Item3Count)
| eval Item3Count=if(match(source,"item4"),0,Item3Count)
Thanks
Sheshank
... View more