I would like to know how to check if math.Round(temData.AsEnumerable(). Average(Function(row) CInt(row (staffName))),1) have no element


i have try using is nothing / (the item above).toString.equals("")
it still not working how should i do to check if it has no element

Hi @GUANG_YONG_TEH

Could you show the full query?.
Thanks

the full query is
math.Round(temData.AsEnumerable(). Average(Function(row) CInt(row(staffName))),1).ToString.Equals("")

temData is a table
and staffName is the column name

@GUANG_YONG_TEH

Think the column eleven has no values to do a average.

Use

temData.AsEnumerable(). Any(Function(row) not row(staffName).tostring.trim.equals(""))

We have to be sure that atleast one cell should not be empty

Thanks

1 Like

i think it works thank you so much !

@GUANG_YONG_TEH awesome, please mark my thread as solution so it may usefull to others in the future.

Thanks

1 Like

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