Rowcount after filtering

Hi,

Sequence.xaml (16.9 KB)

I am trying to get row count after filtering data based on certain conditions, i am not getting proper output. where am i missing logic? i need to get row count of only filtered columns. Please check the sample xaml

Hi @Sirisha_Siri

Try to give the expression to get the row count

skudt.Rows.Count

Regards
Gokul

Fine

If you know the ColumnName of the filters columns then you can get them one by one with this below expression in specific to that column

Use this expression in a assign activity like this

int_rowcount = Dt.DefaultView.ToTable(False, “your ColumnName”).Rows.Count

This will give the row count of that specific column alone

Mention the ColumnName as per your need

Cheers @Sirisha_Siri

Hi @Palaniyappan
i need row count of entire sheet after filtering, it’s not specific to column

1 Like

Fine

If it’s for entire datatable then

int_rowcount = Dt.Rows.Count

If it’s for specific column

int_rowcount = Dt.DefaultView.ToTable(False, “your ColumnName”).Rows.Count

As simple as that

Cheers @Sirisha_Siri

hi @Palaniyappan

I used dt.rows.count, here it is showing 561 where as rows are only 10 in number

1 Like

Hi @Sirisha_Siri

Try to Remove all the filter in the excel column

Regards
Gokul

hI @Sirisha_Siri

Try like this
- Filter Activity
- Read Range and check on the Visible rows only and now get the count

Regards
Sudharsan

Hmm

There are two options for this

If you just want to read the data set with filter in excel and get the count then use the read range activity with this property enable

  • Visible rows only - Select this option to only read the visible rows. It ignores filtered and hidden values.

So that you get the count of only filtered records
Make sure you have saved the file once after filtering in excel and then use read range activity

Or

If you are looking for a filtered records inside studio
Then use a FILTER DATATABLE activity once after reading the excel with read range
Where set the filters you want and then try using the same expression
Dt.Rows.Count

@Sirisha_Siri

Hey Sudharsan,

Thankyou so much, it worked

1 Like

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