Count the occurrences of values from excel columns

Hello all,

I would like to get the count of values from Column 1

input
image

to get output like this:
output

image

Thanking you

Hey @Yugal_Raju ,
Please check this workflow
CountOccurance.zip (2.5 KB)

image

Regards,

Hello I’m getting document invalid error. Is there any package that needs to be installed ?

@Yugal_Raju ,
Please refer this screenshot
Read range data table is InputDT

image
image

DT_Output =

(
From row In InputDT
Group row By a=row("Column1").ToString.Trim Into grp=Group
Let c=grp.Count
Select DT_Output.Rows.Add({a,c})
).OrderBY(Function(x) x("Column1").ToString.Trim).CopyToDataTable

image

DT_UniqueValues = InputDT.DefaultView.ToTable(True,"Column1")

image

DT_FinalOutput =

(
From x In Enumerable.Range(1,DT_Output.Columns.Count-1)
Let ra = DT_Output.AsEnumerable.Select(Function (d) d(x)).ToArray
Select DT_FInalOutput.Rows.Add(ra)
).CopyToDataTable

Regards,

@Yugal_Raju ,
Can you open it now?
CountOccurance.xaml (12.8 KB)

Regards,

myDict =

dtData.asEnumerable.GroupBy(Function (x) x("Column1").toString.Trim).ToDictionary(Function (x) x.Key, Function (x) x.Count)

myDataTable =
JArray.FromObject({myDict }).toObject(Of DataTable)

Ensure the following:
grafik