-1

Firstly gonna show you example. We've got a fact table with some id, which is not primary key. Also we have dimension with all ids from fact table and names for that. Our id from fact table is a measure with aggregation function max. Is it possible to create calculated member, which will show name from our dimension using id from fact table? I know that it could be solved using rn and that structure:

Dimension.Hierahchy.Level.Item (meadures.rn).name

But is it possible to solve this another way?

We need to get key for number from measure. Something like that

Dimension.Hierahchy.Level.&[value of measures.maxid]
whytheq
  • 34,466
  • 65
  • 172
  • 267
  • Did my answer help you find a solution to your problem? – whytheq Jan 02 '16 at 12:51
  • I've solved it another way - I'd changed my id to dynamically created row number, cause I had just 128 unique ids. Then I'd created calculated member, chat retur name useing mdx row number (which I had replaced with my id). – Dmitriy Kravchuk Jan 11 '16 at 17:56

1 Answers1

1

In mdx you can easily extract a maximum key of a set of members.

MAX(
Dimension.Hierahchy.Level.MEMBERS,
Dimension.Hierahchy.CurrentMember.MEMBERKEY
)

(the above is total guesswork as your current question does not include any example of mdx that you have already tried)

GregGalloway
  • 11,355
  • 3
  • 16
  • 47
whytheq
  • 34,466
  • 65
  • 172
  • 267
  • I've realised first example with items, but want to realise second where member name from dimension is generated by key from measure. I'm sorry for bad explanation. Example: fact table has id 100 for first row. There is name 'mn' in dimension with key 100. Is it possible to calculate member cube which is show name 'mn" from dimension using id from meadure for key to get name? – Dmitriy Kravchuk Nov 11 '15 at 19:28
  • @Joger sorry I am lost. – whytheq Nov 11 '15 at 23:31