Forum Discussion
Anonymous
3 years agoNot applicable
Extract first n characters if only contains numeric value
There are values in my column that are both numeric and alphabetical. If the first 4 characters are numbers, I must separate them. If not, I must leave the value alone. Please consider the following...
- 3 years ago
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated column.
Expected result CC = VAR _length = LEN ( Data[Column A] ) RETURN IF ( NOT ISERROR ( INT ( LEFT ( Data[Column A], 4 ) ) ), RIGHT ( Data[Column A], _length - 5 ), Data[Column A] )
Jihwan_Kim
Super User
3 years agoHi,
Please check the below picture and the attached pbix file.
It is for creating a calculated column.
Expected result CC =
VAR _length =
LEN ( Data[Column A] )
RETURN
IF (
NOT ISERROR ( INT ( LEFT ( Data[Column A], 4 ) ) ),
RIGHT ( Data[Column A], _length - 5 ),
Data[Column A]
)