XMLA Error: “Illegal qualified name character” – Escapes and MDX

Earlier today I was writing some calculated measures for use in one of our cubes. I was testing them out and they were running fine.
 
When time came to embed them within XML for use in the cube, upon compiling I received the following error: "Illegal qualified name character".
 
 
CREATE MEMBER CURRENTCUBE.[MEASURES].[% Change] AS
Iif([Measures].[Prior Period Daily Spend] <> 0 and NOT IsEmpty([Measures].[Prior Period Daily Spend]),([Measures].[Current Period Daily Spend]-[Measures].[Prior Period Daily Spend])/[Measures].[Prior Period Daily Spend], NULL),
 
 
The two highlighted characters were the cause of the exception.  Frustrated I posted something on the Microsoft OLAP user group and within a few hours received a response pointing to use escapes. Tried the new syntax and it worked.
 
 
New MDX:
 
CREATE MEMBER CURRENTCUBE.[MEASURES].[% Change] AS
Iif([Measures].[Prior Period Daily Spend] &lt;&gt; 0 and NOT IsEmpty([Measures].[Prior Period Daily Spend]),([Measures].[Current Period Daily Spend]-[Measures].[Prior Period Daily Spend])/[Measures].[Prior Period  Daily Spend], NULL),
 
 
Ah the fun of learning something new…
 
 
For more about character escapes:
 
 
 
Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s