Hierarchy Filter Size

I have a table containing categories. Categories can be high-level and independent, or they can be a subcategory:

MyCategory
  MyCategoryId Int  -- PK
  Name Character Varying 50  -- descriptive "Name" of the category
  ...
  MyParentCategoryId Int NULL  -- Self-referencing PK, NULL means root level
  ...

This is referenced by a massive table MyFacts:

MyFacts
  ...
  MyCategoryId Int  -- Foreign Key
  ...

Note that there are only two levels for a category: root (parent) and leaf (parent points to parent.

I make a cube from it, and MyFacts as my arguments and MyCategory as a dimension.

Let stat with this in the category table:

  (1, 'Red', NULL)
  (2, 'Green', NULL)
  (3, 'Tomato', 1)
  (4, 'Strawbery, 1)
  (5, 'Cucumber, 2)

Categories will be displayed as multiple lists in the user interface, but I want it to be accessible through direct connections or even web controls for cubes.

: "" "" , "" "". ,

,

, . /, , , , "" "?", SQL .

, ? MDX Descendants(), , , . , , Client X, "Red" "Strawberry", "Red", "Strawberry" "Tomato" - .

+4
1

, ,

e.g.
[Model and Manufacturer].[Manufacturer].&[1002]
[Model and Manufacturer].[Manufacturer].[Apple]
0

Source: https://habr.com/ru/post/1656913/


All Articles