SOLVED
Home

count unique value in a column

%3CLINGO-SUB%20id%3D%22lingo-sub-198502%22%20slang%3D%22en-US%22%3Ecount%20unique%20value%20in%20a%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-198502%22%20slang%3D%22en-US%22%3E%3CP%3EHallo%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20do%20count%20unique%20value%20in%20the%20column%20name.%20How%20I%20can%20do%20his%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EInput%3C%2FSTRONG%3E%3A%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CP%3E%3CSTRONG%3EName%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E%3CSTRONG%3ETime%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CP%3EHonda%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E2015-01-01T00%3A00%3A01.0000000Z%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CP%3EHonda%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E2015-01-01T00%3A00%3A02.0000000Z%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CP%3EToyota%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E2015-01-01T00%3A00%3A01.0000000Z%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CP%3EToyota%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E2015-01-01T00%3A00%3A02.0000000Z%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CP%3EToyota%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E2015-01-01T00%3A00%3A03.0000000Z%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%3CSTRONG%3EOutput%3C%2FSTRONG%3E%3A%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CP%3E%3CSTRONG%3EName%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E%3CSTRONG%3ECount%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CP%3EToyota%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E3%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CP%3EHonda%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E2%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-198502%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%20Insights%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-199914%22%20slang%3D%22en-US%22%3ERe%3A%20count%20unique%20value%20in%20a%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-199914%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20this%20helps%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-199336%22%20slang%3D%22en-US%22%3ERe%3A%20count%20unique%20value%20in%20a%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-199336%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20do%20run%20the%20following%20query%3A%3C%2FP%3E%0A%3CPRE%3ETableName%0A%7C%20summarize%20count()%20by%20Name%3C%2FPRE%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3E-Evgeny%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent Contributor

Hallo,

 

I need do count unique value in the column name. How I can do his?

 

Input:

Name

Time

Honda

2015-01-01T00:00:01.0000000Z

Honda

2015-01-01T00:00:02.0000000Z

Toyota

2015-01-01T00:00:01.0000000Z

Toyota

2015-01-01T00:00:02.0000000Z

Toyota

2015-01-01T00:00:03.0000000Z

Output:

Name

Count

Toyota

3

Honda

2

 

2 Replies
Solution

Hi,

 

You can do run the following query:

TableName
| summarize count() by Name

Thanks,

-Evgeny

Thanks this helps