1
votes

i want to ask, if there is some function in MDX language, which returns me a same value in any case..

I created a calculated member, that's indicate how much value was sold on last year. It's work fine. But if I in slicer or filter exclude year value of the last year, i get nothing. Is there any function, that calculate a value with no filter?

For example, I need function like calculate in DAX in power pivot.

Thanks

Edit:

MDX calculated member for [Mat value]:

CREATE MEMBER CURRENTCUBE.[Measures].[MAT value]
 AS SUM([03 Datumy].[MAT].&[MAT],[Measures].[Sales value]), 
FORMAT_STRING = "#,##0.00;-#,##0.00", 
VISIBLE = 1 ,  DISPLAY_FOLDER = 'Sales value' ,  ASSOCIATED_MEASURE_GROUP = '04 Hodnoty'  ;

MDX calculated member for [Mat-1 value]:

CREATE MEMBER CURRENTCUBE.[Measures].[MAT-1 value]
 AS SUM([03 Datumy].[MAT].&[MAT-1],[Measures].[Sales value]), 
FORMAT_STRING = "#,##0.00;-#,##0.00", 
VISIBLE = 1 ,  DISPLAY_FOLDER = 'Sales value' ,  ASSOCIATED_MEASURE_GROUP = '04 Hodnoty'  ;

mat2014 http://www.attanon.eu/mat2014.PNGmat2013 http://www.attanon.eu/mat2013.PNG filters http://www.attanon.eu/filters.PNGall http://www.attanon.eu/allmat.PNG

Edit2:

MAT and MAT-1 is based on column with this value. I have dimension like this: dimension http://www.attanon.eu/dimension.PNG

And data looks that: datumy http://www.attanon.eu/datumy.PNG

Relationship in [03 Datumy]:

relations http://www.attanon.eu/relations.PNG

The mat is calculated in SQL server. Because, i don't have much time to calculate the hiearchy in cube.

1

1 Answers

1
votes

(discussion updates were removed as lack of necessity)

UPDATE to fix an issue:

Since your calculation, that determines months belonging to certain month, based on SQL, you can filter-out Date hierarchy by rewriting MAT-measures with adding [03 Datumy].[Year].[All]:

CREATE MEMBER CURRENTCUBE.[Measures].[MAT value]
 AS ([03 Datumy].[MAT].&[MAT],[03 Datumy].[Year].[All],[Measures].[Sales value]), 
FORMAT_STRING = "#,##0.00;-#,##0.00", 
VISIBLE = 1 ,  DISPLAY_FOLDER = 'Sales value' ,  ASSOCIATED_MEASURE_GROUP = '04 Hodnoty'  ;

and the same for next one:

CREATE MEMBER CURRENTCUBE.[Measures].[MAT-1 value]
 AS ([03 Datumy].[MAT].&[MAT-1],[03 Datumy].[Year].[All],[Measures].[Sales value]), 
FORMAT_STRING = "#,##0.00;-#,##0.00", 
VISIBLE = 1 ,  DISPLAY_FOLDER = 'Sales value' ,  ASSOCIATED_MEASURE_GROUP = '04 Hodnoty'  ;

Actually, it's an equivalent of old SSAS-2000 function .Ignore.