Hi Daniel, sure, here is the result of the query inspector for this scenario
I had to add a where clause to this, if the matkl of ‘001’ is not the first result (with highest number) in the query then the bar gauge does not look messed up. Also, to “fix” it I added
concat ( 'Mat Group ', matkl ) to the select to ensure that field is never just a number. But maybe you can find something interesting from this, it did surprise me when I first noticed the issue
Stefan Manns
Principal Product Specialist
Informatica
{
"request": {
"url": "api/tsdb/query",
"method": "POST",
"data": {
"from": "1587395034586",
"to": "1587396834586",
"queries": [
{
"refId": "A",
"intervalMs": 60000,
"maxDataPoints": 1888,
"datasourceId": 1,
"rawSql": "select matkl as material_type, sum(brtwr) as spend from SM_EKPO_NEW_RECS where matkl not in ('ZFRAME','L001')\r\ngroup by matkl order by spend desc",
"format": "table"
}
]
}
},
"response": {
"results": {
"A": {
"refId": "A",
"meta": {
"rowCount": 7,
"sql": "select matkl as material_type, sum(brtwr) as spend from SM_EKPO_NEW_RECS where matkl not in ('ZFRAME','L001')\r\ngroup by matkl order by spend desc"
},
"series": null,
"tables": [
{
"columns": [
{
"text": "material_type"
},
{
"text": "spend"
}
],
"rows": [
[
"001",
4219
],
[
"ZTRAIN",
1887.6
],
[
"ZSEAT",
1073.5
],
[
"ZHANDLE",
970.8
],
[
"ZWHEEL",
900.48
],
[
"ZFORK",
790.5
],
[
"YBMM01",
504
]
],
"type": "table",
"refId": "A",
"meta": {
"rowCount": 7,
"sql": "select matkl as material_type, sum(brtwr) as spend from SM_EKPO_NEW_RECS where matkl not in ('ZFRAME','L001')\r\ngroup by matkl order by spend desc"
}
}
],
"dataframes": null
}
}
}
}