Row.count for a specific column in SAP

hello !!!

I have a SAP data table that I extracted.
Now I want to count rows but for a specific column. for example “DataC”.

I am grateful for any help

Clod

Hi Kann_cad,

If you wish to get the count using a for each row activity, simply make a counter variable, put an if statement inside your for each row activity with condition. This will count all non-empty rows.

NOT(string.IsNullOrEmpty(line("DataC").ToString))

Then add an assign statement, so where the Data is not empty, it will add
counter + 1
Like this
image

Or if you wish to use LINQ. Assign an Int32 variable to this statement. This will count all non-empty rows.

(From row In DatenKmeldung
Where Not(String.IsNullOrEmpty(row("DataC").ToString))).Count()

Like this
image

Kind Regards

1 Like

Thank you very much @Che
That has solved my problem.

Vielen Dank

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.