Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Analyzing Data with Power BI and Power Pivot for Excel (Alberto Ferrari, Marco Russo) (z-lib.org).pdf
Скачиваний:
11
Добавлен:
14.08.2022
Размер:
18.87 Mб
Скачать

FIGURE 10-13 The result of the ABC class is the calculated column, ABC Class.

Because ABC Class is a calculated column, it is stored inside the database, and you can use it on slicers, filters, and rows or columns to produce interesting reports.

As this example shows, you have the option of storing in the model some complex calculations by using calculated columns and executing them systematically. It takes some time to recognize whether a calculation is better achieved by using a calculated column or a measure, but once you master this, with practice, you will unleash the power of calculated columns.

Note

You can find more information on ABC analysis at

http://en.wikipedia.org/wiki/ABC_analysis.

Conclusions

In this chapter, we moved one step forward from standard relationships by analyzing some segmentation techniques that made extensive usage of the DAX language. The important points in this chapter are as follows:

Calculated columns can be used to create relationships by building calculated relationships. The power of calculated relationships is that you can base the relationship on any kind of calculation, not only simple joins based on equality, like the ones supported by the engine out of the box.

If the relationship cannot be created because it is dynamic, because it depends on the filter and slicers used in the report, you may be able to

leverage virtual relationships. Virtual relationships appear like standard relationships to the user, but they are computed on the fly. Performance can potentially suffer, but the flexibility you gain is well worth it.

Calculated columns are a great addition to the modeling feature of a Tabular solution. Using calculated columns, you can perform very complex segmentation with a few calculated columns that are computed at model refresh time. Thus, they are a marriage between speed and flexibility that let you create extremely powerful models.

We hope that these few examples helped you gain a new perspective on how a little creativity can aid you in building great models.