As explained in the suggested article, the simplest way is to create a new dimension by selecting parent_id field, then changing the behavior of the field in SSDT (dimension panel) to "Parent". All works well and you can browse a tree. Moreover, when you select a parent node it will include all children.
How to create SSAS dimensions from an Entity with self-referencing association?
-
04-07-2023 - |
Question
I'm working on a SQL Server Analysis Services project to build a multidimentional OLAP cube. I would like to create a tree of dimensions (parent/child) from a SQL Entity intitled "Category" with self-referencing association. The AdventureWorks project from Microsoft works with two entities (Category and a child Subcategory).
I created my categories and I want to create my dimensions (parent/child) like that :
Category A
Category A.1
Category A.1.1
Category A.1.2
Category A.2
Category B
Category B.1
Category B.2
Any idea to do that ? The concept is to be able to browse data by using categories as dimensions.
Thanks !
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow