Problem: What are named
calculations and how does they function inside a SSAS Cube.
A named
calculation is a SQL expression represented as a calculated column. This
expression appears and behaves as a column in the table. A named calculation
lets you extend the relational schema of existing tables or views in a data
source view without modifying the tables or views in the underlying data
source. Consider the following examples:
·
Create a single named calculation that is derived
from multiple columns in a fact table (for example, creating Tax Amount by
multiplying a tax rate by a sales price).
·
Construct a user-friendly name for a dimension
member.
·
As a query performance enhancement, create a named
calculation in the DSV instead of creating a calculated member in a cube. Named
calculations are calculated during processing whereas calculated members are
calculated at query time.
Example:
In this example, I would like to show we can create a named
calculation for creating a full name in a dimension.
Step 1:
launch visual studio and open the data source view tab, for more information go
through this article How
to build a cube..
Step 2: Now
go to the employee dimension which has first name and last name members and
right click on the dimension to add new named calculation.
Step 3:
There will be a dialog box for adding expressions to create full name from
first name and last name.
Step 4: build
and deploy the cube and you should see a calculator next to the new member we
added.
Step 5: to
browse the data from the calculated members go to the employee tab and right click to hit explore the data.
Results:
0 comments:
Post a Comment