Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / database / SQL-Server

Hide Hierarchy levels under Granularity level in Role-Played Dimension

0.00/5 (No votes)
11 May 2010CPOL 8.3K  
There is no way to show hierarchy level in one dimension of one cube and to hide that hierarchy level in the same dimension (role-played dimension) of the same or other cube. Solution is to add additional hierarchy without levels to hide to this dimension.For example,There is dimension...

There is no way to show hierarchy level in one dimension of one cube and to hide that hierarchy level in the same dimension (role-played dimension) of the same or other cube. Solution is to add additional hierarchy without levels to hide to this dimension.



For example,


There is dimension 'Till' in database with hierarchy 'Tills' with structure of Till->Site->Group. And there is the cube 'Sales' that contains that dimension. Granularity level is 'Till'. Everything is good.


But there is one also cube 'StockOnHand' that contains that dimension under 'Site' name. Granularity level is 'Site', because goods are not stored in Tills. Leaf 'Till' in 'Tills' hierarchy are useless, so it would be good from user experiences point to hide this leaf.


Solutions is:



    • Edit 'Till' dimension of database: add new hierarchy 'Sites' with structure 'Site->Group' (there is no 'Till' level).

    • Edit 'Till' dimension of 'Sales' cube: make 'Sites' hierarchy unvisible (set 'visisble' property to false)

    • Edit 'Site' dimension (role-played one of 'Till' database dimension) of 'StockOnHand' cube: make 'Tills' hierarchy unvisible.

    • Deploy


Result: you hid Hierarchy levels under Granularity level in Role-Played dimension.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)