Search code examples
sql-serversql-server-2012ssas

SSAS - How to hide branches without leaf from a dimension?


I'm working on a SSAS project. I created a DimGeography dimension to represent Country > Region > Department > City > Store as a Tree. It works well ! However, my tree display all branches without stores.

enter image description here

So after processing my dimension I can browse all elements even if there is no store in a city (or dept/region/country).

enter image description here

Any idea to solve that ?

Thanks !


Solution

  • Instead of separate tables, I would use one view as the base for the dimension with all tables joined together. And if you use inner joins, then the branches without shops would not appear in the view, end hence not in the dimension as well.