Can't filter Blank data per

I have one excel, i want to filter data contain blank use, however, it does not work.

NonPOPayment-20220627140639.xls (58.5 KB)

TestSelectBlank.xaml (8.2 KB)

so @Lori

basically based on which column you want to exclude blank rows

As an example: H25 has a blank and is not empty: so “” will not match as the value is like: " "

@nikhil.girish “Expense Type”

As an alternate we can use LINQ

(From d in DTReport.AsEnumerable
Where d("Operating Unit").toString.Trim.Equals(OperatingUnitItem)
Let et = d("Expense Type").toString.Trim().ToUpper()
Where {"OTHERS", "FREIGHT - COD", "FREIGHT"}.Any(Function (x) x.Equals(et) OrElse String.IsNullOrWhitespace(et)
Select r = d).Count
1 Like

Thank you very much!

Hi @Lori

If you want to go with the Select method, try this

DTReport.Select("[Operating Unit]='"+OperatingUnitItem+"' and ([Expense Type]='Others' or  [Expense Type]='Freight - COD' or [Expense Type]='Freight' or [Expense Type] is NULL)")


I test your expression and it works well, thank you, you are so kind! :+1: :+1:

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