0
我正嘗試使用基於時間/類別/供應商等的直方圖來計算Kibana上的平均利潤率。該數據庫從開始 (請參閱下面的索引)中沒有計算的利潤率。Kibana Historgram根據字段值計算利潤/毛利潤率
我需要通過(Netvalue - Cost)/NetValue * 100
來計算利潤率,並在直方圖中顯示結果。
是否有可能使groovy函數或類似於this但使用直方圖中的結果?
一直在努力工作幾天才能找到工作,但我不知道要走哪條路,或者即使可以在查詢層面上使用kibana。
{
"Mycompany": {
"mappings": {
"sales": {
"properties": {
"Cost": {
"type": "double"
},
"DocumentDate": {
"format": "dateOptionalTime",
"type": "date"
},
"ItemCategory": {
"index": "not_analyzed",
"type": "string"
},
"ManufacturerName": {
"index": "not_analyzed",
"type": "string"
},
"MaterialGroup2description": {
"index": "not_analyzed",
"type": "string"
},
"MaterialGroup4description": {
"index": "not_analyzed",
"type": "string"
},
"NetPrice": {
"type": "double"
},
"NetValue": {
"type": "double"
},
"OrderQuantity": {
"type": "long"
}
}
}
}
}
}
根據我這是一個有點不清楚你想達到的。舉一些例子。 – Opal 2014-10-10 09:30:52