SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How i can replace the sql query with mdx


How i can replace the sql query with mdx

Author
Message
inampudianil
inampudianil
SSC Veteran
SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)

Group: General Forum Members
Points: 244 Visits: 374
Hi

select *
FROM users where user_id not in (select user_id from emp where is_actv=1).

In this Users and Emp both are dimensions and they are have referntial integrity with userid.Could you please help me with MDX script

Thanks in advance
aa
Henrico Bekker
Henrico Bekker
SSCertifiable
SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)

Group: General Forum Members
Points: 7758 Visits: 5016
Example:

select {[Measures].[Amount], [Measures].[Transaction Cost], [Measures].[Transaction Number]} ON COLUMNS,
{ ManualProcessing].[All ManualProcessings].[MANUAL]} ON ROWS
FROM [Transactions]
where
(
except([Product].[All Products].Children,{[Product].[All Products].[Debit}),
except([Set],[Set to exclude])
)

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
inampudianil
inampudianil
SSC Veteran
SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)

Group: General Forum Members
Points: 244 Visits: 374
Hi

Thanks for your answer..based on ur query,i have written like this.

SELECT NON EMPTY { } ON COLUMNS,
NON EMPTY { ([PH_CUST].[CUST].ALLMEMBERS ) } ON ROWS
FROM Ad_CUBE
where except([PH_CUST].[Cust].Children,{[EMP].[PHWEB].[Activce].&[1]})

is it Correct thing i have done?

i am just tryng basic..please let me out..

Thanks in advance
aa
Raunak Jhawar
Raunak Jhawar
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3855 Visits: 1944
You can also re-write as below:

WITH SET SetA as Except([PH_CUST].[Cust].Children,{[EMP].[PHWEB].[Activce].&[1]})

SELECT { } ON COLUMNS,
NON EMPTY { SetA } ON ROWS
FROM Ad_CUBE

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search