Introduction xxv
Chapter 11—Math & Trig Functions This is the final chapter dealing with DAX
functions and formulas. It deals with the Math & Trig functions. However, you won’t
find any trigonometric functions, as such—expect these to appear in a later version
of PowerPivot for Excel. Some of the functions, for example, EXP() and LN(), are
probably for specialized use only. However, many of the others are going to be very
popular—particularly, the eight functions devoted to rounding numbers. SUM() and
SUMX() are Math & Trig functions, although they have much in common with the
Statistical functions as well. They were both covered in an earlier chapter on aggregate
functions (that is, Statistical functions with SUM() and SUMX()), but are mentioned
here again for completeness. In any case, SUMX() is worth a second look, as it’s going
to be very useful in many BI situations.
Part III: PowerPivot and DAX Applied
Chapter 12—A Few Ideas: PowerPivot and DAX Solutions The real world is
the real world. Software, and books about software, can only give you “out-of-the-box”
solutions easily. Real-world solutions require a bit more work. This chapter presents
a few ideas for moving beyond “out-of-the-box” answers. It is all about implementing
PowerPivot and DAX to deal with common business problems. The three appendixes
that follow this chapter have a narrower focus: how to write SQL, MDX, and DMX
queries for assembling data in your PowerPivot model. In contrast, this chapter is more
concerned with using DAX and the PowerPivot GUI to provide solutions, once you
already have the data in place. That said, there is a little on importing data to address
the problem of working effectively with dates and dealing with self-joins.
Working with dates can lead to a number of problems—some of these are addressed
here. There are also a few “classic” BI solutions in this chapter—percentage of total and
subtotal, running totals, changes over time, moving averages, suppressing totals for non-
additive numbers, dealing with semi-additive numbers, customizing DAX formulas for
individual rows or columns, predefining filters, predefining Column Labels and Row
Labels with named sets, working without pivot tables, sharing your pivot reports with
others through SharePoint, and a few other things.
Part IV: Appendixes: Queries for PowerPivot
Appendix A—SQL Queries for PowerPivot This is a short appendix. It’s aimed
at those readers who need a brief introduction to SQL, with some basic syntax
examples. We also discuss the reasons for writing your own queries to import data into
PowerPivot, rather than simply importing complete tables. A few query fundamentals
are covered: filtering, sorting, grouping, and denormalizing data with joins and self-joins.
There are also examples of using a stored procedure and writing SQL against Excel.