[v7 cloudwatch logs] How do I display topN table?

I can create a Top5 cloudwatch insights query like:

fields @timestamp, @message
| filter @message like /SOMETHING/
| parse '* :: *' as action, sender
| stats count() as count by sender 
| sort count desc
| limit 5

which gives me a cloud watch output that looks like

-------------------
|  sender  | count |
|----------|-------|
| sender1  | 18    |
| sender2  | 6     |
| sender3  | 3     |
| sender4  | 1     |
| sender5  | 1     |
--------------------

I’m trying to display this in grafana 7 using the new cloudwatch logs feature and the table shows only 1 row with a drop down box at the bottom that has all the table rows, but I can only pick one at a time. How can I display all 5 rows?

I will settle for a bar graph with all values, or maybe a pie chart.

I am guessing that this is a bug… well I hope so at least. After several hours of digging around on Google and failed attempts to apply table transformations, I have finally found a work around.

You need to manually edit the Panel JSON to get it to display correctly. This is done by hitting Inspect Panel JSON and find the “targets” parameter. If your panel is like mine, it will have a “statistics” and “statsGroup” inside of the target. Remove both of these and hit apply.
Before:

  "targets": [
    {
      "alias": "",
      "apiMode": "Logs",
      "dimensions": {},
      "expression": "fields id, site_id, db_id, system\n| stats latest(state), avg(records), avg(throughput), latest(@timestamp) AS lastUpdate by id\n| sort id desc",
      "id": "",
      "logGroupNames": [
        "/conv/executions"
      ],
      "matchExact": true,
      "metricName": "",
      "namespace": "",
      "period": "",
      "queryMode": "Logs",
      "refId": "A",
      "region": "us-east-2",
      "statistics": [
        "Average"
      ],
      "statsGroups": [
        "id"
      ]
    }
  ],

After:

  "targets": [
    {
      "alias": "",
      "apiMode": "Logs",
      "dimensions": {},
      "expression": "fields id, site_id, db_id, system\n| stats latest(state), avg(records), avg(throughput), latest(@timestamp) AS lastUpdate by id\n| sort id desc",
      "id": "",
      "logGroupNames": [
        "/conv/executions"
      ],
      "matchExact": true,
      "metricName": "",
      "namespace": "",
      "period": "",
      "queryMode": "Logs",
      "refId": "A",
      "region": "us-east-2"
    }
  ],

I would try table transformation: Reduce - Calculation: Last