What Are Calculated Measures?
Calculated measures are formulas that return results on aggregated data based on the current context.
Calculated measures are evaluated for understanding context-based calculations in real-time. It is evaluated based on the context of the cell—either in a report or a DAX query. This context depends an what the user selects in the report or the current state of the DAX query. For example, using the SUM(Sales[SalesAmount]) function in a measure tells the system to add up all the values that fall under that specific cell.
Because of this, calculated measures aren’t stored in the database. Instead, they’re recalculated every time a user changes filters like rows, columns, or chart axes. Each change updates the context. This slows down response times because the system processes the query in real time. That’s why it’s important to know when to use calculated measures.
When Should Calculated Measures Be Used?
Calculated measures are used when users need calculation results based on their selections. These results are shown in the value area of a pivot table. For instance –
- When they want to calculate profit percentage on a particular selected data.
- When calculating product ratios with filters like year and region applied.
One of the requirements of the DAX language is, they need to define a calculated measure in a table. However, this doesn’t mean that the measure belongs to that particular table. It can easily be moved from one table to another without mislaying its functionality.
How Does Kyvos Use Calculated Measures?
A leading investment bank needed to analyze billions of daily trades across over 200 currencies. They wanted to understand its daily risk exposure accurately and prevent fraudulent activities. They needed a solution for real-time currency conversions and large-scale data processing.
Kyvos resolved the currency conversion problem by using its AI-powered smart aggregation technology. It enabled real-time currency conversions on large datasets. These datasets could be stored in the cloud or on-premises. The platform uses unique technology that supports multi-fact data models. In these models, the currency dimension acts as a fact. Calculated measures are then used to perform currency conversions at runtime.
Once the data model model is created, they can use their BI tool to drag and drop dimensions into their visualization. Users can also select filters and switch currencies on the dashboard and perform analysis on it. For instance, they have created a visualization with three dimensions –
- Transaction id
- Transaction amount
- Amount in reporting currency
The currently applied reporting currency filter is EURO. Now, the user wants to set it to INR and get the transaction amount immediately converted from EURO to INR. Kyvos achieved these on-the-fly conversionsusing calculated measures. Kyvos scheduled automatic incremental builds provision to the needs of changing conversion rates. It also delivers instant responses, even for billions of rows of data.