Simplifying Date Intelligence with DAX and Calculated Tables
In addition to the M query transformations described earlier in this chapter, DAX table functions can also be used in Power BI import mode semantic models to enhance and simplify date intelligence. DAX queries can access existing tables in the semantic model, and the tables evaluated during refresh can be used in relationships and measure calculations like all other tables.
Similar to calculated columns, calculated tables should be rarely used—given the transformation capabilities of M, SQL, and ETL tools—but can be valuable supplements to models for small tables, such as role-playing date dimensions and bridge tables.
This recipe provides an example of using DAX calculated tables to support role-playing date dimensions. Additionally, a single-row table is created via DAX to simplify common date intelligence measures.
Getting ready
To prepare for this recipe, follow these steps:
-
...