Forum Discussion
gcam032
Jul 26, 2019Copper Contributor
Summarize with dynamic variable involved
Hi All, I have some data stored int he following format: Key Timestamp DynField 1234 2019-07-24 23:59:33 {"isA":false,"isRR":false,"isE":true,"isM":null,"isVS":0,"isBot":false} 3938...
Yoni
Microsoft
Jul 26, 2019consider the following option:
datatable(key:long, Timestamp:datetime, d:dynamic) [ 1234, datetime(2019-07-24 23:59:33), dynamic({"isA":false,"isRR":false,"isE":true, "isM":null,"isVS":0, "isBot":false}), 3938, datetime(2019-07-24 12:04:32), dynamic({"isA":true, "isRR":false,"isE":false,"isM":null,"isVS":1000,"isBot":false}), 3982, datetime(2019-07-24 01:33:13), dynamic({"isA":false,"isRR":true, "isE":false,"isM":null,"isVS":0, "isBot":true }) ] | summarize count_key = dcount(key), count_key_where_isA_is_true = dcountif(key, d.isA == true), count_key_where_isRR_is_true = dcountif(key, d.isRR == true) by Date = startofday(Timestamp)