Search code examples
powerbisql-server-data-toolsazure-analysis-services

Creating a Tabular table based on a query and not a physical table in SSDT


I've created a tabular model in Power BI and now I'd like to create that same model in Azure Analysis Services, using Visual Studio 2017 and SSDT. Some of my tables in my Power BI model have a SQL query as the source and not a physical table or view. However, in SSDT, when I attempt to add a new table to my model I'm not given the choice of entering a SQL query. It seems I have to either select a physical table or a view.

In SSDT is it not possible to add a table to my model based on a SQL query?


Solution

  • On the top menu bar, go to Model then Existing Connections. After this press Open and select the second radio button, "Write a query that will specify the data to import." If you're accessing an object that's not in the database used as the Initial Catalog in the connection string then the three part naming convention (Database.Schema.Table) is necessary.