I want to filter to retailers from my “Customer Name” columns while I want to keep just one filtering condition for other columns-- Here is the current
Expression for my filter
dt_DataSource.AsEnumerable.where(function(x) x(“Customer Name”).ToString.Equals(“PACIFIC SUNWEAR OF CALIFORNIA” ) And x(“Warehouse Id”).ToString.Equals(“09”) Andalso DateTime.parseExact(x(“Start Dt”).ToString,“MM/dd/yyyy 00:00:00”,system.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”).Equals(“01/04/2023”)).CopyToDataTable
I want to filter “PACIFIC SUNWEAR OF CALIFORNIA” and “CALISUN” from the “Customer Name” while the filter condition for other columns remain the same as you see in the above.
Hi @Yameso Thank you your time.
With the expression you just sent me.
The second customer did not return. Aslo, it returned data from another Warehouse Id.
Can you look into it once more? Thanks!
(From d in dt_DataSource.AsEnumerable
Where {"PACIFIC SUNWEAR OF CALIFORNIA","CALISUN" }.Any(Function (x) d("Customer Name").ToString.Trim.ToUpper.Equals(x))
Where d("Warehouse Id").ToString.Trim.Equals("09")
Where CDate(d("Start Dt").ToString).Date.Equals(CDate("04/01/2023").Date)
Select r =d).CopyToDataTable
@ppr
Thank you, the error has gone but I still see data from only one customer.
What could be the cause?
I want to get data from the two customers but from the same Warehouse Id.
every time we make the combination of customers, we fix the warehouse Id to the same. Sample_Data.xlsx (15.3 KB)