Quantcast
Channel: All Power Query posts
Viewing all articles
Browse latest Browse all 122266

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

$
0
0

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".


Viewing all articles
Browse latest Browse all 122266

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>