Question

I have an MDX query as follows:

WITH
    MEMBER [MatCode] AS [Product].[Material]

SELECT
([MatCode]) on 0,
([Activity].[ActivityCode].[T-50051151]) ON 1 
FROM
[Cube]

This returns a value such as:

            MatCode
T-50051151  Null

Which tells me it is not joining the activity code to the description when I know they match up

How can I correct my MDX query to join activity code to material?

thanks

Était-ce utile?

La solution

Why not try something like the following to look for areas of the cube with data? You'll can use the WHERE clause to slice by a specific measure in your cube.

SELECT
    {[Activity].[ActivityCode].[T-50051151]} ON 0,
//NON EMPTY //<<include to hide nulls
    {[Product].[Material].members} on 1 
FROM
    [Cube]
WHERE
    ([Measures].[someMeasure])

Autres conseils

Your query returns the _ default _ value / cell for the tuple :

( [Activity].[ActivityCode].[T-50051151], [Product].[Material].defaultMember )

as well as the .defaultMember for every other dimension not mentionned in your query. There is nothing wrong with it.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top