Sometimes when using DCWizard to build a table from an Excel sheet and I am using the Variable wizard and I click Next after choosing the key/code, I get the following error: "Field type of 'Dimension' does not match the field type of 'Code'". Why is this happening?
You get this error when the field type in your fact table sheet doesn't match the field type in your dimension sheet.
With Excel it is very difficult to determine what the field types are of fields. If your numeric fields contain non-numeric characters, e.g. NA, the dimension columns of your fact table sheet are considered to be text fields and to be considered dimensions. This causes an error because there is no NA in the Code column of your dimension sheet. I don't know why this Excel document gives an error for Citizenship and not Immigration. Beyond 20/20 has found in the past that Excel is very unreliable with determining field types.
If you are able to instead use an actual database to store your data it would be easier to make sure that your Code column in your dimension table matches the Dimension column in your fact table.