Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create a percent% value in MDX

Status
Not open for further replies.

fritter

Programmer
Jan 11, 2002
2
BR
i'm using OLAP cube and excel 2000 for pivottable. i want to create a calculated member that shows the percentual of a measure againt the total of this measure. But this value must change on the drag and drop of dimensions on pivottable report. So how this function likes in MDX, there is a sample?
thank's
 
I found. It's very simple see the expression as calculated member in OLAP Enterprise manager:

(100 * [Measures].[Valor] / ([Measures].[Valor], [Hierarquia].[All Hierarquia], [Periodo].[All Periodo]))


so for this measure it is the valor measure by valor measure with sets
 
Hi, fritter.
There is a bug in your formula.
if ([Measures].[Valor] is zero - you will have division by zero.
I really don't know how OLAP will react on this.

The right way to fix it is to use some iif addition to you expression

Have a nice day Issahar
senior software engineer

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top