![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have created a cube as under:- Measures--------> Quantity Amount Articles Countries How can I create a MDX Query to show above in Hierarchical way (Indented). Best Regards, Luqman |
#3
| |||
| |||
|
| WITH |
|
Well, actually that sort of depends on your UI. For example, you can create your own ADOMD / ADOMD.NET UI that will be able to handle the indentation of Articles Countries when you send a MDX query using the descendants function. The descendants function will provide the entire hierarchy broken out, and then your UI can review the cellset members leveldepth property to apply the spacing identation based on the number of levels deep. For example: For spc = 0 to cst.Axes(1).Positions(i).Members(k).LevelDepth - 1 spacer = spacer & " " Next where cst is the ADOMD cellset object, Axes(1) represents the row (vs. column) Positions(i) represents the positioning that you are looping thorugh Members(k) is the list of members (in the above example " Articles" and "Countries") LevelDepth is the property denoting the number of levels deep this member is within the hierarchy in this case, Articles is 1 and Countries is 2 So with that information, the above for loop will add the additional space ( in HTML is a space) i.e. indentation to the view within the UI. |
![]() |
| Thread Tools | |
| Display Modes | |
| |