Forum Discussion

Gamleur84's avatar
Gamleur84
Copper Contributor
Nov 04, 2019
Solved

How can I select distinct values in a column rather than distinc column ?

Hi   I am trying to get the count of unique RoleInstance per 10 min   MetricsLogs | distinct RoleInstance | summarize TimeGenerated, AggregatedValue = count(RoleInstance) by bin(TimeGenerated, ...
  • CliveWatson's avatar
    Nov 04, 2019

    Gamleur84 

     

    How about, either of these?

    Perf
    | where CounterName =="% Used Space"
    | summarize AggregatedValue = count(CounterName) by bin(TimeGenerated, 10m), CounterName
    
    // shows unique ConunterValues per CounterName 
    // source: https://docs.microsoft.com/en-us/azure/kusto/query/dcount-aggfunction
    Perf
    | where CounterName =="% Used Space"
    | summarize AggregatedValue = dcount(CounterValue) by bin(TimeGenerated, 10m), CounterName

     

Resources