1
votes

I am getting this message when i am trying to build my mdx query in my ssrs query builder. Any idea???? error: An MDX expression was expected. An empty expression was specified. (Microsoft SQL Server 2008 R2 Analysis Services) Here is my MDX

    with                                                                                        
member [Measures].[Motor: The Car]                                                                                        
as                                                                                          
( [Web Page].[Web Site Structure].[Motor Insurance].[TheCar], [Measures].[Visit Count])                                                                                     
member [Measures].[Motor: YourPolicy]                                                                                 
as                                                                                           
( [Web Page].[Web Site Structure].[Motor Insurance].[YourPolicy], [Measures].[Visit Count])                                                                                     

member [Measures].[Motor:Proposer]                                                                            
as                                                                                            
( [Web Page].[Web Site Structure].[Motor Insurance].[Proposer], [Measures].[Visit Count])                                                                                      

member [Measures].[Home:About You]                            
as        
( [Web Page].[Web Site Structure].[House Insurance].[AboutYou], [Measures].[Visit Count])    
member [Measures].[Motor:About You]            
as         
( [Web Page].[Web Site Structure].[Motor Insurance].[AboutYou], [Measures].[Visit Count])
member [Measures].[Motor:PricesPage]             
as           
( [Web Page].[Web Site Structure].[Motor Insurance].[ViewPrices], [Measures].[Visit Count])        

member [Measures].[Home:PricesPage]                   
as           
( [Web Page].[Web Site Structure].[House Insurance].[ViewPrices], [Measures].[Visit Count]) 
member [measures].[Motor:ViewAllPrices]            
as                   
( [Web Page].[Web Site Structure].[Product].&[2].[Motor:AllViewPrices], [Measures].[Visit Count]) 

member [measures].[Home:ViewAllPrices]                  
as
( [Web Page].[Web Site Structure].[House Insurance].[Home:AllViewPrices], [Measures].[Visit Count])              
member [measures].[Home:YourCover]               
as            
( [Web Page].[Web Site Structure].[House Insurance].[YourCover], [Measures].[Visit Count])
member [measures].[Home:PolicyHolder]                     
as                     
( [Web Page].[Web Site Structure].[House Insurance].[PolicyHolder], [Measures].[Visit Count])
member [measures].[Home:Property]                      
as                        
( [Web Page].[Web Site Structure].[House Insurance].[Property], [Measures].[Visit Count])

 SELECT NON EMPTY { [Measures].[Motor:PricePanel],             
 [Measures].[Motor:PricePanel->Compare],               
 [Measures].[Motor:PricePanel->MorePanel],              
 [Measures].[Home:PricePanel->MorePanel],                
 [Measures].[MorePanel->BO+Phone],              
 [Measures].[Motor:AY->PricesPage],              
 [Measures].[PercentOfVisitsByBrowser],                
  [Measures].[Proposer->PricesPage],            
  [Measures].[Proposer->TheCar],              
   [Measures].[TheCar->YourPolicy],                  
    [Measures].[PolicyHolder->Property],
     [Measures].[YourCover->PricesPage],             
     [Measures].[Property->YourCover],               
      [Measures].[YourPolicy->PricesPage],               
       [Measures].[BO+Phone],                   
        [Measures].[Compare],                   
        [Measures].[AY->Proposer],                   
        [Measures].[Motor:PricePanel->BO+Phone],              
        [Measures].[AY->PolicyHolder],                 
        [Measures].[Home:PricePanel->BO+Phone],         
        [Measures].[Home:PricePanel->Compare],           
        [Measures].[Home:PricePanel],                 
        [Measures].[Home:AY->PricesPage],                 
        [Measures].[MorePanel],                    
        [Measures].[Motor:About You]                 
,[Measures].[Motor:Proposer]                  
,[Measures].[Motor: The Car]                 
,[Measures].[Motor: YourPolicy]                 
,[Measures].[Motor:PricesPage]                 
,[measures].[Motor:ViewAllPrices]                
,[Measures].[Home:About You]                        
,[measures].[Home:PolicyHolder]                  
,[measures].[Home:Property]                    
,[measures].[Home:YourCover]                           
,[Measures].[Home:PricesPage]                      
,[measures].[Home:ViewAllPrices]                   
,[Measures].[BO+Phone] } ON COLUMNS,                     
        NON EMPTY { ([Timeline].[Financial Date].[Visit Date].ALLMEMBERS * 
        [Product].[Products By Category].[Product Category].ALLMEMBERS ) }       
         DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS         
         FROM ( SELECT ( STRTOSET(@ProductProductsByCategory, CONSTRAINED) ) ON COLUMNS          
         FROM [Visits]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS 
1
yeah, you need to specify an MDX expression to select your POV/filters. Why don't you show us something about the query (preferrably the code), so we can actually tell you something you don't already know?sehe
Here is my MDX Query...........Sandeep Pulikonda

1 Answers

3
votes

The syntax looks fine, so I'm guessing @ProductProductsByCategory is the problem.

The string that you pass in to this parameter needs to take the form of a set because you are using the StrToSet function. I usually remove the 'Constrained' argument because it forces you to list a specific set of tuple(s) enclosed by the squigly braces {} If you remove that argument you can use an MDX expression that returns a set rather than specifying the set explicitly http://msdn.microsoft.com/en-us/library/ms144782.aspx

In the default value for your parameter you will also need to specify a set. If it's just a member then rather use the StrToMember function.