Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

MS SQL

Posted Nov 11, 2002

Introduction to SQL Server 2000 Analysis Services: Working with the Cube Editor - Page 10

By William Pearson


I typically style the lowest level in the Date hierarchy as Date; calendar, fiscal, and perhaps other date hierarchies would typically share Date as a common lowest level.

Now let's make a few enhancements to the Customer and Product dimensions. First, let's provide an identifier for our customers that makes them easily isolable. We might learn from interviews with information consumers, for example, that a common desire is to be able to seek information on customers by name, last name first, with account number also readily viewable in the ID. This will require a concatenation of the name information, together with the Account No information (our current dimension level). We will take the following steps to give the information consumers what they want.

41.  Click to highlight the Customer dimension in the cube tree.

42.  Select the Advanced tab in the Properties pane.

43.  Click the Member Names Unique property field.

44.  Ensure that False is selected as the property setpoint from the dropdown selector.

45.  Ensure that the Allow Duplicate Names property is set to True.

The Advanced tab of the Properties pane for the Customer dimension appears as shown in Illustration 43:



Illustration 43: Properties Pane, Advanced Tab, Customer Dimension


46.  Click to highlight the Account No level of the Customer dimension in the cube tree.

47.  Select the Advanced tab in the Properties pane.

48.  Click the Member Names Unique property field.

49.  Ensure that False is selected as the property setpoint from the dropdown selector.

The Advanced tab of the Properties pane for the Account No level appears as shown in Illustration 44:



Illustration 44: Properties Pane, Advanced Tab, Account No Level


50.  Select the Basic tab in the Properties pane for the Account No level.

51.  Click the Member Name Column property.

52.  Type the following into the field:

          "customer"."lname"+', '+"customer"."fname"+' -- '+CStr("customer"."account_num")

The above expression uses the VBA CStr function to convert the account_num field to a string that we are able to concatenate with the last and first names. While many other variations are possible for presentation, the point of the example is to show that such expressions can be accommodated within the Member Name Column field of the Properties pane.

We can easily check the effects of our work by using the Browse feature at the Customer dimension.

53.  Right-click the Customer dimension in the cube tree.

54.  Select Browse from the context menu, as shown below.



Illustration 45: Select Browse from the Context Menu


The Dimension Browser window appears.

55.  Expand the All Customers level to reveal the results of our Member Name Column expression, as partially displayed in Illustration 46.



Illustration 46: Partial View of Expanded All Customer Level


56.   Click the Close button on the Dimension Browser when finished.

57.   Drag the date_accnt_opened column from the customer table onto the Member Properties folder underneath the Account No level.

The Account No level of the Customer dimension appears as shown in Illustration 47:



Illustration 47: Account No Level of the Customer Dimension


The addition of the date to the level member properties will allow us to track the longevity of customer accounts for reporting and browsing purposes.


Page 11: The Cube Editor (Continued)


See All Articles by Columnist William E. Pearson, III




MS SQL Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM


















Thanks for your registration, follow us on our social networks to keep up-to-date