Microsoft SQL Server 2008 R2 Specifications Page 220

  • Download
  • Add to my manuals
  • Print
  • Page
    / 236
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 219
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 lter 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 rst 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 rst argu-
ment rounded to the number of
digits specied in second argument
Page view 219
1 2 ... 215 216 217 218 219 220 221 222 223 224 225 ... 235 236

Comments to this Manuals

No comments