Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

1313


Chapter 58: Creating and Deploying BI Semantic Models


58



  1. Scroll all the way to the right until you see a blank column with Add Column as the
    column header.

  2. Click the header of the column named Add Column.

  3. Position the mouse cursor inside the formula bar and type
    =RELATED(DimProductSubcategory[EnglishProductSubcategoryName])
    and press ENTER.

  4. Rename the column to ProductSubcategory.

  5. Click the new blank column that was added to the right.

  6. Position the mouse cursor on the formula bar and type
    =RELATED(DimProductCategory[EnglishProductCategoryName])and
    press ENTER.

  7. Rename the column to ProductCategory.


So far you populated two new columns in the DimProduct table with the
EnglishProductSubcategoryName of the DimProductSubcategory table and the
EnglishProductCategoryName of the DimProductCategory table. As you can see,
the related()DAX function works similar to the vlookup()Excel function.

Now that you have a fl attened table with all levels of the hierarchy represented, you can
proceed and create the Product Drilldown hierarchy from the DimProduct table by follow-
ing these steps:


  1. Click the Diagram View to switch to the graphical representation of your BI
    Semantic Model.

  2. Select the DimProduct table and click on the Create Hierarchy option on the top
    right of the table as shown in Figure 58-13.


FIGURE 58-13
Create Hierarchy icon.


  1. Rename the new user hierarchy to Product Drilldown.

  2. Locate and right-click the ProductCategory attribute of the DimProduct table.
    Select Add to Hierarchy ➪ Product Drilldown.


c58.indd 1313c58.indd 1313 7/31/2012 10:36:03 AM7/31/2012 10:36:03 AM


http://www.it-ebooks.info
Free download pdf