Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
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б
Скачать

information is further used as a filter to perform an analysis of their behavior over time.

You have seen the following important points so far:

A snapshot makes perfect sense when you want to freeze the calculation. In this example, you wanted to focus on customers with a given ranking in one specific month. The snapshot offers you an easy way to do this.

If you need to filter the snapshot date but you don’t want this filter to propagate to the model, you can keep the table unrelated and use INTERSECT to activate the filter on demand.

You can use the snapshot as a tool to compute a filter over the customers. In the example, you wanted to examine the behavior of those customers in other periods of time.

One of the interesting aspects of the transition matrix is that you can use it to compute more complex numbers.

Conclusions

Snapshots are useful tools to reduce the size of a table at the price of granularity. By pre-aggregating data, your formulas will be much faster. In addition, as you have seen with the transition matrix pattern, you open a whole set of analytical possibilities by snapshotting the data. With that said, a snapshot comes with an increased complexity in the model. This chapter explored the following important points:

Snapshots almost always require aggregations other than a simple sum. You must carefully analyze the kind of aggregation you require or, at worst, fully avoid subtotals.

The granularity of snapshots is always different from the granularity of normal fact tables. You must take this into account when building reports, as speed comes with limitations.

You can often avoid derived snapshots if your model is not too large. Use derived snapshots as a last resource if optimizing your DAX code does not lead to acceptable performance.

As you saw with the transition matrix, snapshots open new possibilities in the analysis of data. There are many more possibilities you can explore, depending on the kind of business you need to analyze.

Using snapshots is not easy. This chapter provided some simple and advanced scenarios. We suggest you learn the simple scenarios, spend some time thinking

about how you can benefit from the harder ones, and move slowly through the use of snapshots and transition matrixes. Even seasoned data modelers will find it hard to author some of the code in this chapter. Nevertheless, if needed, transition matrixes are extremely powerful for grabbing insights from your data.