In the DirectQuery mode, no data is imported or copied into Power BI Desktop, and all tables must come from a single database. Due to the nature of the DirectQuery mode, we are not able to create a new table. Currently, we can only use DAX expressions to create calculated columns or measures in this mode.
Calculated columns are limited to being intra-row, as in, they can only refer to values of other columns of the same table, without the use of any aggregate functions. The ability to define a calculated table using a DAX expression isn't supported in DirectQuery mode.
For more details, please refer to https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about#modeling-limitation...