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
 General SQL Server Forums
 New to SQL Server Programming
 MDX query into MSSQL query

Author  Topic 

waterduck
Aged Yak Warrior

982 Posts

Posted - 2012-08-08 : 03:05:33
Hi,

Need help to convert following MDX query into MSSQL query

case when distinctcount([Cus ID].[Cus ID].[Cus ID])<>0 then (
case when [Measures].[N Count]<[Measures].[N Count1] then (distinctcount([Cus ID].[Cus ID].[Cus ID])-1) else distinctcount([Cus ID].[Cus ID].[Cus ID])end)end

Thx!

waterduck
Aged Yak Warrior

982 Posts

Posted - 2012-08-08 : 03:46:42
found it

1. Group by cus id
2. case when n count < n count1 then 0 else 1
3. group by again without cus id
Go to Top of Page
   

- Advertisement -