You upgrade to SQL Server 2017. When you run any of your existing Data Analysis Expressions (DAX) queries in SQL Server 2017, you may notice a significant decrease in performance. The decrease in performance scales with the size of the DAX query after all the measures have been replaced with their corresponding expressions.
This fix is included in the following update for SQL Server:
Note This fix limits costly analysis only to queries that contain virtual objects such as query scope columns.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.