cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mortensenpb Frequent Visitor
Frequent Visitor

Need to use extracted MONTH from a date column along with two other columns to create a primary key

I am trying to create a primary key column from the following data set I am importing from a text file.

 

LocationProd_CDMonthQty
BLDV11029255692120.47
BLDV110302556915186.25
BLDV11036255693358.22
BLDV11043255691434.15
BLDV11127255691916.13

 

[Month] is a serial number corresponding to a date in 1970 but that is irrelevant to me so I have an import step that extracts just the month from from [Month] (the value is 8).

 

Capture.JPG

 

I want to use the combination of [Prod_CD], [Location], and Extract of [Month] to create a primary key.  I created a custom column with the following formula:

 

[Prod_CD]&[Location]&[Month]

 

This produces an error for the entire column.  The result I am looking to get is (for the first row) "12029BLDV8".

1 ACCEPTED SOLUTION

Accepted Solutions
mortensenpb Frequent Visitor
Frequent Visitor

Re: Need to use extracted MONTH from a date column along with two other columns to create a primary

Adding another step transforming the extracted month into text fixed the issue.

2 REPLIES 2
Super User
Super User

Re: Need to use extracted MONTH from a date column along with two other columns to create a primary

@mortensenpb what error did you get when you created custom column ? make sure column is of type Text.

mortensenpb Frequent Visitor
Frequent Visitor

Re: Need to use extracted MONTH from a date column along with two other columns to create a primary

Adding another step transforming the extracted month into text fixed the issue.