Previous and subsequent periods

If we want to carry out calculations in previous or the next period in relation to the current date, should use “PREVIOUS” and “NEXT” Time Intelligence function. They allow aggregation of data, usually the column that contains the quantity or amount of sales, compared to the previous year, quarter, month or day, as well as in relation to the next year, quarter, month or day. In the example below you will see how to utilize this class of DAX functions.

Time Intelligence DAX functions

DAX has a variety of functions for working with date and time which do not differ much from similar traditional Excel functions. Time Intelligence functions, on the other hand, are a special group of DAX functions that enable calculations in accordance with time periods: years, quarters, months and days. These periods are used as special filters that allow achieving of the results that we quite hardly get by using traditional calculation methods.

Query Editor

When you use Power Query to retrieve data often need to be “purified” before they can continue to be used in the reports. For this purpose you can use a tool called Query Editor. It opens in a separate window, just like Data model, with its own ribbon menus that have a multitude of options for data processing. The following text will be talking about some basic options that allow transformation of data.

Advanced Data model options

In addition to options we use on daily basis Data model has some advanced options too. With them, we can define the perspective view on the table. Also, we can determine the behavior of columns when they are dragged in the Pivot Table, as well as to set additional attributes table that can be used when creating reports. Finally, it is possible to make one or more synonyms for each column, which later makes it easier to search the model.

DAX and relationships

In one of the earlier recipes was discussed about Data model, tables that we’re adding to it and relationships between them. This relationships are not very useful when when we’re writing DAX expressions. If we wan to use, as a formula argument, column from related column you should somehow emphasize it. This is done by using functions RELATED and RELATEDTABLE, and about which you can read more in the following text …