Espo
Espo

Reputation: 41929

Rounding of calculated measure in MDX

How can i round a calculated mdx measure up to the nearest integer without having Excel on the server? The Excel-function is CEILING(number, significance), but it is not possible to install Excel on the production ssas-server.

Upvotes: 6

Views: 17242

Answers (2)

Igor Krupitsky
Igor Krupitsky

Reputation: 885

For the Floor function try Int function like:

Int([Measures].[Store Sales])

For the Ceiling function try Int + 1

IIF(([Measures].[Store Sales]) - Int([Measures].[Store Sales]) = 0, [Measures].[Store Sales], Int([Measures].[Store Sales]) + 1)

Upvotes: 2

Magnus Smith
Magnus Smith

Reputation: 5963

If this is a Microsoft situation, you can use any VBA functions in your MDX to fiddle with strings or numbers. So Round(xxxxxx, 2) would work.

Upvotes: 8

Related Questions