Want to filter with respect to null values in a column and extract other values from other column

Hello

I am trying to filter on the basis of the Null Values present in the column “Clearing” and then trying to get the sum of the values in the 3rd column " Amt in loc.cur."

For details look at the image.

Thanks in advance

Hi @AryanSingh

String.isNullorEmpty(row(“column name”). ToString)

Assign
Dt.columns("column name’s). expression=“your value”

Thanks
Ashwin.S

read the excel using write range and loop through the datatable and then check string.isnullorempty(row(Clearing)) this will give if column value empty it will return true and then check this in if condition and then if it is true then store amount in one variable amount = amount+ Convert.Toint32(row(amount column) )

1 Like

@kalyanDev
Solved with above expression

Thanx both
@kalyanDev
@AshwinS2

hello
@AshwinS2
@kalyanDev

I wud like to ask something related to this. Can u guys help me?

Thanks in advance.

sure…always we will try our best to help

Sure

@AshwinS2
@kalyanDev

First i have filtered on the basis of same “Account Name” and then under first filter, i have filtered on the basis of same “Ban”.

After this what i want to do is Exctract the “Actual Balance Amt” for the Maximum value of Bill month(Last updated bill month[It is not set to a particular value] and then add the all the different amounts i get under different “Ban” under same “Account Name”.

u can see the image… if anything u dont understand then please ask?

@AshwinS2
@kalyanDev

Hi @AryanSingh

Based on the filter you got a datatable

So you can use for each row (dt)
So you can get the value as row(“bill month”). ToString.contains(“201905”)
Then get the appropriate values based on row dt

Thanks
Ashwin.S

yes…that i can do…but the max value of the bill month for different number in not only one. it varies from ban to ban. can also be similar!!

So i dont want to hardcode the value.

@AshwinS2

i have already retrieved the datatable for the same ban under same account name.

so i just need to extract the value of “Actual Balance Amt” for the max bill month value. And, then add the Actual balance amt of different BAN under the same account name

@AshwinS2
@kalyanDev

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