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.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 MDX problems

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 D
WHERE a.kproduct = c.kproduct
AND b.kcustomer = c.kcustomer
AND d.kcategory = a.kcategory
Group By d.v_cat_desc

please 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 D
WHERE a.kproduct = c.kproduct
AND b.kcustomer = c.kcustomer
AND 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
Go to Top of Page
   

- Advertisement -