0

I have a string column called (Code) which will always have an integer value. I want to check if a Code column got Integer data put the source value, but if Code got string value in it then put 'Invalid' in Code column. Checker column will provide which row is invalid. e.g. If Code column got String value then put the column name otherwise leave it empty.

Code    CodeNewColumn    Checker
7875    7875    
9856    9856    
6545    6545    
565L    Invalid          Code
G787    Invalid          Code

I am using Derived column in Dataflow, can anyone please help me.

4

1 回答 1

0

创建一个包含 2 列的派生列:CodeNewColumn、Checker。

使用这些表达式:

CodeNewColumn = iif(isInteger(Code),Code,'Invalid') Checker = iif(!isInteger(Code),'Code',toString(null()))

于 2021-04-26T17:30:13.463 回答