Search code examples
internationalizationformattingssas

Analysis Services database returns oddly formatted numbers on MDX queries


I have a SQL Server 2008 Database server hosting two Analysis services databases. When from the same machine I run a MDX query in SSMS against both of these DBs (e.g. SELECT { [Gender].[M], [Gender].[W] } on 0, { [Area].[Town].[3101000], [Area].[Town].[3152007] } on 1 FROM [Population] WHERE ([Time].[Years].[2005], [Population]) the one query returns a table consisting of floating number values formatted like 123,23 while the other DB returns floating numbers formatted like 123.23

In Visual Studio, measures from both projects are defined as double values, in the source databases values are taken from NUMERIC columns.

I populated these two DBs from two different relational databases (both however share the same collation settings) and also the Visual studio solutions used to deploy the AS DBs were different (still for the second one I just took a copy of my first vs solution and basically only removed some unnecessary dimensions and cubes).

My question is: What are the suspects to look for that can cause the difference in the formatting of MDX results?

  • I already checked the collation settings of the source DBs which seem to be identical
  • I checked for language settings in the AS DB but did not find any suitable setting (did I maybe oversee something)
  • I checked the FormatString properties in the cubes which were unset in both solutions

Any further ideas here?


Solution

  • Is there anything in the "Calculations" tab of the cube in VS/BIDS? You can override format strings for measures there.

    Also, are you setting language in the connection string to SSAS? This is possible, and is used by clients to automatically format numbers in the locale of the user. Seems unlikely if you're running this in in SSMS but I thought I'd ask.