using Calculated columns for models that retrieve data using DataQuery

ArunRaaman 1,001 Reputation points
2021-07-14T18:33:42.58+00:00

Hello There,
I came across a note-point in SSAS-DAX documentation; the note is as follows:

"Calculated columns are not supported for models that retrieve data from a relational data source using DirectQuery mode".

I tried to find elaboration on the above over internet, but couldn't find anything really helpful. I am beginner in learning DAX in Tabular Mode; Would any one please help me understand about the note point mentioned above.

Thank you for giving your valuable time.

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,297 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarrinWu-MSFT 6,876 Reputation points
    2021-07-15T03:24:18.33+00:00

    Hi @ArunRaaman ,

    Welcome to Microsoft Q&A!

    "Calculated columns are not supported for models that retrieve data from a relational data source using DirectQuery mode".

    Calculated tables are not supported in DirectQuery models, but calculated columns are. If you try to convert a tabular model that contains a calculated table, an error will occur stating that the model cannot contain pasted data. If a DirectQuery model contains calculated items such as calculated columns or calculation groups, after being deployed you must perform a Process Recalc on all tables. Please refer to DirectQuery mode in tabular models to get more information.

    Best regards,
    Carrin


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Darren Gosbell 2,376 Reputation points
    2021-07-15T02:36:33.31+00:00

    So calculated columns are a column that you can add to your data model that is defined using a DAX expression which is evaluated on a row by row basis and stored in the table each time the data is refreshed.

    Direct Query mode is a type of data model where you do not store any data in the model, instead the model generates dynamic SQL queries at runtime to return data to the report. This has the advantage that the data will always be up to date as there is no separate data refresh step, but has the disadvantage that queries may be significantly slower depending on the source system.

    This statement is saying that you cannot use these two features together.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.