Excel 2019 Bible

(singke) #1

Part V: Understanding Power Pivot and Power Query


FIGURE 37.6
Hidden columns are grayed out, and calculated columns have a darker heading.

To unhide columns, select the hidden columns in the Power Pivot window, right-click the selection, and then choose
the Unhide from Client Tools option.

Utilizing DAX to Create Calculated Columns
Data Analysis Expression (DAX) is essentially the formula language Power Pivot uses to
perform calculations within its own construct of tables and columns. The DAX formula lan-
guage comes with its own set of functions. Some of these functions can be used in calcu-
lated columns for row-level calculations, while others are designed to be used in calculated
measures for aggregate operations.

In this section, we’ll touch on some of the DAX functions that can be leveraged in calcu-
lated columns.

There are more than 150 different DAX functions. The examples of DAX demonstrated in this chapter are meant to
give you a sense of how calculated columns and calculated measures work. A full overview of DAX is beyond the
scope of this book. If after reading this chapter you have a desire to learn more about DAX, consider picking up the
book by Alberto Ferrari and Marco Russo called The Definitive Guide to DAX (Microsoft Press, 2015). Ferrari and
Russo provide an excellent overview of DAX that is both easy to understand and comprehensive.

Identifying DAX functions safe for calculated columns
In the previous section, you used the Formula bar within the Power Pivot window to enter
calculations. Next to that Formula bar, you may have noticed the Insert Function button
labeled fx. This is similar to the Insert Function button found in Excel. Clicking this button
will activate the Insert Function dialog box shown in Figure 37.7. This dialog box allows you
to browse, search for, and insert the available DAX functions.
Free download pdf