Forum Discussion
FrederikAhring
4 years agoFrequent Visitor
Create a calculated column based on string start and length
Hi, i have a bunch of strings (serial numbers) and i want to categorize them accordingly with a new calculated column The lenght is important to me, only if the serial starts with AA. Really hope y...
- Anonymous4 years ago
Hi FrederikAhring ,
You can create a calculated column as below to get it:
Desired output = IF ( LEFT ( 'Table'[Input], 2 ) = "AA", IF ( LEN ( 'Table'[Input] ) <= 6, "AA-Short", "AA-Long" ), BLANK () )Best Regards
- 4 years ago
Thanks a lot Anonymous.
It seems to work perfectly
Anonymous
4 years agoNot applicable
Hi FrederikAhring ,
You can create a calculated column as below to get it:
Desired output =
IF (
LEFT ( 'Table'[Input], 2 ) = "AA",
IF ( LEN ( 'Table'[Input] ) <= 6, "AA-Short", "AA-Long" ),
BLANK ()
)
Best Regards
- FrederikAhring4 years agoFrequent Visitor
Thanks a lot Anonymous.
It seems to work perfectly