Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        
            
                
                    
                        
                            
                                | Author | 
                                
                                 Topic  | 
                             
                            
                                    | 
                                         Digital 
                                        Starting Member 
                                         
                                        
                                        8 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2008-11-19 : 06:30:05
                                            
  | 
                                             
                                            
                                            hey guys im struggling with MDX how would i right a query in MDX that look like this is sql the cube is set up correctly i just need to return the same results SELECT  d.v_cat_desc , Count(DISTINCT Custdelpoint) AS [Delivery point] FROM  dimproduct A, dimcustomer B, factorders C,  Refcategory DWHERE a.kproduct = c.kproduct  AND b.kcustomer = c.kcustomerAND d.kcategory = a.kcategory Group By d.v_cat_descplease help cheers  Digital | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     Digital 
                                    Starting Member 
                                     
                                    
                                    8 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2008-11-19 : 07:57:47
                                          
  | 
                                         
                                        
                                          | i tried something like this but get the total accross all the categories /*use Wfl SELECT  d.v_cat_desc , Count(DISTINCT Custdelpoint) AS [Delivery point] FROM  dimproduct A, dimcustomer B, factorders_view_invoicelast4weeks C,  Refcategory DWHERE a.kproduct = c.kproduct  AND b.kcustomer = c.kcustomerAND d.kcategory = a.kcategory Group By v_cat_desc*/With Member Measures.Products as Sum([Product Dimension].[Hierarchy].[Dim Product] , [Measures].[Custdelpoint])Select  [Product Dimension].[Kcategory].members on 0 , Measures.Products on 1 FROM [CUBE]Digital  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |