Search code examples
visual-studiossas-tabularanalysisservices

Reuse model objects among different projects in VS Analysis Services Tabular Project


I'm working in a Visual Studio 2022 solution with different projects for different SSAS Tabular models; those models, have conceptually some parts in common.

I'm asking if:

  • I can reuse (import) objects, such as measures, kpis, calculated and renamed columns etc, from a project to another
  • I can share part of the model between two project

You can think that I have some basic common dimensions, that I wish to reuse in different models, because I don't want to redo common work or increase mainenance effort in modifying such model definitions.


Solution

  • No, a model has to encapsulate everything it in. You can't share measures to other models etc to other models.The SSAS Model should contain the relevant logic to answer to organisations questions. So measures etc are scoped to that model only. So this will mean some duplication of resources/logic across models.

    Normally the Model should sit over a schema in a data warehouse, so objects such as dimensions and fact table are shared at that level.

    You can make a template project that you can re-use to create models. I know for some things like Calendars and Time Intelligence functions it would be great to share base logic between projects, but having a template project is the only way to do this.