我試圖顯示今天 9 滾動 24 小時)與昨天(再次滾動)與每周平均值的計數
雖然我有代碼可以作業,但我也遇到了錯誤
錯誤是(查詢成功,警告:處理查詢時出現一些錯誤。:“部分查詢失敗:未指定的錯誤(訊息:'shard:5eeb9282-0854-4569-a674-10f8daef9f7d,來源:(錯誤{詳細資訊:Rest (404, "HEAD qh1kustorageoiprdweu16.blob.core.windows.net/jgtb64673c4e98a07fa116b4e49211-0d2a81b5bf3540e087ff2cc0e4e57c98/13da174e-3951-4b54-9a45-1fbcbe1476-5...")
編碼
let Yes_End = ago(24h);
let Yes_Start = ago(48h);
let N = ago(1m);
let LW_end = ago(14d);
let Lw_start = ago(7d);
let Curr = customMetrics
|extend Dec_Reasion = tostring(customDimensions["DeclineReason"])
|extend Type = tostring(customDimensions["AcquiringInstitutionId"])
|extend dw = dayofweek(timestamp)
|where name =='TransactionsDeclined'
|where timestamp between (Yes_End..N)
|summarize CurrentVal=sum(valueCount) by tostring(Dec_Reasion);
let Trend = customMetrics
|extend Dec_Reasion = tostring(customDimensions["DeclineReason"])
|extend Type = tostring(customDimensions["AcquiringInstitutionId"])
|where timestamp between (Yes_Start .. Yes_End)
|where name =='TransactionsDeclined'
|summarize Yesterday_total=sum(valueCount) by tostring(Dec_Reasion);
let weekTrend =customMetrics
|extend Dec_Reasion = tostring(customDimensions["DeclineReason"])
|extend Type = tostring(customDimensions["AcquiringInstitutionId"])
|extend dw = dayofweek(timestamp)
|where toint(dw) <6
|where timestamp between (LW_end .. Lw_start)
|where name =='TransactionsDeclined'
|summarize Week_Avg=sum(valueCount)/5 by tostring(Dec_Reasion) ;
Curr
|join kind=leftouter Trend on Dec_Reasion
|join kind=leftouter weekTrend on Dec_Reasion
|project Dec_Reasion,CurrentVal,Yesterday_total,Week_Avg
uj5u.com熱心網友回復:
可以用不需要連接的方式撰寫此查詢。
您可能想嘗試一下。
let Yes_End = ago(24h);
let Yes_Start = ago(48h);
let N = ago(1m);
let LW_end = ago(14d);
let Lw_start = ago(7d);
customMetrics
| where timestamp between (LW_end .. Lw_start)
or timestamp between (Yes_Start .. N)
| where name == 'TransactionsDeclined'
| extend Dec_Reasion = tostring(customDimensions["DeclineReason"])
,Type = tostring(customDimensions["AcquiringInstitutionId"])
| summarize CurrentVal = sumif(valueCount, timestamp between (Yes_End .. N))
,Yesterday_total = sumif(valueCount, timestamp between (Yes_Start .. Yes_End))
,Week_Avg = sumif(valueCount, timestamp between (LW_end .. Lw_start) and where toint(dayofweek(timestamp)) < 6) / 5
by Dec_Reasion
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/534907.html
標籤:天蓝色kql
上一篇:在AzureDevOps中,我可以看到創建測驗計劃UI,盡管有訪問權限
下一篇:無法通過瀏覽器訪問Azure容器
