Microsoft SQL Server 2008 R2 810-08234 Benutzerhandbuch

Produktcode
810-08234
Seite von 236
 200
 
CHAPTER 10 
Self-Service Analysis with PowerPivot
report, provide a name for the current PivotTable if you want, and then specify the formula 
for the measure, as shown in Figure 10-11 .
FIGURE 10-11 
Measure settings
DAX Functions
The examples shown for a calculated column and a measure are very basic, although repre-
sentative of the common ways that you would use DAX . Table 10-1 lists the types of functions 
that DAX provides:
TABLE 10-1 
DAX Function Types
FUNCTION TYPE
EXAMPLE
DESCRIPTION
Date and time
=WEEKDAY([OrderDate],1)
Returns the number of the weekday 
where Sunday = 1 and Saturday = 7
Filter and value
=FILTER(ProductSubcategory, 
[EnglishProductSubcategoryName] 
= "Road Bikes")
Returns a subset of a table based 
on the filter expression
Information
=IsNumber([OrderQuantity])
Returns TRUE if the value is numeric 
and FALSE if it is not
Logical
=IF([OrderQuantity]<10,"low", 
IF([OrderQuantity]<100,"medium" 
,"high"))
Returns the second argument’s 
value if the first argument’s condi-
tion is TRUE and otherwise returns 
the third argument’s value
Math and trig
=ROUND([SalesAmount] * 
[DiscountAmount],2)
Returns the value of the first argu-
ment rounded to the number of 
digits specified in second argument