Showing posts with label members. Show all posts
Showing posts with label members. Show all posts

Sunday, March 11, 2012

B

When I'm viewing a measure spliced by all the members of a particular dimension, I get an error in regards to the member name's characters.

Here's how the error appears in the different clients -

SQL BI Studio:

TITLE: Microsoft Visual Studio

A list of actions for the selected items cannot be obtained because of the following error.
XML parsing failed at line 12, column 62: Illegal xml character.
.
This error may have occurred because the definition for at least one action is not valid. Verify the definition for each action using the Actions view.

ADDITIONAL INFORMATION:

XML parsing failed at line 12, column 62: Illegal xml character.
. (Microsoft SQL Server 2005 Analysis Services)

Reporting Service's VS query builder complains:
Error:
' ', hexadecimal value 0x08, is an invalid character. Line 1, position 94333. (System.Xml)

In SQL Management Studio:
When expanding the dimension's children, a message yields "Error occured

retrieving child nodes, The server sent an unrecognizable response"

3 free bugs for any SDETs out there :-)
Are there any known work arounds? What's the best way to filter out these characters (and which characters to we need to filter?)

Probably your dimension table contains invalid XML character as part of member name or key. You can go to the attribute which causes this problem and change the bindings on the NameColumn or KeyColumn (depending which one caused the problem) for InvalidXmlCharacters from the default Preserve to Remove or Replace. This will slow down processing of the attribute a little bit, but it should solve the problem.

HTH,

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

Thursday, February 16, 2012

average of selected members?

I got a measure caled [number of persons]

Now i want another calculated meassure which shows the average number of persons within the selected time period.

My timedimension is :

[Date].[Period].[Month]

Let's say i have

jan - 1000, feb - 1200, mar - 1100, apr - 1000

So if i select "feb" and "mar" in the cube, my average should show 1150

if i select jan,feb,apr i want my average to show 1066,67

is this possible ?

Assuming that you're using AS 2005, something like:

Avg(Existing [Date].[Period].[Month].Members, [Measures].[number of persons])

|||

Ahh yes... This will work if the selection of members is specified in the WHERE statement of the MDX query. However, it will not work if a sub-select/SUBCUBE is used.

See http://www.sqljunkies.com/WebLog/reckless/archive/2006/03/08/18601.aspx for an elaboration on the issue.