Verifying the fixed issues


The starting point is the the optimized version 1 (v1) of the model Contoso 1M - currency conversion optimized in the Sample Walkthrough workspace.

Choosing a sample model in Dax Optimizer

The Overview page now shows 3 open issues instead of 12 issues.

Issues in Dax Optimizer - Overview page

NOTE: If you are following this guide by only reading it and confronting with pre-defined models without actually loading a fixed model, you now have to switch to the version 2 of the model, v2.

The relevance of the open issues is much smaller than before. It is actually invisible in the chart, because it is a tiny fraction of the relevance of the measures without issues in the model. The open issues still have an impact on CPU and RAM, but their low relevance means that they are not used much in the model. The relevance is also related to the frequency of use of a measure by other measures.

To better understand this concept look at the Measures page.

Issues in Dax Optimizer

The Margin Currency measure has two open issues, but their relevance is now below the Sales Amount, which has no issues. This situation is different from the first version of the model, where Sales Amount was the most expensive measure of the model.

However, you changed the code of Margin Currency, Sales Currency, and Total Cost Currency, but they are still reported with issues open.

The Issues page shows that the Context transition in iterator issue is still open for these measures.

Issues in Dax Optimizer

You can now verify the issues reported for Margin Currency.

Issues in Dax Optimizer

There are two issues related to the Context transition in iterator because you did not remove the SUMX iterator from the measure. However, its granularity has been reduced by using the unique combinations of Sales[Currency Code] and Date[Date] instead of all the rows of the Sales table.

Therefore, you can mark these two issues as Ignored, which means that they will not be analyzed again in the future, unless their code changes.

Issues in Dax Optimizer

Returning to the Issues page, all the Context transition in iterator issues for Margin Currency are now ignored. You can do the same for Sales Currency and Total Cost Currency by clicking the corresponding Ignored icon.

Ignored issues in Dax Optimizer

By skipping the ignored issues, there are only three other issues to consider, which belong to the Refund Amount and Margin % measures.

Once again, it is important to remember that the decision to continue the optimization might not provide a significant improvement in the performance of the model. However, an issue that is not relevant today might be important in the future, when the model will be used differently.

For educational purposes, let’s fix the remaining issues.

The Refund Amount measure has two issues.

Issues in Dax Optimizer

The fix is similar to the ones done before:

Refund Amount = 
CALCULATE (
    [Raw Amount],
    KEEPFILTERS ( Sales[Quantity] < 0 )
)

You can now mark these issues as fixed.

Issues in Dax Optimizer

The Margin % measure has the same issue already solved for the Margin Currency % measure.

Issues in Dax Optimizer

You can modify the measure by using DIVIDE instead of IFERROR:

DIVIDE ( [Margin Currency], [Sales Currency], BLANK() )

Now, all the issues have been either ignored or fixed.

Issues in Dax Optimizer

The overview page now shows that the model has no more open issues. However, the Unverified badge remembers that we should still verify the fixed issues.

Issues in Dax Optimizer

You can now validate the last measure we fixed.

The final state of the fixed measures is available in version 2 (v2) of the model Contoso 1M - currency conversion optimized.

The last step of this walkthrough is to verify the final version.

Last update: May 18, 2024