Hi. I’m using Infinity plugin- JSON file as a data source. My data is a non timeseries value. Is it possible to create a custom table? Like this image below.
Hello
Please post your data in csv inline format. Hard to work with data as image
Please repost with proper quotation mark. if you copy it here https://jsonlint.com/ you will notice it is not valid json.
Also if you could expound more on what result of A1 & B1 mean using the sample data you posted.
[{
“ProductId”: “1”,
“ProductName”: “Product1”,
“ProductType”: “Beverages”,
“OnStockQty”: 50,
“SoldQty”: 10
}, {
“ProductId”: “2”,
“ProductName”: “Product2”,
“ProductType”: “Beverages”,
“OnStockQty”: 25,
“SoldQty”: 20
}, {
“ProductId”: “3”,
“ProductName”: “Product3”,
“ProductType”: “Beverages”,
“OnStockQty”: 10,
“SoldQty”: 50
}, {
“ProductId”: “4”,
“ProductName”: “Product4”,
“ProductType”: “Canned”,
“OnStockQty”: 30,
“SoldQty”: 40
}, {
“ProductId”: “5”,
“ProductName”: “Product5”,
“ProductType”: “Canned”,
“OnStockQty”: 30,
“SoldQty”: 50
}, {
“ProductId”: “6”,
“ProductName”: “Product6”,
“ProductType”: “Dairy”,
“OnStockQty”: 60,
“SoldQty”: 70
}, {
“ProductId”: “7”,
“ProductName”: “Product7”,
“ProductType”: “Frozen”,
“OnStockQty”: 70,
“SoldQty”: 80
}, {
“ProductId”: “8”,
“ProductName”: “Product8”,
“ProductType”: “Cleaners”,
“OnStockQty”: 80,
“SoldQty”: 90
}, {
“ProductId”: “9”,
“ProductName”: “Product9”,
“ProductType”: “Cleaners”,
“OnStockQty”: 90,
“SoldQty”: 40
}, {
“ProductId”: “10”,
“ProductName”: “Product10”,
“ProductType”: “Personal Care”,
“OnStockQty”: 15,
“SoldQty”: 100
}, {
“ProductId”: “11”,
“ProductName”: “Product11”,
“ProductType”: “Personal Care”,
“OnStockQty”: 44,
“SoldQty”: 50
}]
Could expound more on what result of A1 & B1 mean using the sample data you posted.
It’s something like this
I need to have a custom column and row header for my OnStockQty and SoldQty (blue cells).
The number on the orange cells are the count of products based on the range of OnStockQty and SoldQty.
I don’t know if this is possible to do in grafana. Please let me know.
start out with this just to get you going. Done for the day on this side of the world.
See this
--using UQL of infinity.
parse-json
| project "80~100"=sum("OnStockQty","SoldQty")
Then do have idea on how can I create a row header (label) on the table?
looking at the sample data and the results you show in orange does not seem accurate. in the picture you added for inStock 0~19 and SoldQty 80 ~100 the count is 1?
If you check the Product 10, the OnStockQty is 15 and SoldQty is 100 that’s why the result is 1 in the tally (highlighted with orange). If you find my tally incorrect, please disregard. I just manually created that on excel to visualize what I want to show in the Grafana. But the idea is to tally the count of the product based on the range set on OnStockQty and SoldQty.