November 13, 2013 at 10:55 am
Hi All
This must be a seriously stupid question for people well versed in Dimensions and Hierarchies so I hope to get a quick answer. 🙂
I have a simple Dimension called DimTagInstance which has 3 Attributes (Id, Site Id, Latitude, Longitude). I would like to be able to access the Value of the other Attributes when I am in the context of another one.
I have written the following query but it returns All for the Value.
WITH MEMBER
Measures.Latitude AS
[DimTagInstance].[Latitude].CURRENTMEMBER.Name
SELECT
{[Measures].[Count], Measures.Latitude} ON 0,
{[DimTagInstance].[Site Id].[Site Id]} ON 1
FROM
[Cube]
Any help would be great.
Cheers
Ludo
November 14, 2013 at 3:50 am
It will show "All" because in your query you are specifying a different member.
So in the context of [DimTagInstance].[Site Id].[Site Id] the calculation [DimTagInstance].[Latitude].CURRENTMEMBER.Name will return "All" because you are not including the [DimTagInstance].[Latitude] members in the query. If you did something like
WITH MEMBER
Measures.Latitude AS
[DimTagInstance].[Latitude].CURRENTMEMBER.Name
SELECT
{[Measures].[Count], Measures.Latitude} ON 0,
{[DimTagInstance].[Site Id].[Site Id]} ON 1
FROM
[Cube]
WHERE
[DimTagInstance].[Latitude].&[b]whatever[/b]
Then it would display the value of whatever.
CURRENTMEMBER is contextual to whatever query you are running so the fact that it displays "All" in your query is correct behaviour.
I hope that helps 🙂
November 14, 2013 at 5:18 am
Hi Paul
I managed to do it by using the Properties. Instead of using the "Site Id" I have used the Id which is the Key and called the "Location" Property.
Thanks for your help!!
Cheers
Ludo
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply