Exercise: Add Customer dimension
TimeXtender makes it easy to relate tables and create dimensions. For more detailed information, please see Selecting, Copying, and Relating Tables.
Steps:
Create and Add CustomerName to Customer table
- Select the Customer, Store, and Person tables in the ODX Server and add them to the DSA
- Open Store table in a new window using ctrl-w
- Press F2 on the Name field and type StoreName to rename the field.
- Expand Customer table
- Drag BusinessEntityID from Store table and drop it on StoreID in Customer table to create a relation
- Drag field StoreName from Store table and drop it on the Customer table name to add a conditional lookup field
- Rename StoreName to CustomerName
Note: Video is free of audio
Add PersonName to Person table
- Right click Person table and select Add Field
- Field name = PersonName, Data type = Text, Length = 150
- Right click PersonName and select Field Transformations
- Select Custom value in the Operator box and click Add
- Drag fields FirstName and LastName to the Custom Value SQL box
- Type the text "+ ' ' +" between the Field names to insert a space.
- Click OK
Note: Video is free of audio
Add lookup field to CustomerName
- Drag BusinessEntityID from Person table and drop it on the field PersonID in the Customer table to create a relation.
- Open table Person in a new window (ctrl-w) and expand it
- Expand table Customer and the Conditional Lookup Field CustomerName
- Drag the field PersonName and drop it on the Lookup Fields node beneath the CustomerName field. This will create an additional Lookup Field for CustomerName
- Right click the Conditional Lookup Field CustomerName and select Edit Conditional Lookup
- In the Multiple Lookup Fields drop-down box select Take the first non-empty value
- Drag the Customer table from the DSA to the Tables node in the MDW
- Deploy and Execute the project using option Only modified tables and views.
Note: Video is free of audio