![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have a problem with a dimension relation from my facttable. My facttable contains both values and NULL values in the field which is related to my dimension. The dimension is a Snowflake Schema containing two tables. The problems is that none of my records with null value in the dimension relation field is being displayed. What am I doing wrong? Best regards Henrik Skak Pedersen. |
#3
| |||
| |||
|
|
As I recall you need to do something about it when cleansing in the sql-environment. You have to make a 0 dimension value in your staging / subject and change from null to 0. Circlecapital ? Jeg har været på HR kursus hos jer for nylig sammen med Troels Schmidt... ![]() \Michael V. "Henrik Skak Pedersen" <hsp (AT) circlecapital (DOT) com> skrev i en meddelelse news:%23HUKmnXPEHA.540 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Hi, I have a problem with a dimension relation from my facttable. My facttable contains both values and NULL values in the field which is related to my dimension. The dimension is a Snowflake Schema containing two tables. The problems is that none of my records with null value in the dimension relation field is being displayed. What am I doing wrong? Best regards Henrik Skak Pedersen. |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
To load the cube, AS creates Inner Joins between the fact table and the dimension tables. So all values in the fact table dimension fields, including 0 if you use it, should exist in the dimensional tables to be loaded, otherwise they are |
|
Usually you create a member in the dimension table with a Name such as Not Available or Not Applicable. Then you have the option of updating NULLs in the fact table so that they point to that member, or using a view of the fact table that performs the |
|
HTH, Brian www.geocities.com/brianaltmann/olap.html |
#6
| |||
| |||
|
|
Hi Brian, Thanks very much for you reply. Would you fysically create the record in the dimension table? Regards, Henrik. "Brian Altmann" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:AC3ACA35-3416-4AE6-882C-6A43337B34CF (AT) microsoft (DOT) com... To load the cube, AS creates Inner Joins between the fact table and the dimension tables. So all values in the fact table dimension fields, including 0 if you use it, should exist in the dimensional tables to be loaded, otherwise they are ignored. Usually you create a member in the dimension table with a Name such as Not Available or Not Applicable. Then you have the option of updating NULLs in the fact table so that they point to that member, or using a view of the fact table that performs the replacement. HTH, Brian www.geocities.com/brianaltmann/olap.html |
#7
| |||
| |||
|
#8
| |||
| |||
|
#9
| |||
| |||
|
|
Hi, Thank you all for all your replies. I am not so fond about creating a new record in my dimension table, because then the user would be able to select it in my application. Is there not a way where I can insert the record dynamically using SQL or in the OLAP manager when I process the cube? Henrik. |
#10
| |||
| |||
|
|
Yep. Need to know if the dimension we are talking about here consists of multiple levels - if it does you will need to add a dummy dimension record on all levels. Example of making a dummy dimension at one level: insert into dim1 (dim1code,dim1name) select '0', 'Unknown' where not exists (select '0' from dim1) Looks a bit awkward but it works.... The example above is for making the dimension in the staging area .. afterwards you need to transport it to subject which is the end database for olap - i do it this way: Insert all records from the staging dimension table to the subject dimension table - the subject dimension table has a surrogate key (which I dont' insert - it's just a key counter that is defined at table definition). This surrogate key is then used to map to the fact table instead of the original key code. When filling up the fact table i join to the staging fact and subject dimension table to replace original dimension codes with new surrogate key codes. \Michael V. "Henrik Skak Pedersen" <hsp (AT) circlecapital (DOT) com> skrev i en meddelelse news:uJw8d4jQEHA.368 (AT) TK2MSFTNGP09 (DOT) phx.gbl... Hi, Thank you all for all your replies. I am not so fond about creating a new record in my dimension table, because then the user would be able to select it in my application. Is there not a way where I can insert the record dynamically using SQL or in the OLAP manager when I process the cube? Henrik. |
![]() |
| Thread Tools | |
| Display Modes | |
| |