Keyword type in singlestat (or any other panel)

Hey guys,

As described in my title I’m have some issues with keyword data types.

What I’m trying to achieve.
Creating a dashboard for Mongo DB replica set using ElasticSerach as a datasource. More accurately using metricbeats mongodb module as a way of getting that data to elasticsearch. I then want to display the members of the replica set and their status (primary, secondary etc)

What I’m struggling with.
The field that holds the information on replica set members is a text field and either I’m being dumb or I can’t find a way to show that in Grafana panels. Any attempt is returning
“type”: “illegal_argument_exception”,
“reason”: “Expected numeric type on field [], but got [keyword]”

Grafana version is 5.4.2 and it’s a locally hosted instance.

Minor update on this, I appear to have found a slightly buggy way around this issue.

If you change the metric field to “Raw Document” , Click + to the side as if adding a group by rule, this will allow you to then remove the metric option entirely. Move away from the Metrics tab and then return the group by will appear, simple set this to the value you want to show and it works.

Apologies for the terrible image, just captures the steps described above