Database Reference
In-Depth Information
One thing to note in this query is that the cube is called
Model
; as described earlier
in the chapter, this comes from the fact that the file is called
Model.bim
.
As described earlier, tabular models understand and work with MDX, but natively,
it works with the language called DAX.
DAX
is not only the language that you use
when you define the model but also is a query language. As a query language, it
looks very different from other query languages. The following query is an example
of this:
evaluate(
summarize(
DimDate,
DimDate[CalendarYear],
"Sum of Sales",
Sum(FactInternetSales[SalesAmount])
)
)
The preceding query returns the sum of the
SalesAmount
for each
Calen-
darYear
. It uses the main function in DAX called
evaluate
and then it uses the
summarize
function to summarize the
SalesAmount
across the
CalendarYear
.
For more information about the DAX query language, refer to the online book at
ht-
In many cases, you as a developer will not write DAX code manually, but instead,
you will use query tools that issue DAX statements. One such tool is
Power View
,
which is available both in SharePoint as a web client as well as in Excel 2013. To
query a tabular model in Power View in Excel 2013, perform the following steps:
1. Open up Excel 2013 and click on the
DATA
tab.
2. Click on the
From Other Sources
button and select
From Analysis Ser-
vices
.
3. Type in the server name and instance name of Analysis Services that con-
tains your tabular cube and then click on the
Next
button.
4. Select the
FirstCubeTabular
model and the
Model
cube.
5. Click on the
Next
button and then on the
Finish
button.
6. In the next screen, select
Power View Report
and click on
OK
.
Search WWH ::
Custom Search