Filter item by value slot

I have a data table from which I can already filter the “CEDULA” column and add in the “IBCS” column the values that are repeated corresponding to the card, I also filter the “SALUD” column, but I need to filter the values in the “SALUD=‘EPS010’” column but in the “IBCS” column it is < 8778020, add the “IBCS” that are in that range and correspond to “EPS010” and store this value in a variable, could you help me find a solution?

This is what I have so far


image

Hi @Beatriz_Eugenia_Duqu,

I didn’t get you, what issue are you facing?

Are you doing the filter with same datatable?

Regards,
Arivu

image
I am filtering “CEDULA”, “IBCS” and add the value in this one in case the “CEDULA” is repeated and filter “SALUD”, but I must also after doing this process filter “SALUD” when it is equal to “EPS010” but the value is less than 8778020

Hi @Beatriz_Eugenia_Duqu,
Use below query to filter the data

DT.Select("SALUD='EPS010' and Convert(IBCS,System.Double)<8778020)").CopyToDataTable()

Regards,
Arivu


I get an error

Corrected the query please use the below one
DT.Select("SALUD='EPS010' and Convert(IBCS,System.Double)<8778020").CopyToDataTable()

Regards,
Arivu


now generates this error

Kindly update like the above query and try again

But I need to filter the values in the “SALUD=‘EPS010’” column but in the “IBCS” column it is < 8778020, add the “IBCS” that are in that range and correspond to “EPS010” and store this value in a variable

Yes it will give the filtered datatable only you will get the “EPS010” and less the 8778020

Regards,
Arivu

I already got it to add up when the “SALUD” column is “EPS010”, but I didn’t get it to do this only when the value in “IBCS” is less than 8778020

I already got it to add up when the “SALUD” column is “EPS010”, but I didn’t get it to do this only when the value in “IBCS” is less than 8778020