Mere count of field_AB is not particularly insightful. (Also, what are the counts? Are they unique value counts or counts of events that has field_AB? There are many other metrics for either of the...
See more...
Mere count of field_AB is not particularly insightful. (Also, what are the counts? Are they unique value counts or counts of events that has field_AB? There are many other metrics for either of these to be useful.) Let me clarify something. In your latest illustration of Inital Query Results, you are having problem populating field_D, field_C, and field_E corresponding to select values of field_AB. Is this correct? Your illustration cannot be a precise representation because it is impossible for groupby field_AB to have the same value "UniqueID" in every row. This means that your observed missing values of field_D, field_C, and field_E has something to do with your actual data. In other words, coalesce, stats, and groupby are all functioning as designed. All those "gaps" in field_D, field_C, and field_E only means that source_1 and source_b contain different sets of unique values of field_AB (field_A in source_1, field_B in source_2). This is a simple test: index=index_1
(sourcetype=source_1 field_D="Device" field_E=*Down* OR field_E=*Up*) OR (source="source_2" earliest=-30d@d latest=@m)
| eval field_AB=coalesce(field_A, field_B)
| eval source = case(source == "source_2", "source_2", sourcetype == "source_1", "source_1", true(), "mingled")
| stats dc(field_AB) by source Are the count the same for both sources? Are there any "mingled" counts? (Note one of your searches uses sourcetype as filter, the other uses source. This is generally a bad strategy because they will confuse you three months from now.) If you need concrete help, you must post anonymized raw data, and show us which data set cause the problem. Alternatively, you need to inspect data closely; specifically, how are field_D and field_E populated with field_A in source_1, and how is field_C populated with field_B in source_2.