Monday, February 20, 2012

Questions on translation and naming attribute

Hello I have a few questions regarding the translations.

1. Is it possible to create this neat auto-generated date dimension in any other languages than english?

2. When I use the Currency format string on my autogenerated measure groups they all turn out as $, but when I use it on a calculated member it chooses the correct currency. How can I change this for the auto generated measures?

3. After creating the member, how do you define the deafult member show from the dimension. Say for example that I have DimEmpl(Code, Name). I would like the Name attribute to be the attribute showing by default. I know this is possible while creating the dimension, but what if I want to change it later?

Thanks

// Richard

Hi Richard,

1. Yes, at the bottom of the wizard you can pick the language for the dimension.

2. I don't understand the question.

3. If I understand you correctly, You want show the name instead of the value for the code. To do this you have to choose the NameColumn property for the code hierarchy to be the Name field in the dimension table. Its kinda hard to find, be sure to click the plus sign to specify the type

Hope this helps

David Botzenhart.

|||

When I choose the Currentcy format string for a measure SSAS makes the results like so: "$1,xxx,xxx". Since I'm creating a swedish solution

I need the answers to be "1,xxx,xxx Kr" instead. Where do I set this? If I make a calculated member it works, but not on the auto-generated members.

As for the date-dimension, there's no swedish language in the drop-down-list. Can it be added?

Thanks

// Richard

|||

Here is a blog which explains exactly how to do it: http://sqljunkies.com/WebLog/mosha/archive/2005/10/13/mdx_format_currency.aspx

HTH,

Mosha (http://www.mosha.com/msolap)

|||

2. In BIDS choose the "Cube Structure" tab. Place yourself on the cube and choose properties. In here, you can select at language for the cube. Set it to Swedish and you should be good to go.

3. Is this an issue with your client application? Do you want the name attribute to be used by default when you select the dimension? In that case, what app. are you using?

|||

Thank you both, your posts helped me understand how it works. But unfortunatley, the documentation inclined by your post where I can find the language codes doesn't seem to contain them? Atleast not my Visual Studio documentation, which are you referring to?

Michael, I have the language set to Swedish for the cube. That's part of the problem, it doesn't work.

Mosha, if I find the language code, can I then set it as a calculation for the entire cube in the calculations tab? Something like having the line

Language(CURRENT CUBE) = 'some code' ?

Thanks

|||

You can get the list of LCID codes here: http://msdn2.microsoft.com/en-us/library/ms903928.aspx (although they are listed in HEX, you will need to translate to decimal)

Once you find your code, simply add

LANGUAGE(this) = code;

at the end of your MDX Script. It will apply to the whole cube.

|||

Thanks, but it doesn't work. I still get $'s in my Currency format :(, any ideas?

|||Well - what's the locale of the user connecting to the cube?|||All regional settings in windows are Swedish|||What is the locale ID that you use in this expression ?|||

Hello Mosha. Can we get a list that is not listed in HEX but is translated?

I am from Sweden so I can confirm that SSAS2005 currency format will not change depending on your local regional settings for the O/S. In Excel, or other Office applications and SQL Server 2005, it will but not in SSAS2005.

Your recommendation, on your BLOG, to script this will work, but I have not found the link to the codes until you published it.

A better and translated list of these codes will be much appreciated.

Regards

Thomas Ivarsson

|||

Sweden's locale ID is 1053. The following quick test confirms that Language=1053 does shows currency as Krones, not as dollars

WITH MEMBER Measures.x as 100, format_string='currency', language=1053

SELECT x ON 0 FROM [Adventure Works]

HTH,

Mosha.

|||

I ran this query against my cube now exactly like this:

WITH MEMBER Measures.x as 100, format_string='currency', language=1053

SELECT x ON 0 FROM [BIDM]

and the result was: $100.00

which confirms that the language parameter has no effect on my system then?

|||

Hello again Mosha. Running the same query as you I first get the result $100 instead of SEK.

Changing the currency format, for regional settings, in the control panel, from USD to SEK, do help. New result of your query is 100 SEK.

The problem seems to be that Swedish Currency settings (SEK) is ignored if I have USD in my regional settings.

If I change your language setting, in the query, to 1052 I will get 100 Lek with USD in the regional settings for the O/S.

The only way your example will work with SEK is if we change the O/S regional settings for currency to SEK.

This can be a problem if we have several currencies in a cube.

If regional O/S currency settings is not SEK, SEK will not show up.

This must be a bug?

I am running SP2 CTP2 (November).

Kind regards

Thomas Ivarsson

No comments:

Post a Comment