Building a dataset using the query designer

With the query designer, you can build a dataset by dragging-and-dropping metadata from your cube to the designer. There is no easier way to build a dataset based on a cube than by the drag-and-drop method.

Note

It helps to know the basic data warehouse concepts: schemas, dimensions, facts, and measures.

In a basic cube model, you have facts and dimensions which are attributes that correspond to a particular business process or transaction.

Let's take sales as a business process. The facts in sales are prices and quantities. Facts are usually numeric. On the other hand, dimensions are the context in which the sales transaction happened. In this case, the dimensions are date when the actual sales took place, the product sold, the sales person, and other related attributes.

To fully understand the performance of your sales, you need some kind of metrics; you need to measure the sales by means of aggregation (sum, average, and so on.). These metrics are represented by numeric values called measures.

For our purpose, let's focus on measures and dimensions:

  1. Select the Sales Summary cube from the Cube Selection dialog box. Click on OK.
  2. Select the Sales Territory dimension, and drag it to the designer as shown in the following screenshot:
    Building a dataset using the query designer

    You may notice that it doesn't give you any data except for the three columns: Group, Country, and Region. You may also notice the message in the middle of the designer that says No rows found. Click to execute the query. What we have so far is the context of the Sales Territory, where sales occurred. Now we need the measure:

  3. Expand the Measure metadata. Then expand Sales Summary. Select and drag-and-drop the Sales Amount measure to the designer as shown in the following screenshot:
    Building a dataset using the query designer
  4. Now click on OK in the designer. Going back to the Dataset Properties dialog box, you may notice that the query designer converted the design to a text query. This is the MDX language. Move around metadata in the query designer and pay attention to how that changes the MDX query. This is one way of learning the MDX language.
    Building a dataset using the query designer
  5. Name the dataset dsSalesTerritory. Click on OK when done to close the Dataset Properties dialog box.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.29.105