Reputation: 37
I load a monthly data from a text file every month. In the table, there is a column that has string values with some extra strings with a fixed length. So the column looks like the following:
**OriginalColumn**
String1_XXXXX
String2_XXXXX
...
StringN_XXXXX
I would like to get rid of this extra fixed length string from the original column and I can do that by creating a new column something like:
NewColumn = LEFT(OriginalColumn,LEN(OriginalColumn)-6)
I am looking for a way to create a measure instead of a column. This is because as this is a monthly process that I would like to reduce the manual operation every month to create a new column. If using a measure, only data can be replaced.
Is there any way to do that? I have not found a measure that is working. When I create a measure I always need to wrap a column that has string values with some function such as MAX(SomeColumn). I always thought there should be a better way.
Would somebody kindly advise?
Thanks & Regards, Kyoto
Upvotes: 0
Views: 300
Reputation: 810
No need for a calculated column or a new measure, this can be done in a power query editor to remove the fixed length string from the original column before loading it into your model.
Upvotes: 1