Using calculation groups to selectively replace measures in DAX expressions
This article describes how to use calculation groups to dynamically replace only a partial expression in a complex DAX calculation.
This article contains a shorter technical description of the requirement and of the solution, and a longer explanation of the reasons why the solution proposed is required and why other approaches may fail. If you are familiar with calculation groups in DAX, you probably only need to read the first part of the article which is short and straight to the point. If calculation groups are relatively new to you, or if you would like to read a more detailed explanation about why this technique is required, then you can also enjoy the second part of the article. That longer section is designed to first make sense of the problem, then of the technique used, and possibly to make you want to know calculation groups better. Ready? Let’s begin!