Dashboard in Kibana: Boolean vs. Count Distinct offered Field

I'm trying to create a real queue dashboard in Kibana using the cxi_data_view index pattern. The data includes fields like queueName, offered, etc. I'm unsure about the offered field. It might be a boolean indicating whether a conversation was offered or a count of distinct conversation IDs for each queue entry. How can I create visualizations in Kibana that consider both interpretations of the offered field? I initially created a new field (new_offered) to filter for offered conversations (true values), but I'm not sure if that's the right approach. I used this calculation for the new field new offered = New Offered = if (doc['offered'].value == true) {
emit(1);
} else {
emit(0);
}, but db admin told offered is equal to count distinct of conversation_ID. I want to know if my calculation/approach is correct or it needs any changes

To get a new runtime field checking for another field existence you can use this code:

emit(doc['offered'].size() > 0)

And set the field type as Boolean as I did on this screenshot for the Kibana Flights dataset and a new hasCarrier boolean field.

That should give you a field that easily documents with any value in offered. This approach is not different from doing that filtering directly in the Kibana filter bar.