How can I return the level value values ​​in an MDX query?

I defined the size in a schematic file containing multiple levels. One of my levels contains several properties, for example:

<Level name="MyLevel" column="MyLevelColumn" nameColumn="MyLevelName">
    <Property name="Property1" column="PropertyColumn1"/>
    <Property name="Property2" column="PropertyColumn2"/>
    <Property name="Property3" column="PropertyColumn3"/>
    <Property name="Property4" column="PropertyColumn4"/>
</Level>

      

How can I return the values ​​of these properties as well as the values ​​of the measures I defined in the Schema file?

Note. I don't want to use these filters to filter my results in an MDX query, so if there is a better way to get the data I want, please let me know! Thanks!

+1


a source to share


1 answer


I don't know about Pentaho (couldn't find MDX docs in a quick search on their site), but in SSAS, you can do the following:



WITH
MEMBER [Measures].[Property1] AS 
    ([MyDim].[MyLevel].CurrentMember.Properties("Property1"))
SELECT
    {[Measures].[Property1], [Measures].[Amount]}
ON COLUMNS,
    {[MyDim].[MyLevel].MEMBERS}
ON ROWS
FROM [Cube]

      

+4


a source







All Articles