Quantcast
Channel: Für Entwickler: SQL Server Forum
Viewing all articles
Browse latest Browse all 1772

MDX: get values of the same measure for two different time stamps / diff. dimensions

$
0
0

Hello @all,

I have rather simple MDX query, which returns measure value over time:

SELECT
   [Measures].[myMeasure] ON 0
 , NONEMPTY([TimeDimension1].[Weeks].[Day].MEMBERS,
   [Measures].[myMeasure]) on 1
FROM [myCube]

Cube has another time dimension, let's say [TimeDimension2]. I need to extend my query in the following way: it should return also value of [myMeasure] where [TimeDimension2].[Weeks].[Day] = [TimeDimension1].[Weeks].[Day]. [TimeDimension2] should be a kind of invisible secondary axis.

Here is my question: what is a best way to implement such a requirement? Should I use "WITH MEMBER"? I will appreciate any hint or query sample.

Kind regards from Hamburg/Germany,

Andrey


Viewing all articles
Browse latest Browse all 1772

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>