Power BI Calculated Column vs Measure. Which one is more important?
What is a Power BI?
Power BI is a set of software services, applications, and connections that work together to transform disparate data sources into logical, visually engaging, and interactive insights. Your data may be in the form of an Excel spreadsheet or a collection of hybrid data warehouses that are both cloud-based and on-premises. It behaves like an advanced excel file. In the Excel file we can create both columns and measures. But in visualization, we can’t visualize a lot of data in one sheet. So power bi more different than Excel.
Power BI calculated column vs measure
Calculated column
In Power BI, calculated columns and measures are two crucial concepts to grasp. While they appear to be identical at first appearance, they operate in quite different ways. The report refresh level computes a calculated column, while the query refresh level computes a measure. A calculated column, like a measure, is produced using DAX and updates itself as the data model loads, wasting time and resources. Because it is computed as the query refreshes, a measure is unique in that it does not occupy memory or disk space. An aggregate is required for producing measures from a table of data, but it is not required for computed columns.
As an example Total Sales amount is given by addition of Sales amount and Tax amount. It calculated given by
Total Sales Amount = Sales[SalesAmount] + Sales[TaxAmt]
Because the values are kept in your data model, the size of your data model grows and more RAM is consumed.
Measure
Based on the user’s interaction with the report, a measure is calculated on the fly. Measurement results are computed on the fly rather than being loaded during refresh. It makes use of the CPU but does not increase the file size.
As an example Total Sales amount is given by addition of Sales amount and Tax amount. It calculated given by
Total Sales Amount Measure = SUM(Sales[SalesAmount]) + SUM(Sales[TaxAmt])
Because measurements don’t keep their values directly in the data model, it’s reasonable to assume they don’t use any RAM. Instead, because each encounter is analyzed, they should be avoided.
Another instance in which you might prefer to utilize a calculated column over a measure is when you need to do extremely complicated computations. If evaluating a measure takes more than three seconds, it could be a good idea to pre-compute part of its values in a calculated column and then utilize that column in an aggregate.
While Power BI currently allows you to create engaging graphics using only the fields you import from your data sources, adding your own computations to your data model will make your reports immensely more powerful.