If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Creating virtual dimension with unique values from a fact table

Started by jps, 27 Nov 2008 09:37:35 AM

Previous topic - Next topic

jps

Hi,

I have fact table in database as below

Column 1 : Identifier
Column2 : Measure
Column 3: Attribute 1
Column 4: Attribute 2

I want to model star schema out of this fact table as below.

Fact
-----
Identifier
Measure
Attibute 1 >> FK

DIM
-----

Attribute 1 >> PK
Attribute 2


Link Fact and DIM using Attribute 1. (1 to many relation)

Now, how do I ensure that only unique values for Attribute 1 are fetched from  the fact table?

Regards
JPS

blom0344

Your fact should contain merely keys (identifiers) that act as FK's for the dimension. Your exercise seems a bit academic, but creating a virtual dimension is possible by selecting the distinct set of 
Attribute1 -- Attribute 2,

like:


SELECT DISTINCT AT1,AT2 FROM FACT