Avoiding calculated columns when possible
The ability to create calculated columns is one of the most essential and powerful features in DAX. Calculated columns, as the name suggests, are computed based on a formula; therefore, the calculated column values are not available either in the source systems or in the Power Query layer. The values of the calculated columns are computed during the data refresh and then stored in memory. It is important to note that the calculated columns reside in memory unless we unload the whole data model from memory, which in Power BI means when we close the file in Power BI Desktop or switch to other contents in the Power BI service. Calculated columns, after creation, are just like any other columns, so we can use them in other calculated columns, measures, calculate tables, or for filtering the visualization layer. A common approach between developers is to use calculated columns to divide complex equations into smaller chunks. That is precisely the...