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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatting a value in mdx

Status
Not open for further replies.

MarkElls

Programmer
Aug 26, 2003
57
0
0
GB
I am creating a claculated member in a cube. This requires the length of services (a figure in days to be converted to months. To do this I am using the arithmeitic as below.

(StrToValue([Company Structure D].CurrentMember.Properties("Days In Business"))*12/365.25)

Now how do I insure this only returns a whole value rather than a decimal ie 10 rather than 10.25

Many thanks.
Mark.
 
if the calc

Code:
(StrToValue([Company Structure D].CurrentMember.Properties("Days In Business"))*12/365.25)

gives your output only with the decimal try applying a format value so you would have
Code:
(StrToValue([Company Structure D].CurrentMember.Properties("Days In Business"))*12/365.25),FORMAT_STRING = '#,###'

if this claculated member is being stored within the cube then you can use the properties panel to control the ouput format.

Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
I have formatted the string in the cube. However when the data is extracted from the cube then we are seeing the unformatted data rather than what we want.

Rather than alter the format I wish to ammend the value that is stored. ie dont format 119.47 but change its value to 119.

Many thanks.
Mark.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top