INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

MDX format string does not deliver desired format

MDX format string does not deliver desired format

(OP)
SSAS 2005. Herewith please see the cut down MDX code. The first section creates two measures and sets the format as #,#.
The second creates the logic for "DisplayTriangle" within a scope. The third, fourth and fifth sections are scopes where one of the measures is altered depending on the scope in which the users navigates. All formatted okay (requirement for format as #,#), except for the fifth section (where the scope is "triangulation"). I suspect this is because I am multiplying with "DisplayTriangle", but you will see that even that measure has a defined format string of #,#. How can I enforce the required format #,# to apply to the fifth section of the MDX?

I have now run out of ideas on how to correct this. Any ideas?

1:

CODE

CREATE MEMBER CURRENTCUBE.[MEASURES].[ClmGrsPaidIndemOrig]
  AS NULL, FORMAT_STRING = "#,#", VISIBLE = 1;    

CREATE MEMBER CURRENTCUBE.[MEASURES].[DisplayTriangle]
  AS NULL, FORMAT_STRING = "#,#", VISIBLE = 0;

2:

CODE

SCOPE([Triangulation].[ProcessingYear].[All].Children);
[MEASURES].[DisplayTriangle] =
    IIF( [Year Of Account].[YearOfAccount].CurrentMember.Properties("KEY", TYPED) - 1 +
        [Triangulation].[ProcessingMonthNumber].CurrentMember.Properties("KEY", TYPED) / 12
        <= VBA!Year(VBA!Now()),
        1, NULL);
END SCOPE;

3:

CODE

SCOPE([Aggregation Type].[AggregationType].&[Period]);     
    [MEASURES].[ClmGrsPaidIndemOrig] =
        Sum(Descendants([X Conv Granularity].[Dim Ccy Conv Granularity].CurrentMember, , LEAVES)
            , [Measures].[GrsPaidIndemYPROrig] *
            ([MEASURES].[Conversion Rate], [Currency Conversion Type].[CurrencyConvType].CurrentMember)
            );
END SCOPE;  

4:

CODE

SCOPE([Aggregation Type].[AggregationType].&[Accumulation]);     
    [MEASURES].[ClmGrsPaidIndemOrig] =
        Sum ( {NULL : [Date Transaction].[DateTransaction].CurrentMember},
        Sum(Descendants([X Conv Granularity].[Dim Ccy Conv Granularity].CurrentMember, , LEAVES)
            , [Measures].[GrsPaidIndemYPROrig] *
            ([MEASURES].[Conversion Rate], [Currency Conversion Type].[CurrencyConvType].CurrentMember)
            ));
END SCOPE;   

5:

CODE

SCOPE([Aggregation Type].[AggregationType].&[Triangulation]);     
    [MEASURES].[ClmGrsPaidIndemOrig] = [Measures].[DisplayTriangle] *
        Sum ( {NULL : [Triangulation].[Triangulation].CurrentMember},
          Sum(Descendants([X Conv Granularity].[Dim Ccy Conv Granularity].CurrentMember, , LEAVES)
            , [Measures].[GrsPaidIndemYPROrig] *
            ([MEASURES].[Conversion Rate], [Currency Conversion Type].[CurrencyConvType].CurrentMember)
            )
          );  
END SCOPE;


 

EO
Hertfordshire, England

RE: MDX format string does not deliver desired format

Try placing the Scop on your Measure as this is the value that you really are calculating based on dimensional choices.  Something like:

CODE

SCOPE([MEASURES].[ClmGrsPaidIndemOrig]);
[Triangulation].[ProcessingYear].[All] = NULL;
[Aggregation Type].[AggregationType].[Period] = NULL;
[Aggregation Type].[AggregationType].[Accumulation] = NULL;
[Aggregation Type].[AggregationType].[Triangulation] = NULL;

[Aggregation Type].[AggregationType].[Period] =
        Sum(Descendants([X Conv Granularity].[Dim Ccy Conv Granularity].CurrentMember, , LEAVES)
            , [Measures].[GrsPaidIndemYPROrig] *
            ([MEASURES].[Conversion Rate], [Currency Conversion Type].[CurrencyConvType].CurrentMember)
            );
...
...
...

End Scope;

Simply define the formula for each dimension member.  You also need to apply it to the ALL level to make sure that your aggregates are accurate at that level as well.  As you add claclulations to the the levels you set to Null in the begining they will override the Null value.

Obviously I have no way of testing but I followed the way all of my conditional calculations are built.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close