Need help with linkmember in calculated member

  • Hello i need some help with my mdx query.

    I have a time dimension with 2 role playing dimensions started_date and ended_date

    I have read about linkmembers and i can get it to work but the result is not what i expect.

    My table is something like this

    (dd.mm.yyyy)

    createdate - started date - ended date- id

    04.01.2010 - 05.01.2010- 31.01.2010- 1

    04.01.2010- 05.01.2010- 15.02.2010- 2

    04.01.2010- 06.01.2010- 3

    04.01.2010- 4

    My time dimension has this hierarchy

    Year - month - date

    finished

    I have created a member

    measures.Finished

    (linkmember([createTime].[hierarchy].currentmember,finishedTime.hierarchy),measures.casecount)

    measures.started

    (linkmember([CreateTime].[hierarchy].currentmember,startedTime.hierarchy),measures.casecount)

    When i browse the members i will only have the correct value on year level.

    If i go down to the month level i can only see the finished for month January

    Like this

    monthcasecountstartedfinished

    January431

    I'm trying to get this, using createtime dimension on rows.

    monthcasecountstartedfinished

    January431

    February1

    If i go down to the date level i can only see casecount.

    I hope someone can guide me in the right direction, perhaps linkmember is not the right way.

    Thanks in advance.

    -Anders

  • I have found a solution to my problem.

    instead of this mdx in the calculated member

    measures.Finished

    (linkmember([createTime].[hierarchy].currentmember,finishedTime.hierarchy),measures.casecount)

    i wrote this

    ([measures].[casecount],[Createtime].[hierarchy].[all],linkmember([createtime].[hierarchy].currentmember,[finishedtime].[hierarchy]))

    That did the trick for me.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply