Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rounding of calculated measure in MDX

Tags:

rounding

ssas

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.

like image 524
Espo Avatar asked Jun 04 '10 12:06

Espo


2 Answers

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.

like image 189
Magnus Smith Avatar answered Oct 27 '22 04:10

Magnus Smith


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)
like image 40
Igor Krupitsky Avatar answered Oct 27 '22 02:10

Igor Krupitsky