데이터 테이블 질문

InputDT

A B C D
1 1 1 1
2 2 3 4
3
4 1 5
5 6
6

이러한 Datatable 이 있을때
컬럼 B,C, D 이 전부 없는 경우
해당 행을 지우고 싶습니다.

OutputDT

A B C D
1 1 1 1
2 2 3 4
4 1 5
5 6

이런식으로 B, C, D가 모두 Null인 행을 삭제 한다 하엿을때, 수식을 알고 싶습니다.

HI @Gabriel_Choi

You can try with filter data table
image

(You need to check BCD right so if B doesn’t have value means obviously CD also has no values so you can use “B” is not empty) I’m saying this based on your sample input

You can also use this expression
dt.AsEnumerable().Where(Function(r) Not r(“B”).Equals("")).CopyToDataTable

Regards
Sudharsan

Thank you for your answer. but i think that isn`t answer. T.T

DT1
A B C D
1 1 1 1
2 2 3 4
3
4 1 5
5 6
6
7 2 3

IF Collum “B” is empty Like this How can I do?
I want to except (if B and C and D is empty).

Have you tried this expression also ?

Regards
Sudharsan

Okay so you needed only the values which contains values in A ,B,C,D?

yes I want to except All B,C,D is empty

Try like this

image

Regards
Sudharsan

thank you

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