Analysis Services Question

  • Hi, I am new to sql analysis services and learning the cubes.

    Here is my question, How do I select the primary key of dimension table as one of my dimension attribute?  I noticed that when I browse the cube, I see all the columns from the dimension table except the key column. I want to use this column as a filter of my cube. Please advice.

    Thanks in advance.

  • Well for starters I would say that you should have a surrogate key as your primary key, rather than what I'm guessing is the primary key from your production system as the key in your data warehouse.

    As for how to get it to show as an attribute, it should just show as an attribute, typically with the auto-prettied name that Analysis Services gives the dimension. Also make sure the attribute is set as visible by setting the AttributeHierarchyVisible = True.

    Hope that helps,

    Rick


    Rick Todd

  • Hi Prasad,

    If you've built the dimension using the wizard then AS kindly uses the PK of the dim as the Key attribute for the dim but sets the Name property to be the name field/column you selected during the wizard step thru. So for e.g. if you've got a dim table with Customer_ID & Customer_Name and you told AS that Customer+ID was the key attribute, you're likely to have selected Customer_Name as the Display name. After building the dim, you should have a key attribute that reflects the dim name, has it's source set to the Customer_ID and it's Name property set to Customer_Name.

    HTH

    Steve.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply