0
votes

This MDX query:

WITH
MEMBER [Measures].[# answered] AS
    ([Dispozice].[Dispozice].[ANSWERED], [Measures].[# hovorů])
SELECT
{[Measures].[# hovorů], [Measures].[# answered]} ON COLUMNS,
CrossJoin([Datum vytvoření.Po dnech].[Rok].[2017], [Dispozice].[Dispozice].Members) ON ROWS
FROM [Hovory]

returns this table:

enter image description here

but I need something like this:

enter image description here

I need to sum measure # hovorů only for those items that has the ANSWERED member of dimension Dispozice. I want to add this as computed measurement which will be used to calculate percantage.

Thank you very much.

1
Have you tried: (existing [Dispozice].[Dispozice].[ANSWERED], [Measures].[# hovorů]) ? I'm not sure if it's supported by Mondrian.Danylo Korostil
@DanyloKorostil There is no existing keyword in mondrian :( ... do you have any suggestions to work around this?Jakub Truneček
I thought it was supported: jira.pentaho.com/browse/MONDRIAN-1180Danylo Korostil
Can you change the cube structure?Danylo Korostil
Yea, I did. It was the easiest way. Thank you anyway.Jakub Truneček

1 Answers

1
votes

I'm guessing just using iif with a null branch is too much hard coding:

WITH
MEMBER [Measures].[# answered] AS
    iif(
      [Dispozice].CURRENTMEMBER IS [Dispozice].[Dispozice].[ANSWERED]
    , [Measures].[# hovorů]
    , NULL
    )