我正试图在Azure数据资源管理器中制作线形图,我有一个表,我正试图使线形图中的每条线都基于该表中的一列。
使用单列可以很好地处理下面的查询
scandevicedata
| where SuccessFullScan == 1
| summarize SuccessFulScans = count() by scans = bin(todatetime(TransactionTimeStampUtc), 30s)
现在的问题是,我想从同一个表中添加第二列,像这样
scandevicedata
| where UnSuccessFullScan == 1
| summarize UnSuccessFulScans = count() by scans = bin(todatetime(TransactionTimeStampUtc), 30s)
正如你所看到的,第一个查询取出成功扫描,第二个查询取出不成功扫描现在我想将它们合并到相同的输出中,并在它们上做一个图表,但我不知道如何做到这一点,因为它们是不同的列
我怎样才能做到这一点?
您可以使用countif()
聚合函数:
scandevicedata
| summarize
Successful = countif(SuccessFullScan == 1),
Unsuccessful = countif(UnsuccessFullScan == 1)
by bin(todatetime(TransactionTimeStampUtc), 30s)
| render timechart