Distinct count of 2 fields


#1

My index can have several entries that are equal in two fields. Is it possible to count these as one in the given time interval?
Example: One field is id, another field is action. The same action can be logged for the same id several times. However I need a chart where this is counted as one.


(Lukas Olson) #2

Would the "unique count" aggregation accomplish what you're referring to? (When viewing a visualization, under "metrics", instead of selecting "count" as the aggregation, select "unique count".)


#3

That only works if I want to count unique results of one field but in my case only the combination of two fields is unique.


(Lukas Olson) #4

Oh, I see. Unfortunately, there isn't any way to accomplish what you're saying in Kibana. You'd have to introduce another field into your mapping which correlates to the combination of those two fields.


(system) #5