Press "Enter" to skip to content

Avoiding Time Intelligence DAX Functions in DirectQuery Mode

Marco Russo and Alberto Ferrari skip the slow stuff:

Calculations that use the DAX time intelligence functions mostly retrieve data at the day level, performing the required aggregations in the formula engine. By avoiding time intelligence DAX functions, you can force DAX to produce more optimized queries for your specific calculations.

DirectQuery over SQL and VertiPaq require the same patterns to optimize time intelligence calculations, even though the reasons are different. In VertiPaq, we try to stay away from DAX time intelligence functions to avoid large materialization at the day level. With SQL, materialization does not always happen because Tabular tries to push the grouping down to SQL. Still, time intelligence calculations often result in complex queries, and it is better to avoid the complexity by using simpler DAX code.

Check out the performance difference.

2 Comments

  1. Hi_world
    Hi_world2024-02-17

    Hello,
    Did you test what you say in another blog ? or do you have a link when I can find detail about this optimization ?
    Thank you and best regards

    • Kevin Feasel
      Kevin Feasel2024-02-17

      Marco and Alberto have the tests in their blog post that I’ve linked here.

Comments are closed.