Verifying the fixed issues


The starting point is the the version 1 (v1) of the model Contoso 1M - currency conversion optimized in the Sample Walkthrough workspace. By selecting this version, you see the state of the model at the end of the previous step, after we marked several measures as Fixed.

The Overview page now shows 9 open issues instead of 12 issues we have seen the first time.


The relevance of the open issues is now 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 we can look at the Measures page.


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

However, we 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.


Thus, we verify the issues reported for Margin Currency measure.


In this case, we still have two issues of Context transition in iterator because we did not remove the SUMX iterator from the measure. However, we know that we reduced its granularity by using the unique combinations of Sales[Currency Code] and Date[Date] instead of all the rows of the Sales table. Therefore, we can mark these two issues as Ignored, which means that they will not be analyzed again in the future, unless their code changes.


Going back to the Issues page, we can see that all the Context transition in iterator issues for Margin Currency are now ignored. We can do the same for Sales Currency and Total Cost Currency by clicking the corresponding Ignored icon.


By skipping the ignored issues, we have 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 more important in the future, when the model will be used in a different way. For educational purposes, we see how to fix the remaining issues.

The Refund Amount measure has two issues with the same construct we have already seen in the Sales Amount measure.


Therefore, the fix is similar:

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

We mark these two issues as fixed for the Refund Amount measure.


Finally, the Margin % measure has the same issue we already solved for the Margin Currency % measure.


We 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.


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


We can now validate the last fixed measure we fixed.

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

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